draw.io is a JavaScript, client-side editor for general diagramming.
28.1.1 release
David Benson19a938c2bb8b
diff --git a/ChangeLog b/ChangeLogindex a7977cdc0..b116ca5ad 100644--- a/ChangeLog+++ b/ChangeLog@@ -1,3 +1,17 @@+21-AUG-2025: 28.1.1++- [conf cloud] Workaround for CONFCLOUD-80136 bug [CES-99755]+- [conf cloud] Removed color name from the anchor including a status macro [DID-16085]+- Fixes scrollbars in nested menus [jgraph/drawio#5231]+- Fixes handling of gapi-stealth for file menu, save and link dialog [DID-15625]+- Adds lockdown via app configuration+- Fixes editing of draft files in desktop++12-AUG-2025: 28.1.0++- [conf cloud] Fixes anchors with special characters [DID-15965]+- [conf cloud] Adds caching to page IDs import [DID-15536]+08-AUG-2025: 28.0.9- [conf cloud] Recovers from bug in page IDs import where server drawio macros are changed to embed (re-indexing reconverts them) [DID-15899]diff --git a/VERSION b/VERSIONindex 6f818ecd9..1f024a9e0 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-28.0.9\ No newline at end of file+28.1.1\ No newline at end of filediff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.jsindex 16ca64e0f..abd4af5a4 100644--- a/src/main/webapp/js/app.min.js+++ b/src/main/webapp/js/app.min.js@@ -56,13 +56,13 @@ if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMaplang.substring(0,dash));0<=window.mxLanguages.indexOf(lang)&&(window.mxLanguage=lang)}}"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="1"));"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}"dark"==urlParams.ui&&null==urlParams.dark&&(urlParams.dark="1");"sketch"==a&&null==urlParams.sketch&&"ac.draw.io"===window.location.hostname&&(urlParams.sketch="1");return a}();-(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,-8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";+(function(){if("undefined"!==typeof JSON&&isLocalStorage){try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}try{a=localStorage.getItem(".configuration"),b=null,null!=a&&(b=JSON.parse(a).lockdown),null!=b&&(urlParams.lockdown=b)}catch(d){}}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&+(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,+b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"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:"28.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/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.1.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),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||@@ -88,8 +88,8 @@ unescape(c)):mxResources.resources[d]=c}}}},containsKey:function(a){return null!"/resources/editor",null,function(){mxResources.add(mxClient.basePath+"/resources/graph",null,a)})}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.intersect=function(a){if(null!=a){var b=this.x+this.width,c=a.x+a.width,d=this.y+this.height,e=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(b,c)-this.x;this.height=Math.min(d,e)-this.y}};-mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};-mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};+mxRectangle.prototype.intersectsPoint=function(a,b){return a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,q=(l.geometry.y-l.previous.y)*n,r=(l.geometry.width-l.previous.width)*n;n*=l.geometry.height-l.previous.height;0==d?(m.x-=p,m.y-=q,m.width-=r,m.height-=n):(m.x+=p/10,m.y+=q/10,m.width+=r/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},@@ -2084,33 +2084,33 @@ f.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,p){return thisu=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var y=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+y*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+h.height/this.scale)/k)-y)*k)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=h+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(h,m,p,k,u,w){var y=g.apply(this,arguments);null==w||w||mxEvent.addListener(y,"mousedown",function(C){mxEvent.consume(C)});return y};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(h,m,p){var k=this.graph.model.getParent(h);if(m){var u=this.graph.model.isEdge(h)?null:this.graph.getCellGeometry(h);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(h)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(h))}else if(u=d.apply(this,arguments),this.graph.isTableCell(h)||this.graph.isTableRow(h))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(h)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),p=m.getParent(h),k=this.graph.view.getState(p),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=p;p=m.getParent(p)}return h}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this,g=this.editor.graph;g.lightbox=f;var d=g.getGraphBounds;g.getGraphBounds=function(){var H=d.apply(this,arguments),S=this.backgroundImage;if(null!=S&&null!=S.width&&null!=S.height){var ea=this.view.translate,la=this.view.scale;H=mxRectangle.fromRectangle(H);H.add(new mxRectangle((ea.x+S.x)*la,(ea.y+S.y)*la,S.width*la,S.height*la))}return H};g.useCssTransforms&&+this.graph.isCellSelected(h)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),p=m.getParent(h),k=this.graph.view.getState(p),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=p;p=m.getParent(p)}return h}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this,g=this.editor.graph;g.lightbox=f;var d=g.getGraphBounds;g.getGraphBounds=function(){var H=d.apply(this,arguments),S=this.backgroundImage;if(null!=S&&null!=S.width&&null!=S.height){var fa=this.view.translate,la=this.view.scale;H=mxRectangle.fromRectangle(H);H.add(new mxRectangle((fa.x+S.x)*la,(fa.y+S.y)*la,S.width*la,S.height*la))}return H};g.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(H,S){this.clearSelectionState()});g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);g.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);g.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){g.isEnabled=function(){return!1};g.panningHandler.isForcePanningEvent=function(H){for(var S=H.getSource();null!=S&&S!=g.container;){if("foreignObject"===S.nodeName||"text"===S.nodeName)return!1;S=S.parentNode}return!mxEvent.isPopupTrigger(H.getEvent())};var h=g.panningHandler.start;g.panningHandler.start=function(){h.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var m=!1,p=!1;this.setDefaultStyle=function(H){try{g.getModel().isEdge(H)?-p=g.pasteEdgeStyle=!1:m=!1;var S=g.getCellStyle(H,!1),ea=[],la=[],O;for(O in S)ea.push(S[O]),la.push(O);g.getModel().isEdge(H)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ea,"cells",[H],"force",!0));g.getModel().isEdge(H)?p=g.pasteEdgeStyle=!0:m=!0}catch(V){this.handleError(V)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=p=g.pasteEdgeStyle=+p=g.pasteEdgeStyle=!1:m=!1;var S=g.getCellStyle(H,!1),fa=[],la=[],O;for(O in S)fa.push(S[O]),la.push(O);g.getModel().isEdge(H)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",fa,"cells",[H],"force",!0));g.getModel().isEdge(H)?p=g.pasteEdgeStyle=!0:m=!0}catch(V){this.handleError(V)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=p=g.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};g.addListener("cellsInserted",function(H,S){g.pasteCellStyles(g.includeDescendants(S.getProperty("cells")))});g.addListener("textInserted",function(H,S){g.pasteCellStyles(S.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(H){null==H&&(H=window.event);return g.isEditing()||null!=H&&this.isSelectionAllowed(H)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var H=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var S=-navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{H=[parseInt(S[1],10),parseInt(S[2],10),parseInt(S[3]||0,10)]}catch(ea){}}return H}(),null!=b&&16<=b[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"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{H=[parseInt(S[1],10),parseInt(S[2],10),parseInt(S[3]||0,10)]}catch(fa){}}return H}(),null!=b&&16<=b[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"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(H){if(null!=H){var S=mxEvent.getSource(H);if("A"==S.nodeName)for(;null!=S;){if("geHint"==S.className)return!0;S=S.parentNode}}return k(H)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=e.hoverIcons&&e.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(H){var S=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(H)-S.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(H)-S.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(H,S){return e.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(H){16==H.which?this.shiftDown=!0:32!=H.which||g.isEditing()?mxEvent.isConsumed(H)||27!=H.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(H)!=g.container||mxEvent.consume(H))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(H){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(H){return y.apply(this,arguments)||e.isSpaceDown()||mxEvent.isMouseEvent(H.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(H.getEvent()))&&(!mxEvent.isControlDown(H.getEvent())&&mxEvent.isRightMouseButton(H.getEvent())||mxEvent.isMiddleMouseButton(H.getEvent()))};var C=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(H){return C.apply(this,arguments)||13==H.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(H)||mxClient.IS_MAC&&mxEvent.isMetaDown(H)||mxClient.IS_SF&&mxEvent.isShiftDown(H))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return e.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,-function(){if(null!=this.toolbar)for(var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,S=this.toolbar.container.firstChild;null!=S;){var ea=S.getAttribute("data-min-width");null!=ea&&parseInt(ea)>H?S.style.display="none":S.style.display="";S=S.nextSibling}}),G=!1,J=null,M=null,Q=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var H=this.toolbar.container.firstChild,S=[];null!=H;){var ea=H.nextSibling;H.parentNode.removeChild(H);-S.push(H);H=ea}H=this.toolbar.fontMenu;ea=this.toolbar.sizeMenu;if(null==Q)this.toolbar.createTextToolbar();else{for(var la=0;la<Q.length;la++)this.toolbar.container.appendChild(Q[la]);this.toolbar.fontMenu=J;this.toolbar.sizeMenu=M}G=g.cellEditor.isContentEditing();J=H;M=ea;Q=S;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,-"resize",E);E();g.isTouchPopupMenuEnabled=function(){return null==e.dialog};var W=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){W.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var H=!1,S=function(){H||(H=!0,window.setTimeout(function(){var ea=g.getSelectedEditingElement();null!=ea&&(ea=mxUtils.getCurrentStyle(ea),null!=ea&&null!=e.toolbar&&(e.toolbar.setFontName(mxUtils.getCssFontFamily(ea.fontFamily)),e.toolbar.setFontSize(parseInt(ea.fontSize))));H=!1},0))};mxEvent.addListener(g.cellEditor.textarea,-"input",S);mxEvent.addListener(g.cellEditor.textarea,"touchend",S);mxEvent.addListener(g.cellEditor.textarea,"mouseup",S);mxEvent.addListener(g.cellEditor.textarea,"keyup",S);S()}};var X=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(H,S){try{X.apply(this,arguments),K()}catch(ea){e.handleError(ea)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(H){}var T=g.fireMouseEvent;-g.fireMouseEvent=function(H,S,ea){try{H==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(la){e.handleError(la)}};var N=g.foldCells;g.foldCells=function(H,S,ea,la,O){try{N.apply(this,arguments)}catch(V){e.handleError(V)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(H,S,ea){this.menus.createPopupMenu(H,S,ea)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(H){g.popupMenuHandler.hideMenu()}));-this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(H,S){var ea=[S.getProperty("cell")];S.getProperty("terminalInserted")&&(ea.push(S.getProperty("terminal")),window.setTimeout(function(){null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(ea[ea.length-1]))},0));g.pasteCellStyles(ea)});this.addListener("styleChanged",mxUtils.bind(this,function(H,S){H=S.getProperty("force");(this.updateDefaultStyle||+function(){if(null!=this.toolbar)for(var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,S=this.toolbar.container.firstChild;null!=S;){var fa=S.getAttribute("data-min-width");null!=fa&&parseInt(fa)>H?S.style.display="none":S.style.display="";S=S.nextSibling}}),G=!1,J=null,M=null,Q=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var H=this.toolbar.container.firstChild,S=[];null!=H;){var fa=H.nextSibling;H.parentNode.removeChild(H);+S.push(H);H=fa}H=this.toolbar.fontMenu;fa=this.toolbar.sizeMenu;if(null==Q)this.toolbar.createTextToolbar();else{for(var la=0;la<Q.length;la++)this.toolbar.container.appendChild(Q[la]);this.toolbar.fontMenu=J;this.toolbar.sizeMenu=M}G=g.cellEditor.isContentEditing();J=H;M=fa;Q=S;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,+"resize",E);E();g.isTouchPopupMenuEnabled=function(){return null==e.dialog};var W=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){W.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var H=!1,S=function(){H||(H=!0,window.setTimeout(function(){var fa=g.getSelectedEditingElement();null!=fa&&(fa=mxUtils.getCurrentStyle(fa),null!=fa&&null!=e.toolbar&&(e.toolbar.setFontName(mxUtils.getCssFontFamily(fa.fontFamily)),e.toolbar.setFontSize(parseInt(fa.fontSize))));H=!1},0))};mxEvent.addListener(g.cellEditor.textarea,+"input",S);mxEvent.addListener(g.cellEditor.textarea,"touchend",S);mxEvent.addListener(g.cellEditor.textarea,"mouseup",S);mxEvent.addListener(g.cellEditor.textarea,"keyup",S);S()}};var X=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(H,S){try{X.apply(this,arguments),K()}catch(fa){e.handleError(fa)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(H){}var T=g.fireMouseEvent;+g.fireMouseEvent=function(H,S,fa){try{H==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(la){e.handleError(la)}};var N=g.foldCells;g.foldCells=function(H,S,fa,la,O){try{N.apply(this,arguments)}catch(V){e.handleError(V)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(H,S,fa){this.menus.createPopupMenu(H,S,fa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(H){g.popupMenuHandler.hideMenu()}));+this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(H,S){var fa=[S.getProperty("cell")];S.getProperty("terminalInserted")&&(fa.push(S.getProperty("terminal")),window.setTimeout(function(){null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(fa[fa.length-1]))},0));g.pasteCellStyles(fa)});this.addListener("styleChanged",mxUtils.bind(this,function(H,S){H=S.getProperty("force");(this.updateDefaultStyle||H)&&g.copyCellStyles(S.getProperty("cells"),S.getProperty("keys"),S.getProperty("values"),g.currentVertexStyle,g.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&"1"==g.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==g.currentEdgeStyle.edgeStyle||"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):"filledEdge"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.filledEdgeImage.src):"pipe"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.pipeEdgeImage.src):"wire"==g.currentEdgeStyle.shape?-this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var H=g.currentVertexStyle.fontFamily||"Helvetica",S=String(g.currentVertexStyle.fontSize||"12"),ea=g.getView().getState(g.getSelectionCell());null!=ea&&(H=ea.style[mxConstants.STYLE_FONTFAMILY]||H,S=ea.style[mxConstants.STYLE_FONTSIZE]||S,10<H.length&&(H=H.substring(0,8)+"..."));this.toolbar.setFontName(H);+this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var H=g.currentVertexStyle.fontFamily||"Helvetica",S=String(g.currentVertexStyle.fontSize||"12"),fa=g.getView().getState(g.getSelectionCell());null!=fa&&(H=fa.style[mxConstants.STYLE_FONTFAMILY]||H,S=fa.style[mxConstants.STYLE_FONTSIZE]||S,10<H.length&&(H=H.substring(0,8)+"..."));this.toolbar.setFontName(H);this.toolbar.setFontSize(S)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(H,S){H=S.getProperty("cells");S=S.getProperty("parent");null!=S&&g.getModel().isLayer(S)&&!g.isCellVisible(S)&&null!=H&&0<H.length&&g.getModel().setVisible(S,!0)});Graph.selectParentLayer&&g.selectionModel.addListener(mxEvent.CHANGE,function(){if(g.isEnabled()&&!g.isSelectionEmpty()){var H=g.getLayerForCells(g.getSelectionCells());-null!=H&&g.setDefaultParent(H)}});this.gestureHandler=mxUtils.bind(this,function(H){null!=this.currentMenu&&mxEvent.getSource(H)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=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(){g.view.validateBackground()}));-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;+null!=H&&g.setDefaultParent(H)}});this.gestureHandler=mxUtils.bind(this,function(H){this.isHideCurrentMenuEvent(H)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=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(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",+mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;EditorUi.parsePng=function(a,b,f){function e(m,p){var k=d;d+=p;return m.substring(k,d)}function g(m){m=e(m,4);return m.charCodeAt(3)+(m.charCodeAt(2)<<8)+(m.charCodeAt(1)<<16)+(m.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var h=e(a,4);if(null!=b&&b(d-8,h,f))break;value=e(a,f);e(a,4);if("IEND"==h)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);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;@@ -2165,9 +2165,9 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipbnull;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=f.apply(this,arguments);a.updatePasteActionStates();return h};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var aa=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+aa.x*P.width),this.scale*(this.translate.y+aa.y*P.height),this.scale*aa.width*-P.width,this.scale*aa.height*P.height)};a.getPreferredPageSize=function(aa,P,ba){aa=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,aa.width*P.width,aa.height*P.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(aa,P,ba,ma){if(null!=a.container&&!a.isViewer()){ba=null!=ba?ba:0;ma=null!=ma?ma:0;var Ja=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),na=mxUtils.hasScrollbars(a.container),ya=a.view.translate,-za=a.view.scale,Ka=mxRectangle.fromRectangle(Ja);Ka.x=Ka.x/za-ya.x;Ka.y=Ka.y/za-ya.y;Ka.width/=za;Ka.height/=za;ya=a.container.scrollTop;var Qa=a.container.scrollLeft,Ia=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ia+=3;var Ha=a.container.offsetWidth-Ia;Ia=a.container.offsetHeight-Ia;aa=aa?Math.max(.3,Math.min(P||1,Ha/Ka.width)):za;P=(Ha-aa*Ka.width)/2/aa;var ra=0==this.lightboxVerticalDivider?0:(Ia-aa*Ka.height)/this.lightboxVerticalDivider/aa;na&&(P=Math.max(P,-0),ra=Math.max(ra,0));if(na||Ja.width<Ha||Ja.height<Ia)a.view.scaleAndTranslate(aa,Math.floor(P-Ka.x),Math.floor(ra-Ka.y)),a.container.scrollTop=ya*aa/za,a.container.scrollLeft=Qa*aa/za;else if(0!=ba||0!=ma)Ja=a.view.translate,a.view.setTranslate(Math.floor(Ja.x+ba/za),Math.floor(Ja.y+ma/za))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+P.width,this.scale*aa.height*P.height)};a.getPreferredPageSize=function(aa,P,ba){aa=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,aa.width*P.width,aa.height*P.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(aa,P,ba,ma){if(null!=a.container&&!a.isViewer()){ba=null!=ba?ba:0;ma=null!=ma?ma:0;var La=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),na=mxUtils.hasScrollbars(a.container),za=a.view.translate,+Aa=a.view.scale,Ma=mxRectangle.fromRectangle(La);Ma.x=Ma.x/Aa-za.x;Ma.y=Ma.y/Aa-za.y;Ma.width/=Aa;Ma.height/=Aa;za=a.container.scrollTop;var Qa=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Ia=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;aa=aa?Math.max(.3,Math.min(P||1,Ia/Ma.width)):Aa;P=(Ia-aa*Ma.width)/2/aa;var ra=0==this.lightboxVerticalDivider?0:(Ja-aa*Ma.height)/this.lightboxVerticalDivider/aa;na&&(P=Math.max(P,+0),ra=Math.max(ra,0));if(na||La.width<Ia||La.height<Ja)a.view.scaleAndTranslate(aa,Math.floor(P-Ma.x),Math.floor(ra-Ma.y)),a.container.scrollTop=za*aa/Aa,a.container.scrollLeft=Qa*aa/Aa;else if(0!=ba||0!=ma)La=a.view.translate,a.view.setTranslate(Math.floor(La.x+ba/Aa),Math.floor(La.y+ma/Aa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(aa){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(aa){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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=a.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 d=mxUtils.bind(this,function(){var aa=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=aa?parseInt(aa["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0;d=mxUtils.bind(this,function(aa,P,ba){h++;@@ -2189,17 +2189,17 @@ a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.biG():J(100);mxEvent.consume(aa)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||J(30)}));var X=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(aa,P){},mouseUp:function(aa,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<X&&Math.abs(this.scrollTop-a.container.scrollTop)<X&&Math.abs(this.startX-P.getGraphX())<X&&Math.abs(this.startY-P.getGraphY())<X&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var T=a.view.validate,N=new mxPoint,ca=!1,H=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=f.currentPage&&H!=f.currentPage){H=f.currentPage;ca=!0;var aa=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==aa&&(aa=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));aa=a.getPageLayout(aa,N,1);var P=a.getDefaultTranslate(aa);this.x0=aa.x;this.y0=aa.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();aa=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=aa||this.translate.y!=-P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=ma||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);-this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*this.view.scale),this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ea=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||-ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ea.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ea.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";-ea.style.transform=""},0)):(la.style.transform="",ea.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=V&&(Ja=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(Ja+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,-null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft++P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,La=this.view.translate.y;if(ba.x!=ma||ba.y!=La){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);+this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*this.view.scale),this.container.scrollTop+=Math.round((ba.y-La)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var fa=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||+ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",fa.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",fa.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";+fa.style.transform=""},0)):(la.style.transform="",fa.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,La=0,na=0;null!=V&&(La=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(La+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,+null,La*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==La&&0==na||(a.container.scrollLeft-=La*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));aa?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,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(a.isFastZoomEnabled()){null==ia&&""!=la.getAttribute("filter")&&(ia=la.getAttribute("filter"),la.removeAttribute("filter"));Y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);aa=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=P||null==V?a.container.scrollLeft+a.container.clientWidth/-2:V.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+aa+")";ea.style.transformOrigin=ma+"px "+Ja+"px";ea.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/-2+a.container.scrollLeft-ma.offsetLeft+"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",-"factor",aa))}ta(a.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(a.container,function(aa){null!=O&&window.clearTimeout(O)},null,function(aa){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(aa){null==O||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(aa,P,ba,ma,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(aa))ba=-a.view.getTranslate(),ma=40/a.view.scale,mxEvent.isShiftDown(aa)?a.view.setTranslate(ba.x+(P?-ma:ma),ba.y):a.view.setTranslate(ba.x,ba.y+(P?ma:-ma));else if(ba||a.isZoomWheelEvent(aa))for(var na=mxEvent.getSource(aa);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),V=null!=ma&&null!=Ja?new mxPoint(ma,Ja):new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ha=ba,ba=a.zoomFactor,ma=null,aa.ctrlKey&&null!=aa.deltaY&&40>Math.abs(aa.deltaY)&&Math.round(aa.deltaY)!=aa.deltaY?ba=+2:V.x+a.container.scrollLeft-a.container.offsetLeft;var La=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+La+"px";la.style.transform="scale("+aa+")";fa.style.transformOrigin=ma+"px "+La+"px";fa.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/+2+a.container.scrollLeft-ma.offsetLeft+"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,La);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",+"factor",aa))}ta(a.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(a.container,function(aa){null!=O&&window.clearTimeout(O)},null,function(aa){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(aa){null==O||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(aa,P,ba,ma,La){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(aa))ba=+a.view.getTranslate(),ma=40/a.view.scale,mxEvent.isShiftDown(aa)?a.view.setTranslate(ba.x+(P?-ma:ma),ba.y):a.view.setTranslate(ba.x,ba.y+(P?ma:-ma));else if(ba||a.isZoomWheelEvent(aa))for(var na=mxEvent.getSource(aa);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),V=null!=ma&&null!=La?new mxPoint(ma,La):new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ha=ba,ba=a.zoomFactor,ma=null,aa.ctrlKey&&null!=aa.deltaY&&40>Math.abs(aa.deltaY)&&Math.round(aa.deltaY)!=aa.deltaY?ba=1+Math.abs(aa.deltaY)/20*(ba-1):null!=aa.movementY&&"pointermove"==aa.type&&(ba=1+Math.max(1,Math.abs(aa.movementY))/20*(ba-1),ma=-1),a.lazyZoom(P,null,ma,ba),mxEvent.consume(aa),!1;na=na.parentNode}}),a.container);a.panningHandler.zoomGraph=function(aa){a.cumulativeZoomFactor=aa.scale;a.lazyZoom(0<aa.scale,!0);mxEvent.consume(aa)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;if(null!=this.format){var b=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+b+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=a?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,@@ -2208,11 +2208,11 @@ EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();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(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(a,b){this.showDialog((new PrintDialog(this,a,b)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};-EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;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 a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};-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(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};-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(a,b){this.replaceDiagramData(xUtils.getXml(b))};EditorUi.prototype.replaceDiagramData=function(a){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(a).documentElement)}finally{this.editor.graph.model.endUpdate()}};-EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};-EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};+EditorUi.prototype.isHideCurrentMenuEvent=function(a){a=mxEvent.getSource(a);if(null!=this.currentMenu){if(a==this.currentMenu.div)return!1;for(var b=this.currentMenu.activeRow;null!=b;){if(a==b.div)return!1;b=b.activeRow}return!0}return!1};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;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 a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};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(a){}};+EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};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(a,b){this.replaceDiagramData(xUtils.getXml(b))};EditorUi.prototype.replaceDiagramData=function(a){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(a).documentElement)}finally{this.editor.graph.model.endUpdate()}};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};+EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.fitDiagramToWindow=function(){var a=this.editor.graph,b=a.isSelectionEmpty()?mxRectangle.fromRectangle(a.getGraphBounds()):a.getBoundingBox(a.getSelectionCells()),f=a.view.translate,e=a.view.scale;b.x=b.x/e-f.x;b.y=b.y/e-f.y;b.width/=e;b.height/=e;null!=a.backgroundImage&&b.add(new mxRectangle(0,0,a.backgroundImage.width,a.backgroundImage.height));0==b.width||0==b.height?(a.zoomTo(1),this.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(b.x-=f.x,b.y-=f.y,b.width+=f.width+f.x,b.height+=f.height+f.y),a.fitWindow(b))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph,b=a.container;if(!this.editor.extendCanvas)b.scrollTop=0,b.scrollLeft=0,mxUtils.hasScrollbars(b)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b))if(a.pageVisible){var f=a.getPagePadding();b.scrollTop=Math.floor(f.y);b.scrollLeft=Math.floor(Math.min(f.x,(b.scrollWidth-b.clientWidth)/2));f=a.getGraphBounds();0<f.width&&0<f.height&&(f.x>b.scrollLeft+.9*b.clientWidth&&(b.scrollLeft=Math.min(f.x+@@ -2340,16 +2340,16 @@ d)&&(m.push(C),k==h.length-1&&m.length==g))){e(m.slice(f*b,g),g,!0,h);return}}}eSidebar.prototype.addSearchPalette=function(a){function b(H,S){E=S;H=H.firstChild.nextSibling.nextSibling;S=document.createElement("span");S.style.color="gray";S.innerHTML="Enter";H.appendChild(S)}function f(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));G.style.display="none";M=p.value="";N()}var e=this.editorUi,g=e.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");h.className="geSidebar geSearchSidebar";a||(h.style.display="none");var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var p=document.createElement("input");p.setAttribute("id","geOmniSearch");p.setAttribute("placeholder",mxResources.get("typeSlashToSearch"));p.setAttribute("type","text");m.appendChild(p);var k=document.createElement("img");k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));k.className="geAdaptiveAsset";m.appendChild(k);h.appendChild(m);var u=!1;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(H){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(H)!=p||document.activeElement==p||(p.focus(),mxClient.IS_GC||mxClient.IS_FF?p.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(H){mxEvent.getSource(H)==p&&u&&mxEvent.consume(H)}),mxUtils.bind(this,function(H){u&&(mxEvent.consume(H),u=!1)}));var w=[],y=mxUtils.bind(this,function(H,S){e.hideCurrentMenu();-mxUtils.remove(H,w);w.unshift(H);5<w.length&&w.pop();H.funct.apply(this,S);p.value=null}),C="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(H){var S=null,ea;for(ea in e.actions.actions){var la=0>C.indexOf(ea)&&"test"!=ea.substring(0,4)?e.actions.get(ea):null;if(null!=la&&la.isEnabled()&&la.visible){if(ea.toLowerCase()==H)return la;for(var O=H.toLowerCase().split(" "),V=0,Y=0;Y<O.length;Y++)0==O[Y].length?V++:(0<=ea.toLowerCase().indexOf(O[Y])||-0<=la.getTitle().toLowerCase().indexOf(O[Y]))&&V++;V==O.length&&(0>w.indexOf(S)||null!=S&&!S.isEnabled())&&(S=la)}}return S}),E=null;e.addMenuHandler(p,mxUtils.bind(this,function(H,S){function ea(ia){if(null!=ia&&ia.visible){var ta=H.addItem(ia.getTitle(),null,function(){y(ia,arguments)},S,null,ia.isEnabled());ia.toggleAction&&ia.isSelected()&&H.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ia.isEnabled()||0!=p.value.length&&V!=ia||b(ta,function(){y(ia,arguments);g.container.focus()})}}var la=+mxUtils.remove(H,w);w.unshift(H);5<w.length&&w.pop();H.funct.apply(this,S);p.value=null}),C="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(H){var S=null,fa;for(fa in e.actions.actions){var la=0>C.indexOf(fa)&&"test"!=fa.substring(0,4)?e.actions.get(fa):null;if(null!=la&&la.isEnabled()&&la.visible){if(fa.toLowerCase()==H)return la;for(var O=H.toLowerCase().split(" "),V=0,Y=0;Y<O.length;Y++)0==O[Y].length?V++:(0<=fa.toLowerCase().indexOf(O[Y])||+0<=la.getTitle().toLowerCase().indexOf(O[Y]))&&V++;V==O.length&&(0>w.indexOf(S)||null!=S&&!S.isEnabled())&&(S=la)}}return S}),E=null;e.addMenuHandler(p,mxUtils.bind(this,function(H,S){function fa(ia){if(null!=ia&&ia.visible){var ta=H.addItem(ia.getTitle(),null,function(){y(ia,arguments)},S,null,ia.isEnabled());ia.toggleAction&&ia.isSelected()&&H.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ia.isEnabled()||0!=p.value.length&&V!=ia||b(ta,function(){y(ia,arguments);g.container.focus()})}}var la=p.value.toLowerCase();E=null;var O=H.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){ca()}),S);b(O,function(){ca()});H.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){e.hideCurrentMenu();e.showSearchWindow(!0,p.value);p.value=""}),S);Editor.enableChatGpt&&!e.isOffline()&&e.isOwnGDriveDomain()&&e.isExternalDataComms()&&"draw.io"==e.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&H.addItem(mxResources.get("generate"),-null,mxUtils.bind(this,function(){e.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),S);!e.isOffline()&&e.isOwnGDriveDomain()&&e.isExternalDataComms()&&H.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){e.searchHelp(p.value);p.value=""}),S);H.addSeparator();var V=0<p.value.length?D(la):null;ea(V);for(O=0;O<w.length;O++)w[O]!=V&&ea(w[O]);if(0<la.length&&null!=e.pages)for(H.addSeparator(),O=0;O<e.pages.length&&!function(ia){if(null!=ia.getName()&&0<=ia.getName().toLowerCase().indexOf(la)){var ta=+null,mxUtils.bind(this,function(){e.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),S);!e.isOffline()&&e.isOwnGDriveDomain()&&e.isExternalDataComms()&&H.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){e.searchHelp(p.value);p.value=""}),S);H.addSeparator();var V=0<p.value.length?D(la):null;fa(V);for(O=0;O<w.length;O++)w[O]!=V&&fa(w[O]);if(0<la.length&&null!=e.pages)for(H.addSeparator(),O=0;O<e.pages.length&&!function(ia){if(null!=ia.getName()&&0<=ia.getName().toLowerCase().indexOf(la)){var ta=function(){e.selectPage(ia);g.container.focus();p.value=""},aa=H.addItem(ia.getName()+" ("+mxResources.get("page")+")",null,ta,S);null==E&&b(aa,ta);return!0}return!1}(e.pages[O]);O++);if(0<la.length&&null!=e.sidebar&&null!=e.sidebar.entries)for(H.addSeparator(),O=0;O<e.sidebar.entries.length;O++)for(var Y=e.sidebar.entries[O].entries,ha=0;ha<Y.length;ha++)(function(ia){var ta=e.sidebar.getConfigurationById(ia.id),aa=ia.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(aa,la)&&(aa=function(){var P=e.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ia=H.addItem(ia.title+" ("+mxResources.get("openLibrary")+")",null,aa,S),null==E&&b(ia,aa));return!0})(Y[ha])}),null,!0);var G=document.createElement("div");G.style.display="none";G.style.paddingTop="8px";G.style.alignItems="center";G.style.justifyContent="center";var J=mxUtils.button(mxResources.get("moreResults"),function(){ca()});J.setAttribute("title",mxResources.get("moreResults"));J.className="geBtn gePrimaryBtn";J.style.borderRadius="16px";J.style.padding="8px 12px";G.appendChild(J);h.appendChild(G);var M="",Q=!1,K=!1,W=0,X={},T=12,N=mxUtils.bind(this,function(){Q=!1;this.currentSearch=null;for(var H=h.firstChild;null!=H;){var S=H.nextSibling;H!=m&&H!=G&&H.parentNode.removeChild(H);H=S}});mxEvent.addListener(k,"click",function(){k.getAttribute("src")!=Editor.magnifyImage&&f();p.focus()});var ca=mxUtils.bind(this,function(){e.hideCurrentMenu();T=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=p.value){if(null!=G.parentNode&&(M!=p.value&&(N(),M=p.value,X={},K=!1,W=0),!Q&&!K)){J.setAttribute("disabled","true");G.style.display="flex";J.style.cursor="wait";J.innerHTML="";mxUtils.write(J,mxResources.get("loading")+"...");Q=!0;var H={};this.currentSearch=H;try{this.searchEntries(M,T,W,mxUtils.bind(this,-function(S,ea,la,O){if(this.currentSearch==H){S=null!=S?S:[];Q=!1;W++;this.insertSearchHint(h,M,T,W,S,ea,la,O);0==S.length&&1==W&&(M="");null!=G.parentNode&&G.parentNode.removeChild(G);for(ea=0;ea<S.length;ea++)mxUtils.bind(this,function(V){try{var Y=V();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(V,!1)&&(Y.style.opacity=this.closedLibraryOpacity);null==X[Y.innerHTML]?(X[Y.innerHTML]=null!=V.parentLibraries?V.parentLibraries.slice():[],h.appendChild(Y)):null!=-V.parentLibraries&&(X[Y.innerHTML]=X[Y.innerHTML].concat(V.parentLibraries));mxEvent.addGestureListeners(Y,null,null,mxUtils.bind(this,function(ha){var ia=X[Y.innerHTML];mxEvent.isPopupTrigger(ha)&&this.showPopupMenuForEntry(Y,ia,ha)}));mxEvent.disableContextMenu(Y)}catch(ha){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ha.stack)):console.error(ha))}})(S[ea]);la?(J.removeAttribute("disabled"),J.innerHTML="",mxUtils.write(J,mxResources.get("moreResults"))):+function(S,fa,la,O){if(this.currentSearch==H){S=null!=S?S:[];Q=!1;W++;this.insertSearchHint(h,M,T,W,S,fa,la,O);0==S.length&&1==W&&(M="");null!=G.parentNode&&G.parentNode.removeChild(G);for(fa=0;fa<S.length;fa++)mxUtils.bind(this,function(V){try{var Y=V();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(V,!1)&&(Y.style.opacity=this.closedLibraryOpacity);null==X[Y.innerHTML]?(X[Y.innerHTML]=null!=V.parentLibraries?V.parentLibraries.slice():[],h.appendChild(Y)):null!=+V.parentLibraries&&(X[Y.innerHTML]=X[Y.innerHTML].concat(V.parentLibraries));mxEvent.addGestureListeners(Y,null,null,mxUtils.bind(this,function(ha){var ia=X[Y.innerHTML];mxEvent.isPopupTrigger(ha)&&this.showPopupMenuForEntry(Y,ia,ha)}));mxEvent.disableContextMenu(Y)}catch(ha){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ha.stack)):console.error(ha))}})(S[fa]);la?(J.removeAttribute("disabled"),J.innerHTML="",mxUtils.write(J,mxResources.get("moreResults"))):(J.innerHTML=mxResources.get("reset"),G.style.display="none",K=!0);J.style.cursor="";h.appendChild(G)}}),mxUtils.bind(this,function(){J.style.cursor=""}),this.searchClosedLibraries)}catch(S){e.handleError(S)}}}else N(),M=p.value="",X={},G.style.display="none",K=!1,p.focus()});this.searchShapes=function(H){p.value=H;ca()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(H){13==H.keyCode&&null!=E?(E(H,H),mxEvent.consume(H)):9==H.keyCode?(g.container.focus(),mxEvent.consume(H)):27==H.keyCode&&(f(),mxEvent.consume(H))}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==p.value?(k.setAttribute("src",Editor.magnifyImage),k.setAttribute("title",mxResources.get("search"))):(k.setAttribute("src",Editor.crossImage),k.setAttribute("title",mxResources.get("reset")));""==p.value?(K=!0,G.style.display="none"):p.value!=M?(G.style.display="none",K=!1):Q||(G.style.display=K?"none":"flex")}),0)});mxEvent.addListener(p,"keyup",a);mxEvent.addListener(p,"paste",a);mxEvent.addListener(p,"cut",a);mxEvent.addListener(p,"mousedown",function(H){H.stopPropagation&&H.stopPropagation();H.cancelBubble=!0});mxEvent.addListener(p,"selectstart",function(H){H.stopPropagation&&H.stopPropagation();H.cancelBubble=!0});a=document.createElement("div");a.appendChild(h);this.appendChild(a);this.palettes.search=[d,a]};@@ -2481,30 +2481,30 @@ e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=p.y+p.height,e.e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+p.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-p.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(p=g.getCellGeometry(b.getTerminal(!1)),null!=p&&(f==mxConstants.DIRECTION_NORTH?(e.x-=p.getCenterX(),e.y-=p.getCenterY()+p.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=p.getCenterX()-p.width/2,e.y-=p.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=p.getCenterX(),e.y-=p.getCenterY()-p.height/2):f==mxConstants.DIRECTION_WEST&&(e.x-=p.getCenterX()+p.width/2,e.y-=p.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};-Sidebar.prototype.createDragSource=function(a,b,f,e,g,d){function h(na,ya){var za=mxUtils.createImage(na.src);za.style.width=na.width+"px";za.style.height=na.height+"px";null!=ya&&za.setAttribute("title",ya);mxUtils.setOpacity(za,na==this.refreshTarget?30:20);za.style.position="absolute";za.style.cursor="crosshair";return za}function m(na,ya,za,Ka){null!=Ka.parentNode&&(mxUtils.contains(za,na,ya)?(mxUtils.setOpacity(Ka,100),V=Ka):mxUtils.setOpacity(Ka,Ka==H?30:20));return za}var p=this.editorUi,k=-p.editor.graph,u=null,w=null,y=this;d=0;for(var C=this.livePreview,D=0;D<e.length&&C;D++)d+=k.model.getDescendants(e[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<e.length&&(null==w&&k.model.isVertex(e[D])?w=D:null==u&&k.model.isEdge(e[D])&&null==k.model.getTerminal(e[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(e,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(na,ya,za,Ka,Qa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=-K&&V==H){var Ia=na.isCellSelected(K.cell)?na.getSelectionCells():[K.cell];na.updateShapes(na.model.isEdge(K.cell)?e[0]:e[w],Ia,!0);na.setSelectionCells(Ia)}else null!=e&&null!=V&&null!=M&&V!=H?(Ia=na.model.isEdge(M.cell)||null==u?w:u,na.setSelectionCells(this.dropAndConnect(M.cell,e,O,Ia,ya,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(na.view.getState(na.getSelectionCell()))}),f,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),-G.createPreviewElement=mxUtils.bind(this,function(na){var ya=document.createElement("a");ya.className="geItem";ya.style.overflow="visible";na=na.view.scale;ya.style.width=na*Math.max(1,g.width)+"px";ya.style.height=na*Math.max(1,g.height)+"px";mxUtils.setOpacity(ya,50);var za=k.cloneCells(e);this.graph.pasteCellStyles(k.includeDescendants(za),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(za,na*Math.max(1,g.width),na*Math.max(1,g.height),ya,null,null,null,null,null,k.shapeBackgroundColor,-0,na);return ya}));var J=G.mouseDown;G.mouseDown=function(na){mxEvent.isPopupTrigger(na)||mxEvent.isMultiTouchEvent(na)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),J.apply(this,arguments))};var M=null,Q=null,K=null,W=!1,X=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),N=h(this.triangleDown,mxResources.get("connect")),ca=h(this.triangleLeft,mxResources.get("connect")),H=h(this.refreshTarget,mxResources.get("replace")),S=null,ea=h(this.roundDrop),-la=h(this.roundDrop),O=mxConstants.DIRECTION_NORTH,V=null,Y=G.createPreviewElement;G.createPreviewElement=function(na){var ya=Y.apply(this,arguments);this.previewElementWidth=ya.style.width;this.previewElementHeight=ya.style.height;ya.style.pointerEvents="none";return ya};var ha=G.dragEnter;G.dragEnter=function(na,ya){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ha.apply(this,arguments)};var ia=G.dragExit;G.dragExit=function(na,ya){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");ia.apply(this,-arguments)};G.dragOver=function(na,ya){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var za=na.view;if(null!=K&&V==H)this.previewElement.style.display="none";else if(null!=M&&null!=V){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=na.model.isEdge(M.cell)||null!=w?w:u,Qa=y.getDropAndConnectGeometry(M.cell,e[Ka],O,e),Ia=na.model.isEdge(M.cell)?-null:na.getCellGeometry(M.cell),Ha=na.getCellGeometry(e[Ka]),ra=na.model.getParent(M.cell),Da=za.translate.x*za.scale,Va=za.translate.y*za.scale;null!=Ia&&!Ia.relative&&na.model.isVertex(ra)&&ra!=za.currentRoot&&(Va=za.getState(ra),Da=Va.x,Va=Va.y);Ia=Ha.x;Ha=Ha.y;na.model.isEdge(e[Ka])&&(Ha=Ia=0);this.previewElement.style.left=(Qa.x-Ia)*za.scale+Da+"px";this.previewElement.style.top=(Qa.y-Ha)*za.scale+Va+"px";1==e.length&&(this.previewElement.style.width=Qa.width*za.scale+"px",this.previewElement.style.height=-Qa.height*za.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&na.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*za.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)--g.height*za.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),aa=0,P=null,ba=this.editorUi.editor.graph.getCellStyle(e[0]);G.getDropTarget=mxUtils.bind(this,function(na,ya,za,Ka){var Qa=mxEvent.isAltDown(Ka)||-null==e?null:na.getCellAt(ya,za,null,null,null,function(Va,Wa,$a){return na.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Qa&&!this.graph.isCellConnectable(Qa)&&!this.graph.model.isEdge(Qa)){var Ia=this.graph.getModel().getParent(Qa);this.graph.getModel().isVertex(Ia)&&this.graph.isCellConnectable(Ia)&&(Qa=Ia)}na.isCellLocked(Qa)&&(Qa=null);var Ha=na.view.getState(Qa);Ia=V=null;P!=Ha?(ta=(new Date).getTime(),aa=0,P=Ha,null!=this.updateThread&&window.clearTimeout(this.updateThread),-null!=Ha&&(this.updateThread=window.setTimeout(function(){null==V&&(P=Ha,G.getDropTarget(na,ya,za,Ka))},this.dropTargetDelay+10))):aa=(new Date).getTime()-ta;if(E&&2500>aa&&null!=Ha&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,-mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<aa||na.model.isEdge(Ha.cell))&&aa>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ha)&&(na.model.isVertex(Ha.cell)&&null!=w||na.model.isEdge(Ha.cell)&&na.model.isEdge(e[0]))){if(na.isCellEditable(Ha.cell)){K=Ha;var ra=na.model.isEdge(Ha.cell)?na.view.getPoint(Ha):new mxPoint(Ha.getCenterX(),Ha.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/-2,this.refreshTarget.width,this.refreshTarget.height);H.style.left=Math.floor(ra.x)+"px";H.style.top=Math.floor(ra.y)+"px";null==S&&(na.container.appendChild(H),S=H.parentNode);m(ya,za,ra,H)}}else null==K||!mxUtils.contains(K,ya,za)||1500<aa&&!mxEvent.isShiftDown(Ka)?(K=null,null!=S&&(H.parentNode.removeChild(H),S=null)):null!=K&&null!=S&&(ra=na.model.isEdge(K.cell)?na.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/-2,this.refreshTarget.width,this.refreshTarget.height),m(ya,za,ra,H));if(W&&null!=M&&!mxEvent.isAltDown(Ka)&&null==V){Ia=mxRectangle.fromRectangle(M);if(na.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=ea.parentNode&&(ra=Da[0],Ia.add(m(ya,za,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ea)));null!=la.parentNode&&(Da=Da[Da.length-1],Ia.add(m(ya,za,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,+Sidebar.prototype.createDragSource=function(a,b,f,e,g,d){function h(na,za){var Aa=mxUtils.createImage(na.src);Aa.style.width=na.width+"px";Aa.style.height=na.height+"px";null!=za&&Aa.setAttribute("title",za);mxUtils.setOpacity(Aa,na==this.refreshTarget?30:20);Aa.style.position="absolute";Aa.style.cursor="crosshair";return Aa}function m(na,za,Aa,Ma){null!=Ma.parentNode&&(mxUtils.contains(Aa,na,za)?(mxUtils.setOpacity(Ma,100),V=Ma):mxUtils.setOpacity(Ma,Ma==H?30:20));return Aa}var p=this.editorUi,k=+p.editor.graph,u=null,w=null,y=this;d=0;for(var C=this.livePreview,D=0;D<e.length&&C;D++)d+=k.model.getDescendants(e[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<e.length&&(null==w&&k.model.isVertex(e[D])?w=D:null==u&&k.model.isEdge(e[D])&&null==k.model.getTerminal(e[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(e,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(na,za,Aa,Ma,Qa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=+K&&V==H){var Ja=na.isCellSelected(K.cell)?na.getSelectionCells():[K.cell];na.updateShapes(na.model.isEdge(K.cell)?e[0]:e[w],Ja,!0);na.setSelectionCells(Ja)}else null!=e&&null!=V&&null!=M&&V!=H?(Ja=na.model.isEdge(M.cell)||null==u?w:u,na.setSelectionCells(this.dropAndConnect(M.cell,e,O,Ja,za,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(na.view.getState(na.getSelectionCell()))}),f,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),+G.createPreviewElement=mxUtils.bind(this,function(na){var za=document.createElement("a");za.className="geItem";za.style.overflow="visible";na=na.view.scale;za.style.width=na*Math.max(1,g.width)+"px";za.style.height=na*Math.max(1,g.height)+"px";mxUtils.setOpacity(za,50);var Aa=k.cloneCells(e);this.graph.pasteCellStyles(k.includeDescendants(Aa),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(Aa,na*Math.max(1,g.width),na*Math.max(1,g.height),za,null,null,null,null,null,k.shapeBackgroundColor,+0,na);return za}));var J=G.mouseDown;G.mouseDown=function(na){mxEvent.isPopupTrigger(na)||mxEvent.isMultiTouchEvent(na)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),J.apply(this,arguments))};var M=null,Q=null,K=null,W=!1,X=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),N=h(this.triangleDown,mxResources.get("connect")),ca=h(this.triangleLeft,mxResources.get("connect")),H=h(this.refreshTarget,mxResources.get("replace")),S=null,fa=h(this.roundDrop),+la=h(this.roundDrop),O=mxConstants.DIRECTION_NORTH,V=null,Y=G.createPreviewElement;G.createPreviewElement=function(na){var za=Y.apply(this,arguments);this.previewElementWidth=za.style.width;this.previewElementHeight=za.style.height;za.style.pointerEvents="none";return za};var ha=G.dragEnter;G.dragEnter=function(na,za){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ha.apply(this,arguments)};var ia=G.dragExit;G.dragExit=function(na,za){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");ia.apply(this,+arguments)};G.dragOver=function(na,za){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Aa=na.view;if(null!=K&&V==H)this.previewElement.style.display="none";else if(null!=M&&null!=V){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ma=na.model.isEdge(M.cell)||null!=w?w:u,Qa=y.getDropAndConnectGeometry(M.cell,e[Ma],O,e),Ja=na.model.isEdge(M.cell)?+null:na.getCellGeometry(M.cell),Ia=na.getCellGeometry(e[Ma]),ra=na.model.getParent(M.cell),Da=Aa.translate.x*Aa.scale,Va=Aa.translate.y*Aa.scale;null!=Ja&&!Ja.relative&&na.model.isVertex(ra)&&ra!=Aa.currentRoot&&(Va=Aa.getState(ra),Da=Va.x,Va=Va.y);Ja=Ia.x;Ia=Ia.y;na.model.isEdge(e[Ma])&&(Ia=Ja=0);this.previewElement.style.left=(Qa.x-Ja)*Aa.scale+Da+"px";this.previewElement.style.top=(Qa.y-Ia)*Aa.scale+Va+"px";1==e.length&&(this.previewElement.style.width=Qa.width*Aa.scale+"px",this.previewElement.style.height=+Qa.height*Aa.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&na.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*Aa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-+g.height*Aa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),aa=0,P=null,ba=this.editorUi.editor.graph.getCellStyle(e[0]);G.getDropTarget=mxUtils.bind(this,function(na,za,Aa,Ma){var Qa=mxEvent.isAltDown(Ma)||+null==e?null:na.getCellAt(za,Aa,null,null,null,function(Va,Wa,$a){return na.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Qa&&!this.graph.isCellConnectable(Qa)&&!this.graph.model.isEdge(Qa)){var Ja=this.graph.getModel().getParent(Qa);this.graph.getModel().isVertex(Ja)&&this.graph.isCellConnectable(Ja)&&(Qa=Ja)}na.isCellLocked(Qa)&&(Qa=null);var Ia=na.view.getState(Qa);Ja=V=null;P!=Ia?(ta=(new Date).getTime(),aa=0,P=Ia,null!=this.updateThread&&window.clearTimeout(this.updateThread),+null!=Ia&&(this.updateThread=window.setTimeout(function(){null==V&&(P=Ia,G.getDropTarget(na,za,Aa,Ma))},this.dropTargetDelay+10))):aa=(new Date).getTime()-ta;if(E&&2500>aa&&null!=Ia&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ia.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ia.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ia.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ia.style,+mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<aa||na.model.isEdge(Ia.cell))&&aa>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ia)&&(na.model.isVertex(Ia.cell)&&null!=w||na.model.isEdge(Ia.cell)&&na.model.isEdge(e[0]))){if(na.isCellEditable(Ia.cell)){K=Ia;var ra=na.model.isEdge(Ia.cell)?na.view.getPoint(Ia):new mxPoint(Ia.getCenterX(),Ia.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/+2,this.refreshTarget.width,this.refreshTarget.height);H.style.left=Math.floor(ra.x)+"px";H.style.top=Math.floor(ra.y)+"px";null==S&&(na.container.appendChild(H),S=H.parentNode);m(za,Aa,ra,H)}}else null==K||!mxUtils.contains(K,za,Aa)||1500<aa&&!mxEvent.isShiftDown(Ma)?(K=null,null!=S&&(H.parentNode.removeChild(H),S=null)):null!=K&&null!=S&&(ra=na.model.isEdge(K.cell)?na.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/+2,this.refreshTarget.width,this.refreshTarget.height),m(za,Aa,ra,H));if(W&&null!=M&&!mxEvent.isAltDown(Ma)&&null==V){Ja=mxRectangle.fromRectangle(M);if(na.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=fa.parentNode&&(ra=Da[0],Ja.add(m(za,Aa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),fa)));null!=la.parentNode&&(Da=Da[Da.length-1],Ja.add(m(za,Aa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),la)))}else ra=mxRectangle.fromRectangle(M),null!=M.shape&&null!=M.shape.boundingBox&&(ra=mxRectangle.fromRectangle(M.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(M.cell),null!=Da&&(ra.x-=Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&-"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),Ia.add(m(ya,za,new mxRectangle(M.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),X)),Ia.add(m(ya,za,new mxRectangle(ra.x+ra.width,M.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),T)),Ia.add(m(ya,za,new mxRectangle(M.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,-this.triangleDown.height),N)),Ia.add(m(ya,za,new mxRectangle(ra.x-this.triangleLeft.width,M.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),ca));null!=Ia&&Ia.grow(10)}O=mxConstants.DIRECTION_NORTH;V==T?O=mxConstants.DIRECTION_EAST:V==N||V==la?O=mxConstants.DIRECTION_SOUTH:V==ca&&(O=mxConstants.DIRECTION_WEST);null!=K&&V==H&&(Ha=K);ra=(null==w||na.isCellConnectable(e[w]))&&(na.model.isEdge(Qa)&&null!=w||na.model.isVertex(Qa)&&na.isCellConnectable(Qa));if(null!=-M&&5E3<=aa||M!=Ha&&(null==Ia||!mxUtils.contains(Ia,ya,za)||500<aa&&null==V&&ra))if(W=!1,M=5E3>aa&&aa>this.dropTargetDelay||na.model.isEdge(Qa)?Ha:null,null!=M&&ra){Ia=[ea,la,X,T,N,ca];for(ra=0;ra<Ia.length;ra++)null!=Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);na.model.isEdge(Qa)?(Da=Ha.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],ea.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ea.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",la.style.left=Math.floor(Da.x--this.roundDrop.width/2)+"px",la.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==na.model.getTerminal(Qa,!0)&&na.container.appendChild(ea),null==na.model.getTerminal(Qa,!1)&&na.container.appendChild(la))):(ra=mxRectangle.fromRectangle(Ha),null!=Ha.shape&&null!=Ha.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ha.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ha.cell),null!=Da&&(ra.x-=Da.horizontalOffset/-2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),X.style.left=Math.floor(Ha.getCenterX()-this.triangleUp.width/2)+"px",X.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",T.style.left=Math.floor(ra.x+ra.width)+"px",T.style.top=Math.floor(Ha.getCenterY()--this.triangleRight.height/2)+"px",N.style.left=X.style.left,N.style.top=Math.floor(ra.y+ra.height)+"px",ca.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",ca.style.top=T.style.top,"eastwest"!=Ha.style.portConstraint&&(na.container.appendChild(X),na.container.appendChild(N)),na.container.appendChild(T),na.container.appendChild(ca));null!=Ha&&(Q=na.selectionCellsHandler.getHandler(Ha.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));W=!0}else for(Ia=[ea,la,X,T,N,ca],ra=0;ra<-Ia.length;ra++)null!=Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);W||null==Q||Q.setHandlesVisible(!0);Qa=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=K&&V==H?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Qa||null==V&&na.isSplitTarget(Qa,e,Ka)||(Qa=na.getDropTarget(e,Ka,Qa,!0));return Qa});var ma=G.startDrag;G.startDrag=function(na){y.activeDragSource=this;ma.apply(this,arguments)};var Ja=G.stopDrag;G.stopDrag=function(){Ja.apply(this,arguments);for(var na=-[ea,la,H,X,T,N,ca],ya=0;ya<na.length;ya++)null!=na[ya].parentNode&&na[ya].parentNode.removeChild(na[ya]);null!=M&&null!=Q&&Q.reset();V=S=K=M=Q=y.activeDragSource=null};return G};+"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),Ja.add(m(za,Aa,new mxRectangle(M.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),X)),Ja.add(m(za,Aa,new mxRectangle(ra.x+ra.width,M.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),T)),Ja.add(m(za,Aa,new mxRectangle(M.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,+this.triangleDown.height),N)),Ja.add(m(za,Aa,new mxRectangle(ra.x-this.triangleLeft.width,M.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),ca));null!=Ja&&Ja.grow(10)}O=mxConstants.DIRECTION_NORTH;V==T?O=mxConstants.DIRECTION_EAST:V==N||V==la?O=mxConstants.DIRECTION_SOUTH:V==ca&&(O=mxConstants.DIRECTION_WEST);null!=K&&V==H&&(Ia=K);ra=(null==w||na.isCellConnectable(e[w]))&&(na.model.isEdge(Qa)&&null!=w||na.model.isVertex(Qa)&&na.isCellConnectable(Qa));if(null!=+M&&5E3<=aa||M!=Ia&&(null==Ja||!mxUtils.contains(Ja,za,Aa)||500<aa&&null==V&&ra))if(W=!1,M=5E3>aa&&aa>this.dropTargetDelay||na.model.isEdge(Qa)?Ia:null,null!=M&&ra){Ja=[fa,la,X,T,N,ca];for(ra=0;ra<Ja.length;ra++)null!=Ja[ra].parentNode&&Ja[ra].parentNode.removeChild(Ja[ra]);na.model.isEdge(Qa)?(Da=Ia.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],fa.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",la.style.left=Math.floor(Da.x-+this.roundDrop.width/2)+"px",la.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==na.model.getTerminal(Qa,!0)&&na.container.appendChild(fa),null==na.model.getTerminal(Qa,!1)&&na.container.appendChild(la))):(ra=mxRectangle.fromRectangle(Ia),null!=Ia.shape&&null!=Ia.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ia.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ia.cell),null!=Da&&(ra.x-=Da.horizontalOffset/+2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),X.style.left=Math.floor(Ia.getCenterX()-this.triangleUp.width/2)+"px",X.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",T.style.left=Math.floor(ra.x+ra.width)+"px",T.style.top=Math.floor(Ia.getCenterY()-+this.triangleRight.height/2)+"px",N.style.left=X.style.left,N.style.top=Math.floor(ra.y+ra.height)+"px",ca.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",ca.style.top=T.style.top,"eastwest"!=Ia.style.portConstraint&&(na.container.appendChild(X),na.container.appendChild(N)),na.container.appendChild(T),na.container.appendChild(ca));null!=Ia&&(Q=na.selectionCellsHandler.getHandler(Ia.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));W=!0}else for(Ja=[fa,la,X,T,N,ca],ra=0;ra<+Ja.length;ra++)null!=Ja[ra].parentNode&&Ja[ra].parentNode.removeChild(Ja[ra]);W||null==Q||Q.setHandlesVisible(!0);Qa=mxEvent.isAltDown(Ma)&&!mxEvent.isShiftDown(Ma)||null!=K&&V==H?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Qa||null==V&&na.isSplitTarget(Qa,e,Ma)||(Qa=na.getDropTarget(e,Ma,Qa,!0));return Qa});var ma=G.startDrag;G.startDrag=function(na){y.activeDragSource=this;ma.apply(this,arguments)};var La=G.stopDrag;G.stopDrag=function(){La.apply(this,arguments);for(var na=+[fa,la,H,X,T,N,ca],za=0;za<na.length;za++)null!=na[za].parentNode&&na[za].parentNode.removeChild(na[za]);null!=M&&null!=Q&&Q.reset();V=S=K=M=Q=y.activeDragSource=null};return G};Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()){for(var g=b=null,d=0;d<a.length&&(null==g&&e.model.isVertex(a[d])?g=d:null==b&&e.model.isEdge(a[d])&&null==e.model.getTerminal(a[d],!0)&&(b=d),null==g||null==b);d++);d=null==b?g:b;e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,d,f,g,b));e.scrollCellToVisible(e.getSelectionCell())}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),e.updateShapes(a[0],f,!0),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))};Sidebar.prototype.addClickHandler=function(a,b,f,e){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,y=null;b.getGraphForEvent=function(C){return k?g.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));y=a.style.opacity;k=!1;""==y&&(y="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(C){(k=null!=u&&(Math.abs(u.x-@@ -2561,7 +2561,7 @@ this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.Pvar Y=V?O.sourceState.cell:O.getCell();if(null!=Y){var ha=this.getClickableLinkForCell(Y);null!=ha?this.isCustomLink(ha)?this.customLinkClicked(ha,Y):this.openLink(ha):V&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var N=this.tooltipHandler.show;this.tooltipHandler.show=function(){N.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),V=0;V<O.length;V++)null!=O[V].getAttribute("href")&&null==O[V].getAttribute("target")&&O[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var V=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(V?O.sourceState.cell:O.getCell())};var ca=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return ca.apply(this,arguments)};this.selectRegion=function(O,V){var Y=mxEvent.isAltDown(V)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,Y,null,!0);if(this.isToggleEvent(V))for(Y=0;Y<O.length;Y++)this.selectCellForEvent(O[Y],V);else this.selectCellsForEvent(O,V);return O};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,V,Y){return this.graph.isCellSelected(O)?!1:H.apply(this,arguments)};var S=this.updateMouseEvent;this.updateMouseEvent=function(O){O=-S.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(V,Y,ha){return O.state==V||this.isCellLocked(this.getLayerForCell(V.cell))&&null==this.getLinkForCell(V.cell)}))):O.state=null);return O};var ea=this.isCellSelectable;this.isCellSelectable=function(O){return ea.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};+S.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(V,Y,ha){return O.state==V||this.isCellLocked(this.getLayerForCell(V.cell))&&null==this.getLinkForCell(V.cell)}))):O.state=null);return O};var fa=this.isCellSelectable;this.isCellSelectable=function(O){return fa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,V){"mouseDown"==V.getProperty("eventName")&&(O=V.getProperty("event").getState(),la=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,V){if(!mxEvent.isMultiTouchEvent(V)){O=V.getProperty("event");var Y=V.getProperty("cell");null==Y?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),G.start(O.x,O.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(Y)&&this.removeSelectionCell(Y);la=null;V.consume()}}));this.connectionHandler.selectCells=function(O,V){this.graph.setSelectionCell(V||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,V){var Y=O.view.graph;return V&&(Y.isCellSelected(O.cell)||Y.isTableRow(O.cell)&&Y.selectionCellsHandler.isHandled(Y.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};@@ -2595,8 +2595,8 @@ y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=f&&null!=f.pageM.push(J[Q]);M=J=M;if(null!=y.startIndex||0<pageSize&&J.length>pageSize){var K=y.startIndex||0;M=J.slice(Math.max(0,K),Math.min(J.length,K+pageSize))}M=e.getOpposites(M,G).concat(M);var W=w.cloneCells(M);for(Q=0;Q<M.length;Q++)if(W[Q].sourceCellId=M[Q].id,w.model.isEdge(W[Q]))for(W[Q].geometry.x=0,W[Q].geometry.y=0,W[Q].geometry.points=null,W[Q].setStyle(W[Q].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),W[Q].setTerminal(E,null==W[Q].getTerminal(!0)),G=0;G<W[Q].getChildCount();G++){var X=W[Q].getChildAt(G);null!=X.geometry&&X.geometry.relative&&(X.setStyle(X.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),X.geometry.offset=new mxPoint(0,0),X.geometry.y=0,X.geometry.x=.5>X.geometry.x?-.8:.5<X.geometry.x?.8:0)}if(0<y.startIndex){var T=w.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((y.startIndex||0)/pageSize)+"/"+Math.ceil(J.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");T.referenceCell=E;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);W.splice(0,0,T)}if(J.length>(y.startIndex||0)+pageSize){var N=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(J.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");N.referenceCell=E;N.startIndex=(y.startIndex||0)+pageSize;W.splice(0,0,N)}for(var ca in w.getModel().cells){var H=w.getModel().getCell(ca);H!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,-H)&&w.getModel().isVertex(H)&&w.removeCells([H])}w.addCells(W);var S=w.getModel().getGeometry(w.rootCell);null!=S&&(S=S.clone(),S.x=C-S.width/2,S.y=D-S.height/3,w.getModel().setGeometry(w.rootCell,S));y=[];for(ca in w.getModel().cells)H=w.getModel().getCell(ca),H!=w.rootCell&&w.getModel().isVertex(H)&&w.getModel().getParent(H)==w.getDefaultParent()&&(y.push(H),S=w.getModel().getGeometry(H),null!=S&&(S.x=C-S.width/2,S.y=D-S.height/2));var ea=y.length,la=2*Math.PI/ea,O=Math.max(minSize,Math.min(w.container.offsetWidth/-2-40,w.container.offsetHeight/2-80));for(C=0;C<ea;C++)S=w.getModel().getGeometry(y[C]),null!=S&&(S=S.clone(),S.x+=O*Math.sin(C*la),S.y+=O*Math.cos(C*la),w.getModel().setGeometry(y[C],S))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=e.background==mxConstants.NONE||null==e.background?+H)&&w.getModel().isVertex(H)&&w.removeCells([H])}w.addCells(W);var S=w.getModel().getGeometry(w.rootCell);null!=S&&(S=S.clone(),S.x=C-S.width/2,S.y=D-S.height/3,w.getModel().setGeometry(w.rootCell,S));y=[];for(ca in w.getModel().cells)H=w.getModel().getCell(ca),H!=w.rootCell&&w.getModel().isVertex(H)&&w.getModel().getParent(H)==w.getDefaultParent()&&(y.push(H),S=w.getModel().getGeometry(H),null!=S&&(S.x=C-S.width/2,S.y=D-S.height/2));var fa=y.length,la=2*Math.PI/fa,O=Math.max(minSize,Math.min(w.container.offsetWidth/+2-40,w.container.offsetHeight/2-80));for(C=0;C<fa;C++)S=w.getModel().getGeometry(y[C]),null!=S&&(S=S.clone(),S.x+=O*Math.sin(C*la),S.y+=O*Math.cos(C*la),w.getModel().setGeometry(y[C],S))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=e.background==mxConstants.NONE||null==e.background?"light-dark(#ffffff,"+Editor.darkColor+")":e.background;var p=document.createElement("img");p.setAttribute("src",Editor.closeBlackImage);p.style.position="absolute";p.style.cursor="pointer";p.style.right="10px";p.style.top="10px";m.appendChild(p);var k=document.createElement("div");k.style.position="absolute";k.style.cursor="pointer";k.style.right="38px";k.style.top="14px";k.style.textAlign="right";k.style.verticalAlign="top";mxUtils.write(k,mxResources.get("close"));m.appendChild(k);document.body.appendChild(m);var u=function(w){27==w.keyCode&&p.click()};mxEvent.addListener(document,"keydown",u);(function(w){var y=new Graph(w);y.keepEdgesInBackground=!0;y.isCellResizable=function(){return!1};y.isCellRotatable=function(){return!1};y.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};y.getFoldingImage=function(){return null};var C=function(){mxEvent.removeListener(document,"keydown",u);w.parentNode.removeChild(w);e.scrollCellToVisible(g)};mxEvent.addListener(p,"click",C);mxEvent.addListener(k,"click",C);y.setEnabled(!1);var D=y.click;y.click=function(M){var Q=M.getCell(),K=null!=Q?null!=Q.referenceCell?Q.referenceCell:Q:null;null!=Q&&0<y.getEdges(K).length?h(y,Q):D.apply(this,arguments)};C=y.container.offsetWidth/2;var E=y.container.offsetHeight/3;y.model.beginUpdate();var G=y.importCells([g])[0];G.sourceCellId=g.id;G.geometry.x=C-G.geometry.width/2;G.geometry.y=E-G.geometry.height/2;y.model.endUpdate();var J=!1;y.getModel().addListener(mxEvent.CHANGE,function(M,Q){J||(M=Q.getProperty("edit").changes,@@ -2790,8 +2790,8 @@ y)for(var C=null,D=0;D<y.length;D++)if("hidden"!=y[D].getAttribute("visibility")arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var e=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=e.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,y){return g.apply(this,arguments)||null!=w.routedPoints&&null!=y.routedPoints&&!mxUtils.equalPoints(y.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,D=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(la,O,V){var Y=new mxPoint(O,V);Y.type=la;D.push(Y);Y=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==Y||Y.type!=la||Y.x!=O||Y.y!=V},G=.5*this.scale;C=!1;D=[];for(var J=0;J<y.length-1;J++){for(var M=y[J+1],Q=y[J],K=[],W=y[J+2];J<y.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,W.x,W.y,M.x,M.y)<1*this.scale*this.scale;)M=W,J++,W=y[J+2];C=E(0,Q.x,Q.y)||C;for(var X=0;X<this.validEdges.length;X++){var T=this.validEdges[X],N=T.absolutePoints;if(null!=N&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var ca=null;for(T=0;T<N.length-1;T++){var H=N[T+-1],S=N[T];for(W=N[T+2];T<N.length-2&&mxUtils.ptSegDistSq(S.x,S.y,W.x,W.y,H.x,H.y)<1*this.scale*this.scale;)H=W,T++,W=N[T+2];var ea=mxUtils.intersection(Q.x,Q.y,M.x,M.y,S.x,S.y,H.x,H.y);if(null!=ea&&(Math.abs(ea.x-Q.x)>G||Math.abs(ea.y-Q.y)>G)&&(Math.abs(ea.x-M.x)>G||Math.abs(ea.y-M.y)>G)&&(null==ca||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,ca.x,ca.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,S.x,S.y)>G)&&(null==W||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,W.x,W.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,H.x,H.y)>G)){W=-ea.x-Q.x;ca=ea.y-Q.y;ea={distSq:W*W+ca*ca,x:ea.x,y:ea.y};for(W=0;W<K.length;W++)if(K[W].distSq>ea.distSq){K.splice(W,0,ea);ea=null;break}null==ea||0!=K.length&&K[K.length-1].x===ea.x&&K[K.length-1].y===ea.y||K.push(ea)}ca=S}}}for(T=0;T<K.length;T++)C=E(1,K[T].x,K[T].y)||C}ea=y[y.length-1];C=E(0,ea.x,ea.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,C){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||+1],S=N[T];for(W=N[T+2];T<N.length-2&&mxUtils.ptSegDistSq(S.x,S.y,W.x,W.y,H.x,H.y)<1*this.scale*this.scale;)H=W,T++,W=N[T+2];var fa=mxUtils.intersection(Q.x,Q.y,M.x,M.y,S.x,S.y,H.x,H.y);if(null!=fa&&(Math.abs(fa.x-Q.x)>G||Math.abs(fa.y-Q.y)>G)&&(Math.abs(fa.x-M.x)>G||Math.abs(fa.y-M.y)>G)&&(null==ca||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,ca.x,ca.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,S.x,S.y)>G)&&(null==W||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,W.x,W.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,H.x,H.y)>G)){W=+fa.x-Q.x;ca=fa.y-Q.y;fa={distSq:W*W+ca*ca,x:fa.x,y:fa.y};for(W=0;W<K.length;W++)if(K[W].distSq>fa.distSq){K.splice(W,0,fa);fa=null;break}null==fa||0!=K.length&&K[K.length-1].x===fa.x&&K[K.length-1].y===fa.y||K.push(fa)}ca=S}}}for(T=0;T<K.length;T++)C=E(1,K[T].x,K[T].y)||C}fa=y[y.length-1];C=E(0,fa.x,fa.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,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)h.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,M=null,Q=null,K=[],W=null;w.begin();for(var X=0;X<this.state.routedPoints.length;X++){var T=this.state.routedPoints[X],N=new mxPoint(T.x/this.scale,T.y/this.scale);0==X?N=y[0]:X==this.state.routedPoints.length-1&&(N=y[y.length-1]);var ca=!1;if(null!=M&&1==T.type){var H=this.state.routedPoints[X+1];T=H.x/this.scale-N.x;H=H.y/this.scale-N.y;T=T*T+H*H;null==W&&(W=new mxPoint(N.x-M.x,N.y-M.y),Q=Math.sqrt(W.x*W.x+W.y*W.y),0<Q?(W.x=W.x*E/Q,W.y=W.y*E/Q):W=null);T>E*E&&0<Q&&(T=M.x-N.x,H=M.y-N.y,T=T*T+H*H,T>E*E&&(ca=new mxPoint(N.x-W.x,N.y-W.y),T=new mxPoint(N.x+W.x,N.y+W.y),K.push(ca),this.addPoints(w,K,C,D,!1,null,J),K=0>Math.round(W.x)||0==Math.round(W.x)&&0>=Math.round(W.y)?1:-1,J=!1,"sharp"==G?(w.lineTo(ca.x-W.y*K,ca.y+W.x*K),w.lineTo(T.x-W.y*K,T.y+W.x*K),w.lineTo(T.x,T.y)):"line"==G?(w.moveTo(ca.x+W.y*K,ca.y-W.x*K),w.lineTo(ca.x-W.y*K,ca.y+W.x*K),w.moveTo(T.x-W.y*K,T.y+W.x*K),w.lineTo(T.x+W.y*K,T.y-W.x*K),w.moveTo(T.x,T.y)):"arc"==G?(K*=1.3,w.curveTo(ca.x-W.y*K,ca.y+W.x*K,T.x-W.y*K,T.y+W.x*K,T.x,T.y)):(w.moveTo(T.x,T.y),J=!0),K=[T],ca=!0))}else W=null;ca||(K.push(N),M=N)}this.addPoints(w,K,C,D,!1,null,J);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;@@ -2818,85 +2818,86 @@ return q};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStylethis.currentEdgeStyle[A[B]]&&(q+=A[B]+"="+this.currentEdgeStyle[A[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?q+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(q+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?q+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(q+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(q+="elbow="+this.currentEdgeStyle.elbow+";");return q=null!=this.currentEdgeStyle.html?q+("html="+this.currentEdgeStyle.html+";"):q+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var q=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=q&&(new mxCodec(q.ownerDocument)).decode(q,this.getStylesheet())};Graph.prototype.createCellLookup=function(q,A){A=null!=A?A:{};for(var B=0;B<q.length;B++){var F=q[B];A[mxObjectIdentity.get(F)]=F.getId();for(var L=this.model.getChildCount(F),R=0;R<L;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(q,A,B){B=null!=B?B:{};for(var F in q){var L=A[F];null==B[L]&&(B[L]=q[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(q,A,-B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(q.ownerDocument),R=new mxGraphModel;L.decode(q,R);q=[];L={};var Z={},ja=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),L));if(null!=ja){var fa=this.createCellLookup([R.root]);ja=ja.slice();this.model.beginUpdate();try{if(1!=ja.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ja.length;R++)ka=this.model.getChildren(this.moveCells([ja[R]],A,B,!1,this.model.getRoot())[0]),null!=ka&&(q=q.concat(ka));else{var ka=R.getChildren(ja[0]);-null!=ka&&(q=this.moveCells(ka,A,B,!1,this.getDefaultParent()),Z[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(L,fa,Z),this.updateCustomLinks(Z,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(q,!0);null!=va&&this.moveCells(q,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,L=0;L<q.length;L++)F.put(q[L],-!0);var R=new mxCodec,Z=new mxGraphModel,ja=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ja,B[L]);var fa=this.view.getState(q[L]);if(null!=fa){var ka=this.getCellGeometry(B[L]);null!=ka&&ka.relative&&!this.model.isEdge(q[L])&&null==F.get(this.model.getParent(q[L]))&&(ka.offset=null,ka.relative=!1,ka.x=fa.x/fa.view.scale-fa.view.translate.x,ka.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(Z)};Graph.prototype.isSwimlane=+B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(q.ownerDocument),R=new mxGraphModel;L.decode(q,R);q=[];L={};var Z={},ja=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),L));if(null!=ja){var ea=this.createCellLookup([R.root]);ja=ja.slice();this.model.beginUpdate();try{if(1!=ja.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ja.length;R++)ka=this.model.getChildren(this.moveCells([ja[R]],A,B,!1,this.model.getRoot())[0]),null!=ka&&(q=q.concat(ka));else{var ka=R.getChildren(ja[0]);+null!=ka&&(q=this.moveCells(ka,A,B,!1,this.getDefaultParent()),Z[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(L,ea,Z),this.updateCustomLinks(Z,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var xa=this.getBoundingBoxFromGeometry(q,!0);null!=xa&&this.moveCells(q,A-xa.x,B-xa.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,L=0;L<q.length;L++)F.put(q[L],+!0);var R=new mxCodec,Z=new mxGraphModel,ja=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ja,B[L]);var ea=this.view.getState(q[L]);if(null!=ea){var ka=this.getCellGeometry(B[L]);null!=ka&&ka.relative&&!this.model.isEdge(q[L])&&null==F.get(this.model.getParent(q[L]))&&(ka.offset=null,ka.relative=!1,ka.x=ea.x/ea.view.scale-ea.view.translate.x,ka.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(Z)};Graph.prototype.isSwimlane=function(q,A){var B=null;null==q||this.model.isEdge(q)||this.model.getParent(q)==this.model.getRoot()||(B=this.getCurrentCellStyle(q,A)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==B};var m=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(q){return null!=q&&m.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellEditable(this.model.getParent(q)):!0:!1};var p=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(q){return null!=q&&p.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellMovable(this.model.getParent(q)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(q){var A=this.model.getParent(q);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(q,A,B,F,L,R,Z,ja){null==ja&&(ja=this.model.getParent(q),-this.isTable(ja)||this.isTableRow(ja))&&(ja=this.getCellAt(R,Z,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[q,A,B,F,L,R,Z,ja]);this.model.setValue(B,"");var fa=this.getChildCells(B,!0);for(A=0;A<fa.length;A++){var ka=this.getCellGeometry(fa[A]);null!=ka&&ka.relative&&0<ka.x&&this.model.remove(fa[A])}var va=this.getChildCells(q,!0);for(A=0;A<va.length;A++)ka=this.getCellGeometry(va[A]),null!=ka&&ka.relative&&0>=ka.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);-if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,R=[],Z=mxUtils.bind(this,-function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||this.model.isEdge(ja)))if(R.push(ja),ja==F)L=R.length-1;else if(q&&null==F&&0<R.length||null!=L&&q&&R.length>L||!q&&0<L)return;for(var fa=0;fa<this.model.getChildCount(ja);fa++)Z(this.model.getChildAt(ja,fa))});Z(this.model.root);0<R.length&&(L=null!=L?mxUtils.mod(L+(q?1:-1),R.length):0,this.setSelectionCell(R[L]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,-A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);if(null!=B&&null!=F){var L=B.clone(),R=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,L),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var y=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,L,R,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ja=[],fa=0;fa<q.length;fa++)this.isTable(q[fa])?-ja=ja.concat(this.model.getChildCells(q[fa],!0).reverse()):ja.push(q[fa]);q=ja}this.model.beginUpdate();try{ja=[];for(fa=0;fa<q.length;fa++)if(null!=L&&this.isTableRow(q[fa])){var ka=this.model.getParent(q[fa]),va=this.getCellGeometry(q[fa]);this.isTable(ka)&&ja.push(ka);if(null!=ka&&null!=va&&this.isTable(ka)&&this.isTable(L)&&(F||ka!=L)){if(!F){var Ma=this.getCellGeometry(ka);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ka,Ma))}Ma=this.getCellGeometry(L);null!=Ma&&(Ma=Ma.clone(),-Ma.height+=va.height,this.model.setGeometry(L,Ma));var Na=this.model.getChildCells(L,!0);if(0<Na.length){q[fa]=F?this.cloneCell(q[fa]):q[fa];var Aa=this.model.getChildCells(q[fa],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-Aa.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Ta=this.cloneCell(Aa[Aa.length-1]);null!=Ta&&(Ta.value="",this.model.add(q[fa],Ta))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(Aa[Aa.length+ua-1]);Aa=this.model.getChildCells(q[fa],!0);for(ua=0;ua<Ga.length;ua++){var Ra=-this.getCellGeometry(Ga[ua]),Oa=this.getCellGeometry(Aa[ua]);null!=Ra&&null!=Oa&&(Oa=Oa.clone(),Oa.width=Ra.width,this.model.setGeometry(Aa[ua],Oa))}}}}var Sa=y.apply(this,arguments);for(fa=0;fa<ja.length;fa++)!F&&this.model.contains(ja[fa])&&0==this.model.getChildCount(ja[fa])&&this.model.remove(ja[fa]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(q)),Sa)}finally{this.model.endUpdate()}return Sa};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,-A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var L=this.model.getParent(q[F]),R=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var Z=this.model.getChildCells(R,!0),ja=0,fa=0;fa<Z.length;fa++)0<=mxUtils.indexOf(q,-Z[fa])&&ja++;ja==Z.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=-function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var L=q.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||-F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=q.shape.getConstraints(q.style,B,A);if(null!=A)return A;if(null!=q.shape.stencil&&null!=q.shape.stencil.constraints)return q.shape.stencil.constraints;if(null!=q.shape.constraints)return q.shape.constraints}}return null};Graph.prototype.flipEdge=function(q){if(null!=q){var A=this.getCurrentCellStyle(q);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;-this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=this.model.getChildCount(q),B=0,F=0;F<A;F++){var L=this.model.getChildAt(q,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),L=!0,R=!0,Z=0;Z<A.length&&R;Z++)L=L&&this.isTable(A[Z]),R=R&&this.isTableRow(A[Z]);return!this.isCellLocked(q)&&(this.isTargetShape(q,-A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||L))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=-q&&null!=this.layoutManager){var B=this.model.getParent(q);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(q,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(q,A){var B=this.getModel(),F=[];B.beginUpdate();-try{for(var L=0;L<q.length;L++){var R=q[L];if(B.isEdge(R)){var Z=B.getTerminal(R,!0),ja=B.getTerminal(R,!1);B.setTerminal(R,ja,!0);B.setTerminal(R,Z,!1);var fa=B.getGeometry(R);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ka=fa.getTerminalPoint(!0),va=fa.getTerminalPoint(!1);fa.setTerminalPoint(ka,!1);fa.setTerminalPoint(va,!0);B.setGeometry(R,fa);var Ma=this.view.getState(R),Na=this.view.getState(Z),Aa=this.view.getState(ja);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,-Na,!0):null,wa=null!=Aa?this.getConnectionConstraint(Ma,Aa,!1):null;this.setConnectionConstraint(R,Z,!0,wa);this.setConnectionConstraint(R,ja,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(fa=this.getCellGeometry(R),null!=-fa)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Ta=fa.width;fa.width=fa.height;fa.height=Ta;B.setGeometry(R,fa)}var Ra=this.view.getState(R);if(null!=Ra){var Oa=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Sa=mxUtils.getValue(Ra.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,-Oa[mxUtils.mod(mxUtils.indexOf(Oa,Sa)+(A?-1:1),Oa.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=-q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var A=q.cell;this.isTableCell(A)&&(A=this.model.getParent(A));this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=-this.model.getDescendants(q);if(0<q.length)for(var A=0;A<q.length;A++){var B=this.view.getState(q[A]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(q[A]):this.isReplacePlaceholders(q[A])&&this.view.invalidate(q[A],!1,!1)}};Graph.prototype.replaceElement=function(q,A){A=q.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(q.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=-q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<q.length;L++){var R=this.getCurrentCellStyle(q[L]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[L]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var Z=F.getElementsByTagName(null!=-B?B:"*"),ja=0;ja<Z.length;ja++)A(Z[ja]);F.innerHTML!=R&&this.cellLabelChanged(q[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),L=q;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var R=-q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var L=this.model.getParent(q[B]);null==L||A.get(L)||(A.put(L,!0),-F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var R=!0,Z=0;Z<this.model.getChildCount(L.cell)&&R;Z++)A.get(this.model.getChildAt(L.cell,Z))||(R=!1);R&&q.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&-A.push(q[B]);q=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(q,A){this.setAttributeForCell(q,"link",A)};Graph.prototype.setTooltipForCell=function(q,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,B,A)};Graph.prototype.getAttributeForCell=function(q,A,B){q=null!=q.value&&-"object"===typeof q.value?q.value.getAttribute(A):null;return null!=q?q:B};Graph.prototype.setAttributeForCell=function(q,A,B){if(null!=q.value&&"object"==typeof q.value)var F=q.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",q.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(q,F)};Graph.prototype.isTargetShape=function(q,A,B){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(B=0;B<-A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<q.length;L++){var R=this.model.getParent(q[L]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=E.apply(this,arguments);var Z=!0;for(L=0;L<q.length&&Z;L++)Z=Z&&this.isTableRow(q[L]);Z&&(this.isTableCell(R)&&(R=-this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,A){this.isEnabled()&&(A=this.insertTextForEvent(q,A),mxGraph.prototype.dblClick.call(this,q,A))};Graph.prototype.insertTextForEvent=function(q,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));-if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,L=mxEvent.getSource(q);this.firstClickState!=F||this.firstClickSource!=L||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&L==this.view.getCanvas().ownerSVGElement)||-(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),L=this.getPageSize();A=Math.max(A,F.x*L.width);B=Math.max(B,F.y*L.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=-function(){var q=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/q.scale-q.translate.x+(0==A.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(F,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q: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-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,A){q=null!=q?q:"";null!=-A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var L=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*L.x)/1E4;F.geometry.y=Math.round(L.y);-F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-L.x)/R),Math.round((A-L.y)/R))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+=-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ka=0;ka<fa.length;ka++){var va=this.getAbsoluteUrl(fa[ka].getAttribute("href"));null!=va&&(fa[ka].setAttribute("rel",this.linkRelation),-fa[ka].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(fa[ka],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var L=this.container.style.cursor,R=this.getTolerance(),Z=this,ja={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(Z,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ka=fa.sourceState;if(null==ka||null==Z.getLinkForCell(ka.cell))fa=Z.getCellAt(fa.getGraphX(),-fa.getGraphY(),null,null,null,function(va,Ma,Na){return null==Z.getLinkForCell(va.cell)}),ka=null==ka||Z.model.isAncestor(fa,ka.cell)?Z.view.getState(fa):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&-(Z.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(fa,ka){if(Z.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(fa>R||ka>R)&&this.clear());else{for(fa=ka.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=-this.currentState&&null!=ka.sourceState||!Z.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},mouseUp:function(fa,ka){var va=ka.getSource();for(fa=ka.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&&((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&-!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(va=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(fa,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":va?Z.linkTarget:"_top",Z.openLink(this.currentLink,fa),ka.consume())):null!=B&&!ka.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<-R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&Math.abs(this.startX-ka.getGraphX())<R&&Math.abs(this.startY-ka.getGraphY())<R&&B(ka.getEvent()));this.clear()},activate:function(fa){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(fa.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(fa){};Z.addMouseListener(ja);mxEvent.addListener(document,"mouseleave",function(fa){ja.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),L=this.gridSize,R=[];F.beginUpdate();-try{var Z={},ja=this.createCellLookup(q),fa=this.cloneCells(q,!1,Z,!0);for(B=0;B<q.length;B++){var ka=F.getParent(q[B]);if(null!=ka){var va=this.moveCells([fa[B]],L,L,!1)[0];R.push(va);if(A)F.add(ka,fa[B]);else{var Ma=ka.getIndex(q[B]);F.add(ka,fa[B],Ma+1)}if(this.isTable(ka)){var Na=this.getCellGeometry(fa[B]),Aa=this.getCellGeometry(ka);null!=Na&&null!=Aa&&(Aa=Aa.clone(),Aa.height+=Na.height,F.setGeometry(ka,Aa))}}else R.push(fa[B])}this.updateCustomLinks(this.createCellMapping(Z,ja),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,-"cells",fa))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],R=0;R<F.length;R++)L.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==L.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=L[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=-this.cellEditor.textarea)if(0==q.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(q));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);-B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],L=-null,R=null,Z=0,ja=0;ja<A.length;ja++)if(this.getModel().isVertex(A[ja])){var fa=this.view.getState(A[ja]);if(null!=fa){var ka=q?fa.getCenterX():fa.getCenterY();L=null!=L?Math.max(L,ka):ka;R=null!=R?Math.min(R,ka):ka;B&&(Z+=q?fa.width:fa.height);F.push(fa)}}if(2<F.length){F.sort(function(Ga,wa){return q?Ga.x-wa.x:Ga.y-wa.y});B&&(Z-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);fa=this.view.translate;ka=this.view.scale;R=R/ka-(q?fa.x:fa.y);L=L/ka-(q?fa.x:fa.y);this.getModel().beginUpdate();-try{var va=(L-R-Z)/(F.length-1),Ma=R+(B?q?F[0].width/2:F[0].height/2:0);for(ja=1;ja<F.length-1;ja++){var Na=this.view.getState(this.model.getParent(F[ja].cell)),Aa=this.getCellGeometry(F[ja].cell);Ma+=va;null!=Aa&&null!=Na&&(Aa=Aa.clone(),q?Aa.x=Math.round(Ma-(B?0:Aa.width/2))-Na.origin.x:Aa.y=Math.round(Ma-(B?0:Aa.height/2))-Na.origin.y,this.getModel().setGeometry(F[ja].cell,Aa));B&&(Ma+=q?F[ja].width:F[ja].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&-mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=function(q){q=new mxImageExport;q.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var R=B.value.attributes[L];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;-q.visitStatesRecursive=function(B,F,L){if(null!=B){var R=F.root,Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});-return q};Graph.prototype.parseBackgroundImage=function(q){var A=null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,L,R,Z,ja,fa,ka,va,Ma,Na,Aa,Ga,wa){var ua=null;if(null!=Aa)for(ua=new mxDictionary,va=0;va<Aa.length;va++)ua.put(Aa[va],!0);Aa=this.useCssTransforms;var Ta=this.enableFlowAnimation;this.enableFlowAnimation=!1;Aa&&(this.useCssTransforms=!1,this.view.revalidate(),-this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;L=null!=L?L:!0;R=null!=R?R:!0;Z=null!=Z?Z:!0;ka=null!=ka?ka:!1;var Ra="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Oa=this.backgroundImage,Sa=this.view.translate,Xa=this.view.scale;"diagram"==Na&&null!=Oa&&null!=Oa.width&&null!=Oa.height&&(Ra=mxRectangle.fromRectangle(Ra),Ra.add(new mxRectangle((Sa.x+Oa.x)*Xa,(Sa.y+Oa.y)*Xa,Oa.width*Xa,Oa.height*-Xa)));if(null==Ra)throw Error(mxResources.get("drawingEmpty"));F=A/Xa;var kb=Math.max(1,Math.ceil(Ra.width*F)+2*B)+(ka&&0==B?5:0),tb=Math.max(1,Math.ceil(Ra.height*F)+2*B)+(ka&&0==B?5:0);L=L?-.5:0;var ub=mxUtils.getLightDarkColor(q),lb=Graph.createSvgNode(L,L,kb,tb,ub),mb=lb.ownerDocument;if(null!=q){var fb=mxUtils.createElementNs(mb,mxConstants.NS_SVG,"rect");fb.setAttribute("fill",ub.light);fb.style.fill=ub.cssText;fb.setAttribute("width","100%");fb.setAttribute("height","100%");fb.setAttribute("x",-"0");fb.setAttribute("y","0");lb.appendChild(fb)}var nb=mxUtils.createElementNs(mb,mxConstants.NS_SVG,"g");lb.appendChild(nb);var cb=this.createSvgCanvas(nb);cb.translate(Math.floor(B/A-Ra.x/Xa),Math.floor(B/A-Ra.y/Xa));cb.idPrefix="drawio-svg-"+Editor.guid();var vb=document.createElement("div"),wb=cb.getAlternateText;cb.getAlternateText=function(La,ob,ab,jb,hb,Ya,xb,Ab,c,l,t,n,r){if(null!=Ya&&0<this.state.fontSize)try{mxUtils.isNode(Ya)?Ya=Ya.innerText:(vb.innerHTML=Ya,Ya=mxUtils.extractTextWithWhitespace(vb.childNodes));-for(var v=Math.ceil(2*jb/this.state.fontSize),x=[],I=0,z=0;(0==v||I<v)&&z<Ya.length;){var da=Ya.charCodeAt(z);if(10==da||13==da){if(0<I)break}else x.push(Ya.charAt(z)),255>da&&I++;z++}x.length<Ya.length&&1<Ya.length-x.length&&(Ya=mxUtils.trim(x.join(""))+"...");return Ya}catch(U){return wb.apply(this,arguments)}else return wb.apply(this,arguments)};null!=Oa&&null!=Oa.width&&null!=Oa.height&&(q=Xa/A,L=new mxRectangle((Oa.x+Sa.x)*q,(Oa.y+Sa.y)*q,Oa.width*q,Oa.height*q),mxUtils.intersects(Ra,L)&&cb.image(Oa.x+-Sa.x,Oa.y+Sa.y,Oa.width,Oa.height,Oa.src,!0));cb.scale(F);cb.textEnabled=Z;ja=null!=ja?ja:this.createSvgImageExport();var yb=ja.getLinkForCellState;ja.getLinkForCellState=function(La,ob){var ab=La.view.graph.getAbsoluteUrl(yb.apply(this,arguments));return null==ab||La.view.graph.isCustomLink(ab)?null:ab};ja.getLinkTargetForCellState=function(La,ob){return La.view.graph.getLinkTargetForCell(La.cell)};var sb=ja.drawCellState,qb=null,rb=mxUtils.bind(this,function(){if(null==qb){qb="ge-flow-animation-"+-Editor.guid();var La=null!=mb.createElementNS?mb.createElementNS(mxConstants.NS_SVG,"style"):mb.createElement("style");La.innerHTML=this.createFlowAnimationCss(qb);mb.getElementsByTagName("defs")[0].appendChild(La)}return qb});ja.drawCellState=function(La,ob){for(var ab=La.view.graph,jb=null!=ua?ua.get(La.cell):ab.isCellSelected(La.cell),hb=ab.model.getParent(La.cell);!(R&&null==ua||jb)&&null!=hb;)jb=null!=ua?ua.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);if(null!=La.shape)try{var Ya=-La.shape.isFlowAnimationEnabled,xb=La.shape.addFlowAnimationToShape;La.shape.isFlowAnimationEnabled=function(){return Ta&&ab.model.isEdge(La.cell)&&"1"==mxUtils.getValue(La.style,"flowAnimation","0")};La.shape.addFlowAnimationToShape=function(){ab.addFlowAnimationToNode(this.getFlowAnimationPath(),La.style,A,rb())};if(R&&null==ua||jb)ab.view.redrawEnumerationState(La),sb.apply(this,arguments),this.doDrawShape(La.secondLabel,ob)}finally{La.shape.isFlowAnimationEnabled=Ya,La.shape.addFlowAnimationToShape=-xb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ja.drawState(this.getView().getState(ib),cb);this.addForeignObjectWarning(cb,lb);wa?this.disableSvgLinks(lb):this.updateSvgLinks(lb,fa,!0);return lb}finally{this.enableFlowAnimation=Ta,Aa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),-F=q.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var L=q.createElement("a");L.setAttribute("transform","translate(0,-5)");null==L.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(L.setAttribute("xlink:href",Graph.foreignObjectWarningLink),L.setAttribute("target","_blank")):(L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),L.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=-q.createElement("text");q.setAttribute("text-anchor","middle");q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);L.appendChild(q);B.appendChild(L);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",-""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var L=q[F].getAttribute("href");null==L&&(L=q[F].getAttribute("xlink:href"));null!=L&&(null!=A&&/^https?:\/\//.test(L)?q[F].setAttribute("target",A):B&&this.isCustomLink(L)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);q.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;-q.adaptiveColors=this.getAdaptiveColors();q.pointerEvents=!0;return q};Graph.prototype.getSelectedElement=function(){var q=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(q=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(q=document.selection.createRange().parentElement());return q};Graph.prototype.getSelectedEditingElement=function(){var q=null;if(null!=this.cellEditor.textarea)for(q=this.getSelectedElement();null!=q&&q.nodeType!=mxConstants.NODETYPE_ELEMENT;)q=-q.parentNode;return q};Graph.prototype.getParentByName=function(q,A,B){for(;null!=q&&q.nodeName!=A;){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.getParentByNames=function(q,A,B){for(;null!=q&&!(0<=mxUtils.indexOf(A,q.nodeName));){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.selectNode=function(q){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(q);A.removeAllRanges();A.addRange(B)}}else(A=-document.selection)&&"Control"!=A.type&&(q=A.createRange(),q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=-function(q,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(q),L=0;L<F;L++){var R=this.model.getChildAt(q,L);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var Z=this.getCellGeometry(R);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(R,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var L=-this.view.getState(q[F]);null!=L&&this.flipEdgePoints(q[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();-try{for(var F=0;F<q.length;F++){var L=this.model.getParent(q[F]);if(this.isTable(L)){var R=this.getCellGeometry(q[F]),Z=this.getCellGeometry(L);null!=R&&null!=Z&&(Z=Z.clone(),Z.height-=R.height,this.model.setGeometry(L,Z))}}var ja=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=ja)for(B=[],F=0;F<ja.length;F++)this.model.contains(ja[F])&&(this.model.isVertex(ja[F])||this.model.isEdge(ja[F]))&&B.push(ja[F])}return B};Graph.prototype.insertTableColumn=-function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);L=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(q,!0).length-1);var Z=B.getChildCells(F,!0),ja=Graph.minTableColumnWidth;for(q=0;q<Z.length;q++){var fa=B.getChildCells(Z[q],!0)[L],ka=B.cloneCell(fa,!1);null==ka&&(ka=this.createVertex());var va=this.getCellGeometry(ka);ka.value=null;ka.style=-mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);ja=va.width;var Ma=this.getCellGeometry(Z[q]);null!=Ma&&(va.height=Ma.height)}B.add(Z[q],ka,L+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=ja,B.setGeometry(F,Na))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();+this.isTable(ja)||this.isTableRow(ja))&&(ja=this.getCellAt(R,Z,null,!0,!1));B=null;this.model.beginUpdate();try{var ea=this.getCellGeometry(q);if(null!=ea&&null!=ea.points&&0<ea.points.length&&1==A.length&&this.model.isVertex(A[0])){var ka=this.getCellGeometry(A[0]);if(null!=ka&&!ka.relative){var xa=new mxRectangle(ka.x+F,ka.y+L,ka.width,ka.height),Ka=ea.points;ka=[];for(var Ha=0;Ha<Ka.length;Ha++)xa.intersectsPoint(Ka[Ha].x,Ka[Ha].y)||ka.push(Ka[Ha]);ka.length<Ka.length&&(ea=ea.clone(),ea.points=+ka,this.model.setGeometry(q,ea))}}B=u.apply(this,[q,A,B,F,L,R,Z,ja]);this.model.setValue(B,"");var ya=this.getChildCells(B,!0);for(Ha=0;Ha<ya.length;Ha++)ea=this.getCellGeometry(ya[Ha]),null!=ea&&ea.relative&&0<ea.x&&this.model.remove(ya[Ha]);var Fa=this.getChildCells(q,!0);for(Ha=0;Ha<Fa.length;Ha++)ea=this.getCellGeometry(Fa[Ha]),null!=ea&&ea.relative&&0>=ea.x&&this.model.remove(Fa[Ha]);var va=this.model.getTerminal(B,!1);if(null!=va){var ua=this.getCurrentCellStyle(va);null!=ua&&"1"==ua.snapToPoint&&+(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,R=[],Z=mxUtils.bind(this,function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||+this.model.isEdge(ja)))if(R.push(ja),ja==F)L=R.length-1;else if(q&&null==F&&0<R.length||null!=L&&q&&R.length>L||!q&&0<L)return;for(var ea=0;ea<this.model.getChildCount(ja);ea++)Z(this.model.getChildAt(ja,ea))});Z(this.model.root);0<R.length&&(L=null!=L?mxUtils.mod(L+(q?1:-1),R.length):0,this.setSelectionCell(R[L]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);+if(null!=B&&null!=F){var L=B.clone(),R=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,L),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var y=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,L,R,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ja=[],ea=0;ea<q.length;ea++)this.isTable(q[ea])?ja=ja.concat(this.model.getChildCells(q[ea],+!0).reverse()):ja.push(q[ea]);q=ja}this.model.beginUpdate();try{ja=[];for(ea=0;ea<q.length;ea++)if(null!=L&&this.isTableRow(q[ea])){var ka=this.model.getParent(q[ea]),xa=this.getCellGeometry(q[ea]);this.isTable(ka)&&ja.push(ka);if(null!=ka&&null!=xa&&this.isTable(ka)&&this.isTable(L)&&(F||ka!=L)){if(!F){var Ka=this.getCellGeometry(ka);null!=Ka&&(Ka=Ka.clone(),Ka.height-=xa.height,this.model.setGeometry(ka,Ka))}Ka=this.getCellGeometry(L);null!=Ka&&(Ka=Ka.clone(),Ka.height+=xa.height,this.model.setGeometry(L,+Ka));var Ha=this.model.getChildCells(L,!0);if(0<Ha.length){q[ea]=F?this.cloneCell(q[ea]):q[ea];var ya=this.model.getChildCells(q[ea],!0),Fa=this.model.getChildCells(Ha[0],!0),va=Fa.length-ya.length;if(0<va)for(var ua=0;ua<va;ua++){var Ta=this.cloneCell(ya[ya.length-1]);null!=Ta&&(Ta.value="",this.model.add(q[ea],Ta))}else if(0>va)for(ua=0;ua>va;ua--)this.model.remove(ya[ya.length+ua-1]);ya=this.model.getChildCells(q[ea],!0);for(ua=0;ua<Fa.length;ua++){var Ra=this.getCellGeometry(Fa[ua]),Oa=this.getCellGeometry(ya[ua]);+null!=Ra&&null!=Oa&&(Oa=Oa.clone(),Oa.width=Ra.width,this.model.setGeometry(ya[ua],Oa))}}}}var Sa=y.apply(this,arguments);for(ea=0;ea<ja.length;ea++)!F&&this.model.contains(ja[ea])&&0==this.model.getChildCount(ja[ea])&&this.model.remove(ja[ea]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(q)),Sa)}finally{this.model.endUpdate()}return Sa};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var L=+this.model.getParent(q[F]),R=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var Z=this.model.getChildCells(R,!0),ja=0,ea=0;ea<Z.length;ea++)0<=mxUtils.indexOf(q,Z[ea])&&ja++;ja==Z.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};+Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,+"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var L=q.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=q.shape.getConstraints(q.style,B,A);if(null!=A)return A;if(null!=+q.shape.stencil&&null!=q.shape.stencil.constraints)return q.shape.stencil.constraints;if(null!=q.shape.constraints)return q.shape.constraints}}return null};Graph.prototype.flipEdge=function(q){if(null!=q){var A=this.getCurrentCellStyle(q);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=+this.model.getChildCount(q),B=0,F=0;F<A;F++){var L=this.model.getChildAt(q,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),L=!0,R=!0,Z=0;Z<A.length&&R;Z++)L=L&&this.isTable(A[Z]),R=R&&this.isTableRow(A[Z]);return!this.isCellLocked(q)&&(this.isTargetShape(q,A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget",+"1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||L))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=q&&null!=this.layoutManager){var B=this.model.getParent(q);null!=B&&(B=this.layoutManager.getLayout(B),+null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(q,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(q,A){var B=this.getModel(),F=[];B.beginUpdate();try{for(var L=0;L<q.length;L++){var R=q[L];if(B.isEdge(R)){var Z=B.getTerminal(R,!0),ja=B.getTerminal(R,+!1);B.setTerminal(R,ja,!0);B.setTerminal(R,Z,!1);var ea=B.getGeometry(R);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ka=ea.getTerminalPoint(!0),xa=ea.getTerminalPoint(!1);ea.setTerminalPoint(ka,!1);ea.setTerminalPoint(xa,!0);B.setGeometry(R,ea);var Ka=this.view.getState(R),Ha=this.view.getState(Z),ya=this.view.getState(ja);if(null!=Ka){var Fa=null!=Ha?this.getConnectionConstraint(Ka,Ha,!0):null,va=null!=ya?this.getConnectionConstraint(Ka,ya,!1):null;this.setConnectionConstraint(R,+Z,!0,va);this.setConnectionConstraint(R,ja,!1,Fa);var ua=mxUtils.getValue(Ka.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ka.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(ea=this.getCellGeometry(R),null!=ea)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){ea=ea.clone();+ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ta=ea.width;ea.width=ea.height;ea.height=Ta;B.setGeometry(R,ea)}var Ra=this.view.getState(R);if(null!=Ra){var Oa=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Sa=mxUtils.getValue(Ra.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Oa[mxUtils.mod(mxUtils.indexOf(Oa,Sa)+(A?-1:1),Oa.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};+Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var A=q.cell;this.isTableCell(A)&&(A=this.model.getParent(A));+this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var A=0;A<q.length;A++){var B=this.view.getState(q[A]);null!=B&&null!=B.shape&&+null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(q[A]):this.isReplacePlaceholders(q[A])&&this.view.invalidate(q[A],!1,!1)}};Graph.prototype.replaceElement=function(q,A){A=q.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(q.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");+for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<q.length;L++){var R=this.getCurrentCellStyle(q[L]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[L]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var Z=F.getElementsByTagName(null!=B?B:"*"),ja=0;ja<Z.length;ja++)A(Z[ja]);F.innerHTML!=R&&this.cellLabelChanged(q[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=+function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),L=q;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var R=q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?+R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var L=this.model.getParent(q[B]);null==L||A.get(L)||(A.put(L,!0),F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&+this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var R=!0,Z=0;Z<this.model.getChildCount(L.cell)&&R;Z++)A.get(this.model.getChildAt(L.cell,Z))||(R=!1);R&&q.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&A.push(q[B]);q=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=+function(q,A){this.setAttributeForCell(q,"link",A)};Graph.prototype.setTooltipForCell=function(q,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,B,A)};Graph.prototype.getAttributeForCell=function(q,A,B){q=null!=q.value&&"object"===typeof q.value?q.value.getAttribute(A):null;return null!=q?q:B};Graph.prototype.setAttributeForCell=function(q,+A,B){if(null!=q.value&&"object"==typeof q.value)var F=q.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",q.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(q,F)};Graph.prototype.isTargetShape=function(q,A,B){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(B=0;B<A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,+q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<q.length;L++){var R=this.model.getParent(q[L]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=E.apply(this,arguments);var Z=!0;for(L=0;L<q.length&&Z;L++)Z=Z&&this.isTableRow(q[L]);Z&&(this.isTableCell(R)&&(R=this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=+function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,A){this.isEnabled()&&(A=this.insertTextForEvent(q,A),mxGraph.prototype.dblClick.call(this,q,A))};Graph.prototype.insertTextForEvent=function(q,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,L=mxEvent.getSource(q);+this.firstClickState!=F||this.firstClickSource!=L||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&L==this.view.getCanvas().ownerSVGElement)||(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=+function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),L=this.getPageSize();A=Math.max(A,F.x*L.width);B=Math.max(B,F.y*L.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=function(){var q=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/q.scale-q.translate.x++(0==A.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(F,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q: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-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-+this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,A){q=null!=q?q:"";null!=A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=+new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var L=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*L.x)/1E4;F.geometry.y=Math.round(L.y);F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-+L.x)/R),Math.round((A-L.y)/R))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted",+"cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ka=0;ka<ea.length;ka++){var xa=this.getAbsoluteUrl(ea[ka].getAttribute("href"));null!=xa&&(ea[ka].setAttribute("rel",this.linkRelation),ea[ka].setAttribute("href",xa),null!=A&&mxEvent.addGestureListeners(ea[ka],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);+F();var L=this.container.style.cursor,R=this.getTolerance(),Z=this,ja={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(Z,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ka=ea.sourceState;if(null==ka||null==Z.getLinkForCell(ka.cell))ea=Z.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(xa,Ka,Ha){return null==Z.getLinkForCell(xa.cell)}),ka=null==ka||Z.model.isAncestor(ea,ka.cell)?+Z.view.getState(ea):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&(Z.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(ea,ka){if(Z.isMouseDown)null!=this.currentLink&&+(ea=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(ea>R||ka>R)&&this.clear());else{for(ea=ka.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=this.currentState&&null!=ka.sourceState||!Z.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},+mouseUp:function(ea,ka){var xa=ka.getSource();for(ea=ka.getEvent();null!=xa&&"a"!=xa.nodeName.toLowerCase();)xa=xa.parentNode;null==xa&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&&((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(xa=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,+5)&&xa||null==A||A(ea,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":xa?Z.linkTarget:"_top",Z.openLink(this.currentLink,ea),ka.consume())):null!=B&&!ka.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&Math.abs(this.startX-ka.getGraphX())<R&&Math.abs(this.startY-ka.getGraphY())<R&&B(ka.getEvent()));+this.clear()},activate:function(ea){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(ea.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(ea){};+Z.addMouseListener(ja);mxEvent.addListener(document,"mouseleave",function(ea){ja.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),L=this.gridSize,R=[];F.beginUpdate();try{var Z={},ja=this.createCellLookup(q),ea=this.cloneCells(q,!1,Z,!0);for(B=0;B<q.length;B++){var ka=F.getParent(q[B]);if(null!=ka){var xa=+this.moveCells([ea[B]],L,L,!1)[0];R.push(xa);if(A)F.add(ka,ea[B]);else{var Ka=ka.getIndex(q[B]);F.add(ka,ea[B],Ka+1)}if(this.isTable(ka)){var Ha=this.getCellGeometry(ea[B]),ya=this.getCellGeometry(ka);null!=Ha&&null!=ya&&(ya=ya.clone(),ya.height+=Ha.height,F.setGeometry(ka,ya))}}else R.push(ea[B])}this.updateCustomLinks(this.createCellMapping(Z,ja),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ea))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=+q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],R=0;R<F.length;R++)L.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==L.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=L[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=this.cellEditor.textarea)if(0==q.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=+this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(q));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=+function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],L=null,R=null,Z=0,ja=0;ja<A.length;ja++)if(this.getModel().isVertex(A[ja])){var ea=this.view.getState(A[ja]);if(null!=ea){var ka=+q?ea.getCenterX():ea.getCenterY();L=null!=L?Math.max(L,ka):ka;R=null!=R?Math.min(R,ka):ka;B&&(Z+=q?ea.width:ea.height);F.push(ea)}}if(2<F.length){F.sort(function(Fa,va){return q?Fa.x-va.x:Fa.y-va.y});B&&(Z-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);ea=this.view.translate;ka=this.view.scale;R=R/ka-(q?ea.x:ea.y);L=L/ka-(q?ea.x:ea.y);this.getModel().beginUpdate();try{var xa=(L-R-Z)/(F.length-1),Ka=R+(B?q?F[0].width/2:F[0].height/2:0);for(ja=1;ja<F.length-1;ja++){var Ha=+this.view.getState(this.model.getParent(F[ja].cell)),ya=this.getCellGeometry(F[ja].cell);Ka+=xa;null!=ya&&null!=Ha&&(ya=ya.clone(),q?ya.x=Math.round(Ka-(B?0:ya.width/2))-Ha.origin.x:ya.y=Math.round(Ka-(B?0:ya.height/2))-Ha.origin.y,this.getModel().setGeometry(F[ja].cell,ya));B&&(Ka+=q?F[ja].width:F[ja].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=+function(q){q=new mxImageExport;q.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var R=B.value.attributes[L];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;q.visitStatesRecursive=function(B,F,L){if(null!=B){var R=F.root,+Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});return q};Graph.prototype.parseBackgroundImage=function(q){var A=+null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,L,R,Z,ja,ea,ka,xa,Ka,Ha,ya,Fa,va){var ua=null;if(null!=ya)for(ua=new mxDictionary,xa=0;xa<ya.length;xa++)ua.put(ya[xa],!0);ya=this.useCssTransforms;var Ta=this.enableFlowAnimation;this.enableFlowAnimation=!1;ya&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{A=null!=A?A:1;B=null!=+B?B:0;L=null!=L?L:!0;R=null!=R?R:!0;Z=null!=Z?Z:!0;ka=null!=ka?ka:!1;var Ra="page"==Ha?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Ha?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Oa=this.backgroundImage,Sa=this.view.translate,Xa=this.view.scale;"diagram"==Ha&&null!=Oa&&null!=Oa.width&&null!=Oa.height&&(Ra=mxRectangle.fromRectangle(Ra),Ra.add(new mxRectangle((Sa.x+Oa.x)*Xa,(Sa.y+Oa.y)*Xa,Oa.width*Xa,Oa.height*Xa)));if(null==Ra)throw Error(mxResources.get("drawingEmpty"));+F=A/Xa;var kb=Math.max(1,Math.ceil(Ra.width*F)+2*B)+(ka&&0==B?5:0),tb=Math.max(1,Math.ceil(Ra.height*F)+2*B)+(ka&&0==B?5:0);L=L?-.5:0;var ub=mxUtils.getLightDarkColor(q),lb=Graph.createSvgNode(L,L,kb,tb,ub),mb=lb.ownerDocument;if(null!=q){var fb=mxUtils.createElementNs(mb,mxConstants.NS_SVG,"rect");fb.setAttribute("fill",ub.light);fb.style.fill=ub.cssText;fb.setAttribute("width","100%");fb.setAttribute("height","100%");fb.setAttribute("x","0");fb.setAttribute("y","0");lb.appendChild(fb)}var nb=mxUtils.createElementNs(mb,+mxConstants.NS_SVG,"g");lb.appendChild(nb);var cb=this.createSvgCanvas(nb);cb.translate(Math.floor(B/A-Ra.x/Xa),Math.floor(B/A-Ra.y/Xa));cb.idPrefix="drawio-svg-"+Editor.guid();var vb=document.createElement("div"),wb=cb.getAlternateText;cb.getAlternateText=function(Na,ob,ab,jb,hb,Ya,xb,Ab,c,l,t,n,r){if(null!=Ya&&0<this.state.fontSize)try{mxUtils.isNode(Ya)?Ya=Ya.innerText:(vb.innerHTML=Ya,Ya=mxUtils.extractTextWithWhitespace(vb.childNodes));for(var v=Math.ceil(2*jb/this.state.fontSize),x=[],I=0,z=+0;(0==v||I<v)&&z<Ya.length;){var da=Ya.charCodeAt(z);if(10==da||13==da){if(0<I)break}else x.push(Ya.charAt(z)),255>da&&I++;z++}x.length<Ya.length&&1<Ya.length-x.length&&(Ya=mxUtils.trim(x.join(""))+"...");return Ya}catch(U){return wb.apply(this,arguments)}else return wb.apply(this,arguments)};null!=Oa&&null!=Oa.width&&null!=Oa.height&&(q=Xa/A,L=new mxRectangle((Oa.x+Sa.x)*q,(Oa.y+Sa.y)*q,Oa.width*q,Oa.height*q),mxUtils.intersects(Ra,L)&&cb.image(Oa.x+Sa.x,Oa.y+Sa.y,Oa.width,Oa.height,Oa.src,!0));+cb.scale(F);cb.textEnabled=Z;ja=null!=ja?ja:this.createSvgImageExport();var yb=ja.getLinkForCellState;ja.getLinkForCellState=function(Na,ob){var ab=Na.view.graph.getAbsoluteUrl(yb.apply(this,arguments));return null==ab||Na.view.graph.isCustomLink(ab)?null:ab};ja.getLinkTargetForCellState=function(Na,ob){return Na.view.graph.getLinkTargetForCell(Na.cell)};var sb=ja.drawCellState,qb=null,rb=mxUtils.bind(this,function(){if(null==qb){qb="ge-flow-animation-"+Editor.guid();var Na=null!=mb.createElementNS?+mb.createElementNS(mxConstants.NS_SVG,"style"):mb.createElement("style");Na.innerHTML=this.createFlowAnimationCss(qb);mb.getElementsByTagName("defs")[0].appendChild(Na)}return qb});ja.drawCellState=function(Na,ob){for(var ab=Na.view.graph,jb=null!=ua?ua.get(Na.cell):ab.isCellSelected(Na.cell),hb=ab.model.getParent(Na.cell);!(R&&null==ua||jb)&&null!=hb;)jb=null!=ua?ua.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);if(null!=Na.shape)try{var Ya=Na.shape.isFlowAnimationEnabled,xb=Na.shape.addFlowAnimationToShape;+Na.shape.isFlowAnimationEnabled=function(){return Ta&&ab.model.isEdge(Na.cell)&&"1"==mxUtils.getValue(Na.style,"flowAnimation","0")};Na.shape.addFlowAnimationToShape=function(){ab.addFlowAnimationToNode(this.getFlowAnimationPath(),Na.style,A,rb())};if(R&&null==ua||jb)ab.view.redrawEnumerationState(Na),sb.apply(this,arguments),this.doDrawShape(Na.secondLabel,ob)}finally{Na.shape.isFlowAnimationEnabled=Ya,Na.shape.addFlowAnimationToShape=xb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:+this.model.root;ja.drawState(this.getView().getState(ib),cb);this.addForeignObjectWarning(cb,lb);va?this.disableSvgLinks(lb):this.updateSvgLinks(lb,ea,!0);return lb}finally{this.enableFlowAnimation=Ta,ya&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),F=q.createElement("g");F.setAttribute("requiredFeatures",+"http://www.w3.org/TR/SVG11/feature#Extensibility");var L=q.createElement("a");L.setAttribute("transform","translate(0,-5)");null==L.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(L.setAttribute("xlink:href",Graph.foreignObjectWarningLink),L.setAttribute("target","_blank")):(L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),L.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=q.createElement("text");q.setAttribute("text-anchor","middle");+q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);L.appendChild(q);B.appendChild(L);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=+function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var L=q[F].getAttribute("href");null==L&&(L=q[F].getAttribute("xlink:href"));null!=L&&(null!=A&&/^https?:\/\//.test(L)?q[F].setAttribute("target",A):B&&this.isCustomLink(L)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);q.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;q.adaptiveColors=this.getAdaptiveColors();q.pointerEvents=+!0;return q};Graph.prototype.getSelectedElement=function(){var q=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(q=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(q=document.selection.createRange().parentElement());return q};Graph.prototype.getSelectedEditingElement=function(){var q=null;if(null!=this.cellEditor.textarea)for(q=this.getSelectedElement();null!=q&&q.nodeType!=mxConstants.NODETYPE_ELEMENT;)q=q.parentNode;return q};Graph.prototype.getParentByName=+function(q,A,B){for(;null!=q&&q.nodeName!=A;){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.getParentByNames=function(q,A,B){for(;null!=q&&!(0<=mxUtils.indexOf(A,q.nodeName));){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.selectNode=function(q){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(q);A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(q=A.createRange(),+q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=function(q,A,B){this.model.beginUpdate();+try{for(var F=this.model.getChildCount(q),L=0;L<F;L++){var R=this.model.getChildAt(q,L);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var Z=this.getCellGeometry(R);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(R,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var L=this.view.getState(q[F]);null!=+L&&this.flipEdgePoints(q[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();try{for(var F=+0;F<q.length;F++){var L=this.model.getParent(q[F]);if(this.isTable(L)){var R=this.getCellGeometry(q[F]),Z=this.getCellGeometry(L);null!=R&&null!=Z&&(Z=Z.clone(),Z.height-=R.height,this.model.setGeometry(L,Z))}}var ja=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=ja)for(B=[],F=0;F<ja.length;F++)this.model.contains(ja[F])&&(this.model.isVertex(ja[F])||this.model.isEdge(ja[F]))&&B.push(ja[F])}return B};Graph.prototype.insertTableColumn=+function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);L=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(q,!0).length-1);var Z=B.getChildCells(F,!0),ja=Graph.minTableColumnWidth;for(q=0;q<Z.length;q++){var ea=B.getChildCells(Z[q],!0)[L],ka=B.cloneCell(ea,!1);null==ka&&(ka=this.createVertex());var xa=this.getCellGeometry(ka);ka.value=null;ka.style=+mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=xa){null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null);ja=xa.width;var Ka=this.getCellGeometry(Z[q]);null!=Ka&&(xa.height=Ka.height)}B.add(Z[q],ka,L+(A?0:1))}var Ha=this.getCellGeometry(F);null!=Ha&&(Ha=Ha.clone(),Ha.width+=ja,B.setGeometry(F,Ha))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(q).childLayout?q:A.getParent(q);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==q&&(q=F[F.length-1]),A.remove(q))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(q).childLayout){F=q;var L=B.getChildCells(F,!0);q=L[A?0:L.length-1]}else F=B.getParent(q);var R=F.getIndex(q);q=B.cloneCell(q,!1);q.value=null;B.add(F,q,R+(A?0:1))}finally{B.endUpdate()}};-Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=q;if(this.isTableCell(q))L=B.getParent(q),F=B.getParent(L);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);L=R[A?0:R.length-1]}var Z=B.getChildCells(L,!0),ja=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var fa=this.getCellGeometry(L);if(null!=fa){for(R=0;R<Z.length;R++){q=B.cloneCell(Z[R],!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),-"colspan",null);var ka=this.getCellGeometry(q);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height=fa.height);L.insert(q)}B.add(F,L,ja+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=fa.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&-(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var Z=R.length-1;this.isTableCell(q)&&(Z=mxUtils.indexOf(R,q));for(F=q=0;F<L.length;F++){var ja=A.getChildCells(L[F],!0)[Z];A.remove(ja);var fa=this.getCellGeometry(ja);null!=fa&&(q=Math.max(q,fa.width))}var ka=this.getCellGeometry(B);null!=ka&&(ka=ka.clone(),ka.width-=q,A.setGeometry(B,ka))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=+Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=q;if(this.isTableCell(q))L=B.getParent(q),F=B.getParent(L);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);L=R[A?0:R.length-1]}var Z=B.getChildCells(L,!0),ja=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var ea=this.getCellGeometry(L);if(null!=ea){for(R=0;R<Z.length;R++){q=B.cloneCell(Z[R],!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),+"colspan",null);var ka=this.getCellGeometry(q);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height=ea.height);L.insert(q)}B.add(F,L,ja+(A?0:1));var xa=this.getCellGeometry(F);null!=xa&&(xa=xa.clone(),xa.height+=ea.height,B.setGeometry(F,xa))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&+(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var Z=R.length-1;this.isTableCell(q)&&(Z=mxUtils.indexOf(R,q));for(F=q=0;F<L.length;F++){var ja=A.getChildCells(L[F],!0)[Z];A.remove(ja);var ea=this.getCellGeometry(ja);null!=ea&&(q=Math.max(q,ea.width))}var ka=this.getCellGeometry(B);null!=ka&&(ka=ka.clone(),ka.width-=q,A.setGeometry(B,ka))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(q=F=A.getParent(q));this.isTableRow(q)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(1>=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);q=0;var R=this.getCellGeometry(F);null!=R&&(q=R.height);var Z=this.getCellGeometry(B);null!=Z&&(Z=Z.clone(),Z.height-=q,A.setGeometry(B,Z))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(q,A){for(var B=q.tBodies[0],F=B.rows[0].cells,L=q=0;L<F.length;L++){var R=F[L].getAttribute("colspan");q+=null!=R?parseInt(R):1}A=B.insertRow(A);for(L=0;L<q;L++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(q,A){q.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(q,A){var B=q.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var L=document.createElement("th");B.rows[F].appendChild(L);mxUtils.br(L)}q=q.tBodies[0];for(B=0;B<q.rows.length;B++)F=q.rows[B].insertCell(A),mxUtils.br(F);return q.rows[0].cells[0<=A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=A){q=q.tBodies[0].rows;for(var B=0;B<q.length;B++)q[B].cells.length>A&&q[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(q){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=q;q=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=q.appendChild(F);A.insertNode(q)}}else(A=document.selection)&&@@ -2904,19 +2905,19 @@ A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=q,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(q)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(R){this.customLinkClicked(q,B);mxEvent.consume(R)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(R,Z){this.popupMenuHandler.hideMenu()});var q=this.updateMouseEvent;this.updateMouseEvent=function(R){R=q.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var Z=this.getCellAt(R.graphX,R.graphY);null!=Z&&this.isSwimlane(Z)&&this.hitsSwimlaneContent(Z,R.graphX,R.graphY)||(R.state=this.view.getState(Z),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(R,Z,ja){R==mxEvent.MOUSE_DOWN&&(Z=this.updateMouseEvent(Z),A=this.isCellSelected(Z.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,Z){if(null!=this.freehand&&!this.freehand.isDrawing()){var ja=mxEvent.isMouseEvent(Z.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==Z.getState()||!Z.isSource(Z.getState().control))&&(this.popupMenuHandler.popupTrigger||-!F&&!ja&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ka.x+1,Z.getY()+ka.y+1,fa,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[R,Z,ja])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};+!F&&!ja&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ka.x+1,Z.getY()+ka.y+1,ea,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[R,Z,ja])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};mxCellEditor.prototype.isContentEditing=function(){var q=this.graph.view.getState(this.editingCell);return null!=q&&1==q.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var q="";window.getSelection?q=window.getSelection():document.getSelection?q=document.getSelection():document.selection&&(q=document.selection.createRange().text);return""!=q};mxCellEditor.prototype.insertTab=function(q){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);q=Graph.createTabNode(q);B.insertNode(q);B.setStartAfter(q);B.setEndAfter(q);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(q,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(Z){L||F||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),Z.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=[],B=0,F=q.rangeCount;B<F;++B)A.push(q.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(q){try{if(q)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=q.length;A<B;++A)sel.addRange(q[A])}else document.selection&&q.select&&q.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(q,A){q=this.graph.getStartEditingCell(q,A);M.apply(this,arguments);var B=this.graph.view.getState(q);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(q)};mxCellEditor.prototype.toggleViewMode=function(){var q=this.graph.view.getState(this.editingCell);-if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ja=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ja.length&&"\n"==ja.charAt(ja.length-1)&&(ja=ja.substring(0,ja.length-1));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"<br/>"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);+if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ja=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ja.length&&"\n"==ja.charAt(ja.length-1)&&(ja=ja.substring(0,ja.length-1));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"<br/>"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,Z=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Z.push("underline");-(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=+(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,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 ja=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ja=mxUtils.replaceTrailingNewlines(ja,"<div><br></div>"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=-Math.round(fa)+"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!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=+Graph.backupStyleAttribute);var ja=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ja=mxUtils.replaceTrailingNewlines(ja,"<div><br></div>"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=+Math.round(ea)+"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!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(q,A){if(null!=this.textarea)if(q=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=q){var B=q.view.scale;this.bounds=mxRectangle.fromRectangle(q);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=q.text?q.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(q.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/B)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*B);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/B)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*B);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("+B+","+B+")")}else this.textarea.style.height=@@ -2931,18 +2932,18 @@ function(q,A){X.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==this.graph.model.setGeometry(F,L)}}};var T=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=T.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],R=0;R<A.length;R++){var Z=A[R];this.graph.isTableCell(Z)?q(F.getParent(F.getParent(Z))):this.graph.isTableRow(Z)&&q(F.getParent(Z));q(Z)}return L};var N=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(q){return N.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.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 H=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(q){var A=H.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var S=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=S.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+-q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ea=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ea.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&+q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var fa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var la=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var O=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(q){return q.tableHandle||O.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var q=0;this.graph.isTableRow(this.state.cell)?q=1:this.graph.isTableCell(this.state.cell)&&(q=2);return q};var V=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=-function(){return V.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Y=null,ha=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Y&&(Y=mxCellRenderer.defaultShapes.tableLine);var q=ha.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Ta=[],Ra=0;Ra<Ga.length;Ra++){var Oa=Ga[Ra];Ta.push(null==Oa?null:new mxPoint((fa+Oa.x+wa)*R,(ka+Oa.y+ua)*-R))}return Ta},B=this,F=this.graph,L=F.model,R=F.view.scale,Z=this.state,ja=this.selectionBorder,fa=this.state.origin.x+F.view.translate.x,ka=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var va=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=L.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),Aa=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<va.length;L++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=-Ga<va.length-1?va[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Ta=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Aa[Ga]?new Y(Aa[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Ra=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=-0==Ra?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(Aa[Ga],0,Ra),this.shape.updateBoundsFromLine();else{var Sa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ra*R;this.shape.bounds.x=Z.x+(Ga==va.length-1?0:Sa.x*R);this.shape.bounds.width=Z.width-(Ga==va.length-1?0:Sa.width+Sa.x+R)}this.shape.redraw()}};var Oa=!1;ua.setPosition=function(Sa,Xa,kb){Ra=Math.max(Graph.minTableRowHeight-Sa.height,Xa.y-Sa.y-Sa.height);-Oa=mxEvent.isShiftDown(kb.getEvent());null!=Ta&&Oa&&(Ra=Math.min(Ra,Ta.height-Graph.minTableRowHeight))};ua.execute=function(Sa){if(0!=Ra)F.setTableRowHeight(this.state.cell,Ra,!Oa);else if(!B.blockDelayedSelection){var Xa=F.getCellAt(Sa.getGraphX(),Sa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(Xa,Sa)}Ra=0};ua.reset=function(){Ra=0}}q.push(ua)})(L);for(L=0;L<Ma.length;L++)mxUtils.bind(this,function(Ga){var wa=F.view.getState(Ma[Ga]),ua=F.getCellGeometry(Ma[Ga]),Ta=null!=ua.alternateBounds?-ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=Z.x+ua.x*R,wa.y=Z.y+ua.y*R,wa.width=Ta.width*R,wa.height=Ta.height*R,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Ra=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new Y(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",-null,ua);wa.tableHandle=!0;var Oa=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(Na[Ga],Oa,0),this.shape.updateBoundsFromLine();else{var Xa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ta.width+Oa)*R;this.shape.bounds.y=Z.y+(Ga==Ma.length-1?0:Xa.y*R);this.shape.bounds.height=-Z.height-(Ga==Ma.length-1?0:(Xa.height+Xa.y)*R)}this.shape.redraw()}};var Sa=!1;wa.setPosition=function(Xa,kb,tb){Oa=Math.max(Graph.minTableColumnWidth-Ta.width,kb.x-Xa.x-Ta.width);Sa=mxEvent.isShiftDown(tb.getEvent());null==Ra||Sa||(Oa=Math.min(Oa,Ra.width-Graph.minTableColumnWidth))};wa.execute=function(Xa){if(0!=Oa)F.setTableColumnWidth(this.state.cell,Oa,Sa);else if(!B.blockDelayedSelection){var kb=F.getCellAt(Xa.getGraphX(),Xa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(kb,Xa)}Oa=-0};wa.positionChanged=function(){};wa.reset=function(){Oa=0};q.push(wa)})(L)}}return null!=q?q.reverse():null};var ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){ia.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=+function(){return V.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Y=null,ha=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Y&&(Y=mxCellRenderer.defaultShapes.tableLine);var q=ha.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Fa,va,ua){for(var Ta=[],Ra=0;Ra<Fa.length;Ra++){var Oa=Fa[Ra];Ta.push(null==Oa?null:new mxPoint((ea+Oa.x+va)*R,(ka+Oa.y+ua)*+R))}return Ta},B=this,F=this.graph,L=F.model,R=F.view.scale,Z=this.state,ja=this.selectionBorder,ea=this.state.origin.x+F.view.translate.x,ka=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var xa=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<xa.length){var Ka=L.getChildCells(xa[0].cell,!0),Ha=F.getTableLines(this.state.cell,!1,!0),ya=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<xa.length;L++)mxUtils.bind(this,function(Fa){var va=xa[Fa],ua=null;if(F.isCellMovable(va.cell)){ua=+Fa<xa.length-1?xa[Fa+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Ta=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=ya[Fa]?new Y(ya[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(va,"row-resize",null,ua);ua.tableHandle=!0;var Ra=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=+0==Ra?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(ya[Fa],0,Ra),this.shape.updateBoundsFromLine();else{var Sa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ra*R;this.shape.bounds.x=Z.x+(Fa==xa.length-1?0:Sa.x*R);this.shape.bounds.width=Z.width-(Fa==xa.length-1?0:Sa.width+Sa.x+R)}this.shape.redraw()}};var Oa=!1;ua.setPosition=function(Sa,Xa,kb){Ra=Math.max(Graph.minTableRowHeight-Sa.height,Xa.y-Sa.y-Sa.height);+Oa=mxEvent.isShiftDown(kb.getEvent());null!=Ta&&Oa&&(Ra=Math.min(Ra,Ta.height-Graph.minTableRowHeight))};ua.execute=function(Sa){if(0!=Ra)F.setTableRowHeight(this.state.cell,Ra,!Oa);else if(!B.blockDelayedSelection){var Xa=F.getCellAt(Sa.getGraphX(),Sa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(Xa,Sa)}Ra=0};ua.reset=function(){Ra=0}}q.push(ua)})(L);for(L=0;L<Ka.length;L++)mxUtils.bind(this,function(Fa){var va=F.view.getState(Ka[Fa]),ua=F.getCellGeometry(Ka[Fa]),Ta=null!=ua.alternateBounds?+ua.alternateBounds:ua;null==va&&(va=new mxCellState(F.view,Ka[Fa],F.getCellStyle(Ka[Fa])),va.x=Z.x+ua.x*R,va.y=Z.y+ua.y*R,va.width=Ta.width*R,va.height=Ta.height*R,va.updateCachedBounds());ua=Fa<Ka.length-1?Ka[Fa+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Ra=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Ha[Fa]?new Y(Ha[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;va=new mxHandle(va,"col-resize",+null,ua);va.tableHandle=!0;var Oa=0;va.shape.node.parentNode.insertBefore(va.shape.node,va.shape.node.parentNode.firstChild);va.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(Ha[Fa],Oa,0),this.shape.updateBoundsFromLine();else{var Xa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ta.width+Oa)*R;this.shape.bounds.y=Z.y+(Fa==Ka.length-1?0:Xa.y*R);this.shape.bounds.height=+Z.height-(Fa==Ka.length-1?0:(Xa.height+Xa.y)*R)}this.shape.redraw()}};var Sa=!1;va.setPosition=function(Xa,kb,tb){Oa=Math.max(Graph.minTableColumnWidth-Ta.width,kb.x-Xa.x-Ta.width);Sa=mxEvent.isShiftDown(tb.getEvent());null==Ra||Sa||(Oa=Math.min(Oa,Ra.width-Graph.minTableColumnWidth))};va.execute=function(Xa){if(0!=Oa)F.setTableColumnWidth(this.state.cell,Oa,Sa);else if(!B.blockDelayedSelection){var kb=F.getCellAt(Xa.getGraphX(),Xa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(kb,Xa)}Oa=+0};va.positionChanged=function(){};va.reset=function(){Oa=0};q.push(va)})(L)}}return null!=q?q.reverse():null};var ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){ia.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=q?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var q=this.isMoveHandlesVisible();q&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():q||null==this.moveHandles||this.destroyMoveHandles();if(q&&null==this.moveHandles){for(q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].parentNode.removeChild(this.moveHandles[q]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var q=this.graph,A=q.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(L){if(null!=L&&A.isVertex(L.cell)&&q.isCellMovable(L.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=L;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.cell,Z);mxEvent.isPopupTrigger(Z)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z),@@ -2970,16 +2971,16 @@ function(q){return!mxEvent.isShiftDown(q.getEvent())};mxEdgeHandler.prototype.is4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return null==q.getState()&&!mxEvent.isMouseEvent(A)||mxEvent.isPopupTrigger(A)&&(null==q.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))}}else mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return mxEvent.isLeftMouseButton(A)&&(this.useLeftButtonForPanning&&null==q.getState()||mxEvent.isControlDown(A)&&!mxEvent.isShiftDown(A))||this.usePopupTrigger&&mxEvent.isPopupTrigger(A)};mxRubberband.prototype.isSpaceEvent=function(q){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(q.getEvent())||mxEvent.isMetaDown(q.getEvent()))&&mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(q,A){if(this.cancelled)this.cancelled=!1,A.consume();else{var B=null!=this.div&&"none"!=this.div.style.display,F=null,L=null,R=q=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,L=this.first.y,q=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-L)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(q=this.graph.snap(q),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(q)<this.graph.tolerance&&(q=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();-try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ja=this.graph.view.getState(Z[B]),fa=this.graph.getCellGeometry(Z[B]);null!=ja&&null!=fa&&(fa=fa.clone(),fa.translate(q,R),this.graph.model.setGeometry(Z[B],fa))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&+try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ja=this.graph.view.getState(Z[B]),ea=this.graph.getCellGeometry(Z[B]);null!=ja&&null!=ea&&(ea=ea.clone(),ea.translate(q,R),this.graph.model.setGeometry(Z[B],ea))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);q=mxUtils.getOffset(this.graph.container);B.x-=q.x;B.y-=q.y;q=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-q,L=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(L)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(q,B),this.isSpaceEvent(A)?(q=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/F)*F,this.height=this.graph.snap(this.height/F)*F,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=q-this.width),this.y<this.first.y&&(this.y=B-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)),A.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 na=(new Date).getTime(),ya=0,za=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,-A,B,F){za.apply(this,arguments);B!=this.currentTerminalState?(na=(new Date).getTime(),ya=0):ya=(new Date).getTime()-na;this.currentTerminalState=B};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:+"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var La=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);La.apply(this,arguments)};var na=(new Date).getTime(),za=0,Aa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,+A,B,F){Aa.apply(this,arguments);B!=this.currentTerminalState?(na=(new Date).getTime(),za=0):za=(new Date).getTime()-na;this.currentTerminalState=B};var Ma=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<za||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&Ma.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:null!=q&&null!=F?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(q,A,B,F){F=A==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Qa.apply(this,arguments)};var Ia=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ia.apply(this,-arguments)};var Ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ha.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=+HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Qa.apply(this,arguments)};var Ja=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ja.apply(this,+arguments)};var Ia=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ia.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=q.text&&null!=q.text.boundingBox?(A=q.text.unrotatedBoundingBox||q.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ra.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(q,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var q=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&q==mxConstants.NONE&&A==mxConstants.NONE?(q=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,q,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Va=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(q,A){Va.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 Wa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=@@ -2987,9 +2988,9 @@ function(q,A){Wa.apply(this,arguments);null!=this.rotationShape&&null!=this.rotathis.linkHint=null);else if(null!=q||null!=A&&0<A.length){var B=document.createElement("img");B.className="geAdaptiveAsset";B.setAttribute("src",Editor.editImage);B.setAttribute("title",mxResources.get("editLink"));B.setAttribute("width","14");B.setAttribute("height","14");B.style.paddingLeft="8px";B.style.marginLeft="auto";B.style.marginBottom="-1px";B.style.cursor="pointer";var F=B.cloneNode(!0);F.setAttribute("src",Editor.trashImage);F.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),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!=q){var L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.appendChild(this.graph.createLinkForHint(q,null,this.state.cell));this.linkHint.appendChild(L);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);L.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(ja){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ja)}));var Z=F.cloneNode(!0);L.appendChild(Z);mxEvent.addListener(Z,-"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ja,fa){var ka=document.createElement("div");ka.style.display="flex";ka.style.alignItems="center";ka.style.marginTop=null!=q||0<fa?"6px":"0px";ka.appendChild(this.graph.createLinkForHint(ja.getAttribute("href"),mxUtils.getTextContent(ja),this.state.cell));var va=B.cloneNode(!0);ka.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var Aa=-document.createElement("div");Aa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=Aa.getElementsByTagName("a")[fa];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,Aa.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ja.getAttribute("href")||-"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ka.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ka)})(A[L],L)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var $a=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=$a.apply(this,+"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ja,ea){var ka=document.createElement("div");ka.style.display="flex";ka.style.alignItems="center";ka.style.marginTop=null!=q||0<ea?"6px":"0px";ka.appendChild(this.graph.createLinkForHint(ja.getAttribute("href"),mxUtils.getTextContent(ja),this.state.cell));var xa=B.cloneNode(!0);ka.appendChild(xa);var Ka=mxUtils.bind(this,function(Ha){var ya=+document.createElement("div");ya.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Fa=ya.getElementsByTagName("a")[ea];if(null!=Fa){if(null==Ha||""==Ha){for(Ha=Fa.cloneNode(!0).firstChild;null!=Ha;)Fa.parentNode.insertBefore(Ha.cloneNode(!0),Fa),Ha=Ha.nextSibling;Fa.parentNode.removeChild(Fa)}else Fa.setAttribute("href",Ha);this.graph.labelChanged(this.state.cell,ya.innerHTML)}});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(Ha){this.graph.showLinkDialog(ja.getAttribute("href")||+"",mxResources.get("ok"),Ka);mxEvent.consume(Ha)}));xa=F.cloneNode(!0);ka.appendChild(xa);mxEvent.addListener(xa,"click",mxUtils.bind(this,function(Ha){Ka();mxEvent.consume(Ha)}));this.linkHint.appendChild(ka)})(A[L],L)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var $a=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=$a.apply(this,arguments);q.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return q};var db=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){db.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&(this.moveHandles[q].bounds.x=Math.round(this.moveHandles[q].rowState.x+this.moveHandles[q].rowState.width-this.moveHandles[q].bounds.width/2),this.moveHandles[q].bounds.y=Math.round(this.moveHandles[q].rowState.y+(this.moveHandles[q].rowState.height-this.moveHandles[q].bounds.height)/2),this.moveHandles[q].redraw());if(null!=this.cornerHandles){q=this.getSelectionBorderInset();var A=this.cornerHandles,B=A[0].bounds.height/2;A[0].bounds.x=this.state.x-A[0].bounds.width/2+q;A[0].bounds.y=this.state.y-B+q;A[0].redraw();A[1].bounds.x=A[0].bounds.x+this.state.width-2*q;A[1].bounds.y=A[0].bounds.y;A[1].redraw();A[2].bounds.x=A[0].bounds.x;A[2].bounds.y=this.state.y+this.state.height-2*q;A[2].redraw();A[3].bounds.x=A[1].bounds.x;A[3].bounds.y=A[2].bounds.y;A[3].redraw();for(q=0;q<this.cornerHandles.length;q++)this.cornerHandles[q].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",@@ -3092,13 +3093,13 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var p=this.addUnitInput(h,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){f.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var y=w.getElementsByTagName("input")[0];-this.addKeyHandler(p,X);this.addKeyHandler(k,X);var C=this.addGeometryHandler(p,function(H,S,ea){S=Math.max(1,b.fromUnit(S));if(e.isTableCell(ea))return e.setTableColumnWidth(ea,S-H.width,!0),!0;0<H.width&&(y.checked&&(H.height=Math.round(H.height*S*100/H.width)/100),H.width=S)});var D=this.addGeometryHandler(k,function(H,S,ea){S=Math.max(1,b.fromUnit(S));e.isTableCell(ea)&&(ea=g.getParent(ea));if(e.isTableRow(ea))return e.setTableRowHeight(ea,S-H.height),!0;0<H.height&&(y.checked&&(H.width=Math.round(H.width*+this.addKeyHandler(p,X);this.addKeyHandler(k,X);var C=this.addGeometryHandler(p,function(H,S,fa){S=Math.max(1,b.fromUnit(S));if(e.isTableCell(fa))return e.setTableColumnWidth(fa,S-H.width,!0),!0;0<H.width&&(y.checked&&(H.height=Math.round(H.height*S*100/H.width)/100),H.width=S)});var D=this.addGeometryHandler(k,function(H,S,fa){S=Math.max(1,b.fromUnit(S));e.isTableCell(fa)&&(fa=g.getParent(fa));if(e.isTableRow(fa))return e.setTableRowHeight(fa,S-H.height),!0;0<H.height&&(y.checked&&(H.width=Math.round(H.width*S*100/H.height)/100),H.height=S)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var G=this.addUnitInput(E,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),J=this.addUnitInput(E,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var M=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=e.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);M=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*K.x)/10},function(H){H=parseFloat(H);if(!isNaN(H)){g.beginUpdate();try{K=K.clone(),K.x=parseFloat(H)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var W=null;Q=this.addUnitInput(E,this.getUnit(),16,52,function(){W.apply(this,arguments)});W=this.addGeometryHandler(Q,function(H,S){H.y=b.fromUnit(S)})}else Q=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*K.y)/10},function(H){H=parseFloat(H);if(!isNaN(H)){g.beginUpdate();try{K=-K.clone(),K.y=parseFloat(H)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var X=mxUtils.bind(this,function(H,S,ea){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(ea||document.activeElement!=p)p.value=this.inUnit(d.width)+-" "+this.getUnit();if(ea||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==e.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){H=e.getCellGeometry(d.vertices[0]);E.style.display="";if(ea||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(ea||document.activeElement!=J)J.value=this.inUnit(d.y)+" "+this.getUnit();null!=H&&H.relative&&(null==M||!ea&&document.activeElement==M||(M.value=Math.round(1E3*H.x)/10+" %"),null==-Q||!ea&&document.activeElement==Q||(g.isEdge(g.getParent(d.vertices[0]))?Q.value=this.inUnit(H.y)+" "+this.getUnit():Q.value=Math.round(1E3*H.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(X)}});g.addListener(mxEvent.CHANGE,X);this.addKeyHandler(G,X);this.addKeyHandler(J,X);X();var T=this.addGeometryHandler(G,function(H,S){S=b.fromUnit(S);H.relative?(H.offset=null!=H.offset?H.offset:new mxPoint,H.offset.x=S):H.x=S});var N=this.addGeometryHandler(J,+K.clone(),K.y=parseFloat(H)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var X=mxUtils.bind(this,function(H,S,fa){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(fa||document.activeElement!=p)p.value=this.inUnit(d.width)++" "+this.getUnit();if(fa||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==e.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){H=e.getCellGeometry(d.vertices[0]);E.style.display="";if(fa||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(fa||document.activeElement!=J)J.value=this.inUnit(d.y)+" "+this.getUnit();null!=H&&H.relative&&(null==M||!fa&&document.activeElement==M||(M.value=Math.round(1E3*H.x)/10+" %"),null==+Q||!fa&&document.activeElement==Q||(g.isEdge(g.getParent(d.vertices[0]))?Q.value=this.inUnit(H.y)+" "+this.getUnit():Q.value=Math.round(1E3*H.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(X)}});g.addListener(mxEvent.CHANGE,X);this.addKeyHandler(G,X);this.addKeyHandler(J,X);X();var T=this.addGeometryHandler(G,function(H,S){S=b.fromUnit(S);H.relative?(H.offset=null!=H.offset?H.offset:new mxPoint,H.offset.x=S):H.x=S});var N=this.addGeometryHandler(J,function(H,S){S=b.fromUnit(S);H.relative?(H.offset=null!=H.offset?H.offset:new mxPoint,H.offset.y=S):H.y=S});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(K=e.getCellGeometry(d.vertices[0]),null!=K&&K.relative)){var ca=document.createElement("select");ca.style.position="absolute";ca.style.width="134px";ca.style.left="77px";m=document.createElement("option");m.setAttribute("value","none");m.setAttribute("title",mxResources.get("move"));mxUtils.write(m,mxResources.get("move")+"...");ca.appendChild(m);m=document.createElement("option");m.setAttribute("value","start");m.setAttribute("title",mxResources.get("linestart"));mxUtils.write(m,mxResources.get("linestart"));ca.appendChild(m);m=document.createElement("option");m.setAttribute("value","center");m.setAttribute("title",mxResources.get("center"));mxUtils.write(m,mxResources.get("center"));ca.appendChild(m);m=document.createElement("option");m.setAttribute("value","end");m.setAttribute("title",mxResources.get("lineend"));mxUtils.write(m,mxResources.get("lineend"));ca.appendChild(m);mxEvent.addListener(ca,"change",function(H){if("none"!=ca.value){g.beginUpdate();try{K=K.clone(),K.x="start"==ca.value?-1:"end"==ca.value?1:0,K.y=0,K.offset=new mxPoint,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}ca.value="none"});mxUtils.br(E);mxUtils.br(E);E.appendChild(ca)}a.appendChild(E)}};@@ -3124,23 +3125,23 @@ C),J=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isC);a.appendChild(C);var W,X,T,N;if(d.cellEditor.isContentEditing()){M.style.display="none";Q.style.display="none";K.style.display="none";y.style.display="none";var ca=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){document.execCommand("justifyfull",!1,null)},C);ca.style.marginRight="9px";var H=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C);H.style.marginLeft="10px";var S=g.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C);H.style.marginLeft="10px";D=C.cloneNode(!1);D.style.paddingTop="4px";C=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];C[C.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",J.style.marginRight=-"12px";C=m.cloneNode(!1);mxUtils.write(C,mxResources.get("position"));var ea=document.createElement("select");ea.style.left="114px";ea.style.width="98px";var la="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,+"12px";C=m.cloneNode(!1);mxUtils.write(C,mxResources.get("position"));var fa=document.createElement("select");fa.style.left="114px";fa.style.width="98px";var la="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<la.length;D++){var V=document.createElement("option");V.setAttribute("value",la[D]);mxUtils.write(V,mxResources.get(la[D]));ea.appendChild(V)}C.appendChild(ea);la=C.cloneNode(!1);mxUtils.write(la,mxResources.get("writingDirection"));var Y=ea.cloneNode(!1);V=["automatic","leftToRight","rightToLeft"];h.html&&(V.push("vertical-leftToRight"),+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<la.length;D++){var V=document.createElement("option");V.setAttribute("value",la[D]);mxUtils.write(V,mxResources.get(la[D]));fa.appendChild(V)}C.appendChild(fa);la=C.cloneNode(!1);mxUtils.write(la,mxResources.get("writingDirection"));var Y=fa.cloneNode(!1);V=["automatic","leftToRight","rightToLeft"];h.html&&(V.push("vertical-leftToRight"),V.push("vertical-rightToLeft"));var ha={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<V.length;D++){var ia=document.createElement("option");ia.setAttribute("value",V[D]);"vertical-"==V[D].substring(0,9)?mxUtils.write(ia,mxResources.get("vertical")+" ("+mxResources.get(V[D].substring(9))+")"):mxUtils.write(ia,mxResources.get(V[D]));-Y.appendChild(ia)}la.appendChild(Y);d.isEditing()||(a.appendChild(C),mxEvent.addListener(ea,"change",function(q){d.getModel().beginUpdate();try{var A=O[ea.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(la),mxEvent.addListener(Y,+Y.appendChild(ia)}la.appendChild(Y);d.isEditing()||(a.appendChild(C),mxEvent.addListener(fa,"change",function(q){d.getModel().beginUpdate();try{var A=O[fa.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(la),mxEvent.addListener(Y,"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ha[Y.value],h.cells);mxEvent.consume(q)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);C=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ta.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);q!=b(F)?A[B].style.fontSize=q+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ta,C,1,!0,Menus.prototype.defaultFontSize);C.style.display=ta.style.display;C.style.left="198px";"inherit"==h.style[mxConstants.STYLE_FONTSIZE]&&(ta.style.display="none",C.style.display="none");k.appendChild(C);var aa=null,P=d.shapeBackgroundColor,-ba=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Ja="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",na=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P==d.shapeBackgroundColor||P==Ja?"default":P},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,q,!1),g.fireEvent(new mxEventObject("styleChanged","keys",-[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[q],"cells",h.cells)))},"default",{install:function(q){aa=q},destroy:function(){aa=null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(q){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);na.style.fontWeight="bold";var ya=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,-"default",null,null,d.shapeForegroundColor);ya.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ma},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",-h.cells)))},"default",{install:function(q){ba=q},destroy:function(){ba=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){na.style.display=q==mxConstants.NONE?"none":"";ya.style.display=na.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,+ba=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var La="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",na=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P==d.shapeBackgroundColor||P==La?"default":P},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,q,!1),g.fireEvent(new mxEventObject("styleChanged","keys",+[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[q],"cells",h.cells)))},"default",{install:function(q){aa=q},destroy:function(){aa=null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(q){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);na.style.fontWeight="bold";var za=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,+"default",null,null,d.shapeForegroundColor);za.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ma},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",+h.cells)))},"default",{install:function(q){ba=q},destroy:function(){ba=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){na.style.display=q==mxConstants.NONE?"none":"";za.style.display=na.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,h.cells);d.updateLabelElements(h.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);"inherit"==h.style[mxConstants.STYLE_FONTCOLOR]&&(k.style.display="none");k.style.fontWeight="bold";p.appendChild(k);p.appendChild(na);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled",-"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(ya),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";C=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==A||d.getModel().isEdge(q)||d.isAutoSizeState(A)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,C);k.style.fontWeight="bold";0<C.length&&p.appendChild(k);+"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(za),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";C=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==A||d.getModel().isEdge(q)||d.isAutoSizeState(A)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,C);k.style.fontWeight="bold";0<C.length&&p.appendChild(k);C=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));C.style.fontWeight="bold";p.appendChild(C);C=d.view.getState(d.getSelectionCell());if(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=C&&null!=C.text&&null!=C.text.node&&0==C.text.node.getElementsByTagName("foreignObject").length)k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled","disabled");k=this.createCellOption(mxResources.get("lblToSvg"),"convertToSvg","0");k.style.fontWeight="bold";p.appendChild(k);if(!g.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.getElementsByTagName("span")[0].style.maxWidth="172px",k.appendChild(g.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/5165"));k=this.createPanel();k.style.height="86px";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);-var za=this.addUnitInput(k,this.getUnit(),87,52,function(){db.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),16,52,function(){$a.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Qa=this.addUnitInput(k,this.getUnit(),158,52,function(){Za.apply(this,arguments)},this.getUnitStep(),-null,null,this.isFloatUnit()),Ia=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ha=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ra=null,Da=null;+var Aa=this.addUnitInput(k,this.getUnit(),87,52,function(){db.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ma=this.addUnitInput(k,this.getUnit(),16,52,function(){$a.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Qa=this.addUnitInput(k,this.getUnit(),158,52,function(){Za.apply(this,arguments)},this.getUnitStep(),+null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ia=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ra=null,Da=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ra&&(d.cellEditor.restoreSelection(ra),ra=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&B==d.cellEditor.textarea){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var L=F.getRangeAt(0);B=document.createElement("div");B.appendChild(L.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();L=new Range;L.selectNodeContents(B);F.addRange(L)}}if(null!=B)for(B!=d.cellEditor.textarea&&f(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),L=0;L<B.length;L++)F.containsNode(B[L],!0)&&f(B[L],A)}q.value=A+" %"},function(q){Da=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);g.toolbar.addItems(["link","image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[g.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},p),g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(q){g.menus.addInsertTableItem(q,null,null,!1)})),null,Editor.tableImage,p)];k=this.createPanel();k.appendChild(this.createTitle(mxResources.get("insert")));@@ -3153,16 +3154,16 @@ mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=X){varmxResources.get("center"),function(){null!=X&&X.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=X&&X.setAttribute("align","right")},m)];C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Va=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(q){mxEvent.addListener(w[q],"click",function(){e(w[q],""==w[q].style.backgroundImage)})})(D);var Wa=mxUtils.bind(this,function(q,A,B){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);e(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);e(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);e(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));e(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);e(E,q==mxConstants.ALIGN_LEFT);e(G,q==mxConstants.ALIGN_CENTER);e(J,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);e(M,q==mxConstants.ALIGN_TOP);e(Q,q==mxConstants.ALIGN_MIDDLE);e(K,q==mxConstants.ALIGN_BOTTOM);-q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ea.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?+q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?Y.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?Y.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?Y.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&-(Y.value="vertical-rightToLeft"):Y.value="automatic";if(B||document.activeElement!=Ka)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ka.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=za)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),za.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ha)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ha.value=isNaN(q)?"":this.inUnit(q)+-" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Qa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var $a=this.installInputHandler(Ka,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var db=this.installInputHandler(za,mxConstants.STYLE_SPACING_TOP,-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var eb=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Za=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ta,Wa);this.addKeyHandler(Ka,Wa);this.addKeyHandler(za,-Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Qa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var gb=null,bb=!1;m=mxUtils.bind(this,function(){bb||(bb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=function(Aa,Ga){if(null!=Aa&&null!=Ga){if(Aa==Ga)return!0;if(Aa.length>-Ga.length+1)return Aa.substring(Aa.length-Ga.length-1,Aa.length)=="-"+Ga}return!1},B=function(Aa){if(null!=d.getParentByName(q,Aa,d.cellEditor.textarea))return!0;for(var Ga=q;null!=Ga&&1==Ga.childNodes.length;)if(Ga=Ga.childNodes[0],Ga.nodeName==Aa)return!0;return!1},F=function(Aa){for(;null!=Aa&&Aa!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(Aa).display)return Aa;Aa=Aa.parentNode}return null},L=mxUtils.getCurrentStyle(q),R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,-Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(L);if(window.getSelection)for(var ja=q.getElementsByTagName("*"),fa=window.getSelection(),ka=0;ka<ja.length&&(!fa.containsNode(ja[ka],!0)||null==ja[ka].style||(null==Z&&""!=ja[ka].style.fontSize&&(Z=parseFloat(ja[ka].style.fontSize)),null==R&&""!=ja[ka].style.lineHeight&&(R=ja[ka].style.lineHeight),null==Z||null==R));ka++);null==Z&&(Z=b(L));if(null==R)for(ja=q;null!=ja&&ja!=d.cellEditor.textarea.parentNode;){if(null!=ja.style&&""!=ja.style.lineHeight){R=-ja.style.lineHeight;break}ja=ja.parentNode}if(null!=L){e(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));e(w[1],"italic"==L.fontStyle||B("I")||B("EM"));e(w[2],"underline"==L.textDecorationLine||B("U"));e(W,"line-through"==L.textDecorationLine||B("STRIKE"));e(S,B("SUP"));e(H,B("SUB"));var va=F(q);if(null!=va){B=function(Aa,Ga){Na.push({name:Aa,dispName:Ga,type:"string",getValue:function(){return Ma[Aa]},valueChanged:function(wa,ua){var Ta=va.style,Ra=wa;parseInt(Ra)==Ra&&(Ra+="px",-null!=ua&&(ua.value=Ra));Ta[Aa]=Ra;""==wa&&null!=ua&&(ua.value=Ma[Aa])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,h,!0);null!=gb?gb.parentNode.replaceChild(B,gb):a.appendChild(B);gb=B}d.cellEditor.isTableSelected()?+(Y.value="vertical-rightToLeft"):Y.value="automatic";if(B||document.activeElement!=Ma)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ma.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Aa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),Aa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)++" "+this.getUnit();if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Qa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var $a=this.installInputHandler(Ma,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var db=this.installInputHandler(Aa,mxConstants.STYLE_SPACING_TOP,+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var eb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Za=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ta,Wa);this.addKeyHandler(Ma,Wa);this.addKeyHandler(Aa,+Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Ja,Wa);this.addKeyHandler(Qa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var gb=null,bb=!1;m=mxUtils.bind(this,function(){bb||(bb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=function(ya,Fa){if(null!=ya&&null!=Fa){if(ya==Fa)return!0;if(ya.length>+Fa.length+1)return ya.substring(ya.length-Fa.length-1,ya.length)=="-"+Fa}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Fa=q;null!=Fa&&1==Fa.childNodes.length;)if(Fa=Fa.childNodes[0],Fa.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},L=mxUtils.getCurrentStyle(q),R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,+Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(L);if(window.getSelection)for(var ja=q.getElementsByTagName("*"),ea=window.getSelection(),ka=0;ka<ja.length&&(!ea.containsNode(ja[ka],!0)||null==ja[ka].style||(null==Z&&""!=ja[ka].style.fontSize&&(Z=parseFloat(ja[ka].style.fontSize)),null==R&&""!=ja[ka].style.lineHeight&&(R=ja[ka].style.lineHeight),null==Z||null==R));ka++);null==Z&&(Z=b(L));if(null==R)for(ja=q;null!=ja&&ja!=d.cellEditor.textarea.parentNode;){if(null!=ja.style&&""!=ja.style.lineHeight){R=+ja.style.lineHeight;break}ja=ja.parentNode}if(null!=L){e(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));e(w[1],"italic"==L.fontStyle||B("I")||B("EM"));e(w[2],"underline"==L.textDecorationLine||B("U"));e(W,"line-through"==L.textDecorationLine||B("STRIKE"));e(S,B("SUP"));e(H,B("SUB"));var xa=F(q);if(null!=xa){B=function(ya,Fa){Ha.push({name:ya,dispName:Fa,type:"string",getValue:function(){return Ka[ya]},valueChanged:function(va,ua){var Ta=xa.style,Ra=va;parseInt(Ra)==Ra&&(Ra+="px",+null!=ua&&(ua.value=Ra));Ta[ya]=Ra;""==va&&null!=ua&&(ua.value=Ka[ya])}})};var Ka=mxUtils.getCurrentStyle(xa),Ha=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Ha,h,!0);null!=gb?gb.parentNode.replaceChild(B,gb):a.appendChild(B);gb=B}d.cellEditor.isTableSelected()?(e(ca,A(L.textAlign,"justify")),e(E,A(L.textAlign,"left")),e(G,A(L.textAlign,"center")),e(J,A(L.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(L.textAlign,"justify")?(e(ca,A(L.textAlign,"justify")),e(E,!1),e(G,!1),e(J,!1)):(e(ca,!1),e(E,B==mxConstants.ALIGN_LEFT),e(G,B==mxConstants.ALIGN_CENTER),e(J,B==mxConstants.ALIGN_RIGHT)));X=d.getParentByName(q,"TABLE",d.cellEditor.textarea);N=null==X?null:d.getParentByName(q,"TR",X);T=null==X?null:d.getParentByNames(q,["TD","TH"],X);Va.style.display=null!=X?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?Da.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?Da.value="120 %":Da.value=Math.round(100*A)+" %"));null!=ba&&(ma=d.getTextColor(q,!0),ba(ma,!0));null!=aa&&(P=d.getTextColor(q,!1),aa(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(L.fontFamily))}}bb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);@@ -3189,10 +3190,10 @@ G=null!=G?G.split(","):null;for(var M=0;M<E.length;M++){var Q=E[M].replace(/([a-StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi.getSelectionState(),b=[];if(null!=a.customProperties)for(var f in a.customProperties){var e=a.customProperties[f];null!=e&&"color"==e.type&&e.primary&&b.push({title:e.dispName,defaultValue:null==e.defVal?"#000000":e.defVal,key:e.name})}a.swimlane&&(a=this.editorUi.editor.graph,b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default",defaultColorValue:a.shapeBackgroundColor}));return b};StyleFormatPanel.prototype.addStroke=function(a){function b(P){var ba=e.fromUnit(parseFloat(M.value));ba=Math.min(999,Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));M.value=e.inUnit(ba)+" "+e.getUnit();mxEvent.consume(P)}function f(P){var ba=e.fromUnit(parseFloat(Q.value));ba=Math.min(999,Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));Q.value=e.inUnit(ba)+" "+e.getUnit();mxEvent.consume(P)}var e=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var p=document.createElement("select");-p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var ba=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var Ja=0;Ja<ba.length;Ja++)d.setCellStyles(ba[Ja],-ma[Ja],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||-P==mxConstants.NONE){P=[];for(var ba=0;ba<h.cells.length;ba++)(d.isTableCell(h.cells[ba])||d.isTableRow(h.cells[ba]))&&P.push(h.cells[ba]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(P,ba,ma,Ja,na){P=this.editorUi.menus.styleChange(P,"",Ja,na,"",null);Ja=document.createElement("div");na=ma.split(" ");2==na.length?(ma=parseInt(na[0])+parseInt(na[1]),-na=parseInt(na[0])/ma*100,Ja.style.borderBottomStyle="none",Ja.style.backgroundImage="linear-gradient(to right, black "+na+"%, transparent 0%)",Ja.style.backgroundSize=ma+"px 1px"):Ja.style.borderBottomStyle=ma;P.firstChild.firstChild.className="geStyleMenuItem";P.firstChild.firstChild.style.width=ba+"px";P.firstChild.firstChild.appendChild(Ja);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",+p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var ba=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var La=0;La<ba.length;La++)d.setCellStyles(ba[La],+ma[La],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||+P==mxConstants.NONE){P=[];for(var ba=0;ba<h.cells.length;ba++)(d.isTableCell(h.cells[ba])||d.isTableRow(h.cells[ba]))&&P.push(h.cells[ba]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(P,ba,ma,La,na){P=this.editorUi.menus.styleChange(P,"",La,na,"",null);La=document.createElement("div");na=ma.split(" ");2==na.length?(ma=parseInt(na[0])+parseInt(na[1]),+na=parseInt(na[0])/ma*100,La.style.borderBottomStyle="none",La.style.backgroundImage="linear-gradient(to right, black "+na+"%, transparent 0%)",La.style.backgroundSize=ma+"px 1px"):La.style.borderBottomStyle=ma;P.firstChild.firstChild.className="geStyleMenuItem";P.firstChild.firstChild.style.width=ba+"px";P.firstChild.firstChild.appendChild(La);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,C),G=C.cloneNode(!1),J=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var ba=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",ba,[null,null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",ba,["link",null,null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",ba,["flexArrow",null,null,null,null],@@ -3235,20 +3236,20 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STY"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),P.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)})),"",null,k);J.style.width="67px";J.style.marginRight="2px";w.style.width="67px";w.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";X.style.width="67px";X.style.marginRight="2px";T.style.width="67px";T.style.marginRight="2px";this.addArrow(J).appendChild(document.createElement("div"));this.addArrow(W).appendChild(document.createElement("div"));this.addArrow(X);this.addArrow(T);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var N=document.createElement("div");N.className="gePatternPreview";N.style.width="100px";N.style.borderBottomStyle="solid";E.appendChild(N);var ca=document.createElement("div");ca.className="gePatternPreview";ca.style.width="36px";ca.style.borderBottomStyle="solid";w.appendChild(ca);a.appendChild(u);a.appendChild(G);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop="2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";-mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var H=this.addUnitInput(u,this.getUnit(),82,52,function(){Y.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),S=this.addUnitInput(u,this.getUnit(),16,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var ea=this.addUnitInput(u,+mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var H=this.addUnitInput(u,this.getUnit(),82,52,function(){Y.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),S=this.addUnitInput(u,this.getUnit(),16,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var fa=this.addUnitInput(u,this.getUnit(),82,52,function(){ha.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),la=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize="10px";this.addLabel(u,mxResources.get("lineend"),16,62).style.fontSize="10px";mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,-mxResources.get("perimeter"));m.appendChild(w);var O=this.addUnitInput(m,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var V=mxUtils.bind(this,function(P,ba,ma){function Ja(na,ya,za,Ka){za=za.getElementsByTagName("div")[0];null!=za&&g.updateCssForMarker(za,Ka,h.style.shape,na,ya);return za}h=g.getSelectionState();if(ma||+mxResources.get("perimeter"));m.appendChild(w);var O=this.addUnitInput(m,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var V=mxUtils.bind(this,function(P,ba,ma){function La(na,za,Aa,Ma){Aa=Aa.getElementsByTagName("div")[0];null!=Aa&&g.updateCssForMarker(Aa,Ma,h.style.shape,na,za);return Aa}h=g.getSelectionState();if(ma||document.activeElement!=M)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),M.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=Q)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),Q.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();p.style.visibility="connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape||"pipe"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");N.style.borderBottom="1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),ba=String(P).split(" "),2<=ba.length?(P=parseInt(ba[0])+parseInt(ba[1]),ba=parseInt(ba[0])/P*100,N.style.borderBottom="1px solid transparent",N.style.backgroundImage="linear-gradient(to right, black "+ba+"%, transparent 0%)",N.style.backgroundPosition="bottom left",N.style.backgroundSize=P+"px 1px",N.style.backgroundRepeat="repeat-x"):N.style.borderBottom="1px dashed black");ca.style.backgroundImage=N.style.backgroundImage;ca.style.backgroundPosition=N.style.backgroundPosition;ca.style.backgroundSize=N.style.backgroundSize;ca.style.backgroundRepeat=N.style.backgroundRepeat;ca.style.borderBottom=N.style.borderBottom;P=W.getElementsByTagName("div")[1];null!=P&&(ba=mxUtils.getValue(h.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(h.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ba=null),"orthogonalEdgeStyle"==ba&&"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?P.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ba||"none"==ba||null==ba?P.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ba?P.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ba?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalElbowImage.src+")":P.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ba?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":P.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":P.style.backgroundImage="url("+Format.orthogonalImage.src+")");P=J.getElementsByTagName("div")[1];null!=P&&(P.style.backgroundImage="link"==h.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.style.shape?"url("+Format.arrowImage.src+")":"arrow"==h.style.shape?"url("+Format.simpleArrowImage.src+")":"filledEdge"==h.style.shape?"url("+Format.filledEdgeImage.src+")":"pipe"==h.style.shape?"url("+Format.pipeEdgeImage.src+")":"wire"==h.style.shape?"url("+Format.wireEdgeImage.src+")":"url("+Format.connectionImage.src+")");h.edges.length==h.cells.length?(G.style.display="",C.style.display="none"):(G.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<h.edges.length&&0==h.vertices.length&&-h.lineJumps&&(a.style.borderBottomStyle="none");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),X,"start");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),T,"end");mxUtils.setOpacity(W,"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&"pipe"!=h.style.shape&&(mxUtils.setOpacity(X,30),mxUtils.setOpacity(T,-30));if(ma||document.activeElement!=H)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),H.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=ea)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ea.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=S)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),S.value=isNaN(P)?-"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=ea)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),la.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=O)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,0)),O.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit()});var Y=this.installInputHandler(H,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),-!0);var ha=this.installInputHandler(ea,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ia=this.installInputHandler(S,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ta=this.installInputHandler(la,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var aa=this.installInputHandler(O,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),-null,this.isFloatUnit(),!0);this.addKeyHandler(M,V);this.addKeyHandler(H,V);this.addKeyHandler(ea,V);this.addKeyHandler(S,V);this.addKeyHandler(la,V);this.addKeyHandler(O,V);d.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){d.getModel().removeListener(V)}});V();return a};+h.lineJumps&&(a.style.borderBottomStyle="none");La(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),X,"start");La(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),T,"end");mxUtils.setOpacity(W,"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&"pipe"!=h.style.shape&&(mxUtils.setOpacity(X,30),mxUtils.setOpacity(T,+30));if(ma||document.activeElement!=H)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),H.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=fa)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),fa.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=S)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),S.value=isNaN(P)?+"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=fa)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),la.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=O)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,0)),O.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit()});var Y=this.installInputHandler(H,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),+!0);var ha=this.installInputHandler(fa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ia=this.installInputHandler(S,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ta=this.installInputHandler(la,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var aa=this.installInputHandler(O,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),+null,this.isFloatUnit(),!0);this.addKeyHandler(M,V);this.addKeyHandler(H,V);this.addKeyHandler(fa,V);this.addKeyHandler(S,V);this.addKeyHandler(la,V);this.addKeyHandler(O,V);d.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){d.getModel().removeListener(V)}});V();return a};StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.height="22px";if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.display="flex";a.style.alignItems="center";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="72px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];for(var h=0;h<g.length;h++){var m=document.createElement("option");m.setAttribute("value",g[h]);mxUtils.write(m,mxResources.get(g[h]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(w)});mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});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=mxUtils.bind(this,function(w,y,C){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,"jumpStyle","none");if(C||document.activeElement!=p)w=parseInt(mxUtils.getValue(e.style,@@ -3268,15 +3269,15 @@ k.style.width="100%";var w=document.createElement("select");w.style.width="82px"function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;C.ignoreImage=!0;C.adaptiveColors=w.value;f.model.execute(C)});p.appendChild(w);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&p.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"));h.appendChild(m);h.appendChild(p);d.appendChild(h);k=this.getGlobalStyleButtons();for(u=0;u<k.length;u+=2){m=m.cloneNode(!1);p=p.cloneNode(!1);h=h.cloneNode(!1);var y=k[u];y.style.width="100%";m.appendChild(y);h.appendChild(m);y=k[u+1];null!=y&&(y.style.width="100%",p.appendChild(y));h.appendChild(p);d.appendChild(h)}g.appendChild(d);e.appendChild(g);a.appendChild(e);f.isEnabled()&&null!=Editor.styles&&this.addGraphStyles(a)}return a};DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";var h=mxUtils.bind(this,function(W,X){var T=f.getVerticesAndEdges();e.beginUpdate();try{for(var N=0;N<T.length;N++){var ca=f.getCellStyle(T[N]);p||null==ca.labelBackgroundColor?p&&f.updateCellStyles({labelBackgroundColor:mxConstants.NONE},[T[N]]):f.updateCellStyles({labelBackgroundColor:null!=-X?X.background:null},[T[N]]);for(var H=e.isEdge(T[N]),S=e.getStyle(T[N]),ea=H?f.currentEdgeStyle:f.currentVertexStyle,la=0;la<W.length;la++)if(null!=ca[W[la]]&&ca[W[la]]!=mxConstants.NONE||W[la]!=mxConstants.STYLE_FILLCOLOR&&W[la]!=mxConstants.STYLE_STROKECOLOR)S=p&&H&&W[la]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(S,W[la],"default"):mxUtils.setStyle(S,W[la],ea[W[la]]);e.setStyle(T[N],S)}}finally{e.endUpdate()}}),m=mxUtils.bind(this,function(W,X,T){if(null!=W)for(var N=0;N<X.length;N++)if(null!=+X?X.background:null},[T[N]]);for(var H=e.isEdge(T[N]),S=e.getStyle(T[N]),fa=H?f.currentEdgeStyle:f.currentVertexStyle,la=0;la<W.length;la++)if(null!=ca[W[la]]&&ca[W[la]]!=mxConstants.NONE||W[la]!=mxConstants.STYLE_FILLCOLOR&&W[la]!=mxConstants.STYLE_STROKECOLOR)S=p&&H&&W[la]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(S,W[la],"default"):mxUtils.setStyle(S,W[la],fa[W[la]]);e.setStyle(T[N],S)}}finally{e.endUpdate()}}),m=mxUtils.bind(this,function(W,X,T){if(null!=W)for(var N=0;N<X.length;N++)if(null!=W[X[N]]&&W[X[N]]!=mxConstants.NONE||X[N]!=mxConstants.STYLE_FILLCOLOR&&X[N]!=mxConstants.STYLE_STROKECOLOR)W[X[N]]=T[X[N]]}),p=!0,k=mxUtils.bind(this,function(W,X,T,N,ca){if(null!=W){null!=T&&(p||null==X.labelBackgroundColor?p&&(X.labelBackgroundColor=mxConstants.NONE):(N=null!=N?N.background:null,ca=null!=ca?ca:f,null==N&&(N=ca.background),null==N&&(N=ca.defaultPageBackgroundColor),X.labelBackgroundColor=N));for(var H in W)if(null==T||null!=X[H]&&X[H]!=mxConstants.NONE||H!=mxConstants.STYLE_FILLCOLOR&&H!=mxConstants.STYLE_STROKECOLOR)p&&e.isEdge(T)&&H==mxConstants.STYLE_FONTCOLOR?X[H]="default":X[H]=W[H]}}),u=mxUtils.bind(this,function(W,X,T,N,ca){var H=document.createElement("div");H.style.position="relative";H.style.pointerEvents="none";H.style.width="60px";H.style.height="60px";ca.appendChild(H);var S=new Graph(H,null,null,f.getStylesheet());S.shapeForegroundColor="light-dark(#000000, #c0c0c0)";S.shapeBackgroundColor="light-dark(var(--ge-panel-color), var(--ge-dark-panel-color))";S.resetViewOnRootChange=-!1;S.foldingEnabled=!1;S.gridEnabled=!1;S.autoScroll=!1;S.setTooltips(!1);S.setConnectable(!1);S.setPanning(!1);S.setEnabled(!1);S.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(f.getCellStyle.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N,S);k(ia,Y,O,N,S);V&&(Y=f.postProcessCellStyle(O,Y));return Y};S.model.beginUpdate();try{var ea=S.insertVertex(S.getDefaultParent(),null,"Shape",2,2,-56,30,"strokeWidth=2;"),la=S.insertEdge(S.getDefaultParent(),null,"Connector",ea,ea,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");la.geometry.points=[new mxPoint(28,46)];la.geometry.offset=new mxPoint(0,8)}finally{S.model.endUpdate()}ca=S.view.getDrawPane().ownerSVGElement;null!=ca&&(H=ca.cloneNode(!0),H.style.position="absolute",H.style.clipPath="rect(0 52% 100% 0)",ca.style.clipPath="rect(0 100% 100% 51%)",ca.style.colorScheme="light",ca.parentNode.appendChild(H))}),+!1;S.foldingEnabled=!1;S.gridEnabled=!1;S.autoScroll=!1;S.setTooltips(!1);S.setConnectable(!1);S.setPanning(!1);S.setEnabled(!1);S.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(f.getCellStyle.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N,S);k(ia,Y,O,N,S);V&&(Y=f.postProcessCellStyle(O,Y));return Y};S.model.beginUpdate();try{var fa=S.insertVertex(S.getDefaultParent(),null,"Shape",2,2,+56,30,"strokeWidth=2;"),la=S.insertEdge(S.getDefaultParent(),null,"Connector",fa,fa,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");la.geometry.points=[new mxPoint(28,46)];la.geometry.offset=new mxPoint(0,8)}finally{S.model.endUpdate()}ca=S.view.getDrawPane().ownerSVGElement;null!=ca&&(H=ca.cloneNode(!0),H.style.position="absolute",H.style.clipPath="rect(0 52% 100% 0)",ca.style.clipPath="rect(0 100% 100% 51%)",ca.style.colorScheme="light",ca.parentNode.appendChild(H))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var y=mxUtils.bind(this,function(W,X,T,N,ca){var H=this.format.cachedStyleEntries[ca];null==H&&(H=document.createElement("div"),H.className="geGraphStylePreview",p||null==N||null==N.background||(H.style.backgroundColor=N.background),u(W,X,T,N,H),mxEvent.addGestureListeners(H,mxUtils.bind(this,function(S){H.style.opacity=.6}),null,mxUtils.bind(this,-function(S){H.style.opacity="";f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);k(W,f.currentVertexStyle);k(W,f.currentEdgeStyle);k(X,f.currentVertexStyle);k(T,f.currentEdgeStyle);e.beginUpdate();try{var ea=d.slice(),la;for(la in W)ea.push(la);h(ea,N);if(!p){var O=new ChangePageSetup(b,null!=N?N.background:null);O.ignoreImage=!0;e.execute(O);e.execute(new ChangeGridColor(b,null!=N&&null!=N.gridColor?N.gridColor:g))}}finally{e.endUpdate()}})),-mxClient.IS_TOUCH||(mxEvent.addListener(H,"mouseenter",mxUtils.bind(this,function(S){var ea=f.getCellStyle;S=f.background;var la=f.view.gridColor;p||(f.background=null!=N?N.background:null,f.view.gridColor=null!=N&&null!=N.gridColor?N.gridColor:g);f.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(ea.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N);k(ia,Y,O,N);V&&(Y=this.postProcessCellStyle(O,-Y));return Y};f.refresh();f.getCellStyle=ea;f.background=S;f.view.gridColor=la})),mxEvent.addListener(H,"mouseleave",mxUtils.bind(this,function(S){f.refresh()}))),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ca]=H));w.appendChild(H)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");+function(S){H.style.opacity="";f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);k(W,f.currentVertexStyle);k(W,f.currentEdgeStyle);k(X,f.currentVertexStyle);k(T,f.currentEdgeStyle);e.beginUpdate();try{var fa=d.slice(),la;for(la in W)fa.push(la);h(fa,N);if(!p){var O=new ChangePageSetup(b,null!=N?N.background:null);O.ignoreImage=!0;e.execute(O);e.execute(new ChangeGridColor(b,null!=N&&null!=N.gridColor?N.gridColor:g))}}finally{e.endUpdate()}})),+mxClient.IS_TOUCH||(mxEvent.addListener(H,"mouseenter",mxUtils.bind(this,function(S){var fa=f.getCellStyle;S=f.background;var la=f.view.gridColor;p||(f.background=null!=N?N.background:null,f.view.gridColor=null!=N&&null!=N.gridColor?N.gridColor:g);f.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(fa.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N);k(ia,Y,O,N);V&&(Y=this.postProcessCellStyle(O,+Y));return Y};f.refresh();f.getCellStyle=fa;f.background=S;f.view.gridColor=la})),mxEvent.addListener(H,"mouseleave",mxUtils.bind(this,function(S){f.refresh()}))),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ca]=H));w.appendChild(H)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");for(var W=10*this.format.currentStylePage;W<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);W++){var X=Editor.styles[W];y(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,W)}}),G=mxUtils.bind(this,function(W){0<=W&&W<C&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=W,E())});if(1<C){var J=document.createElement("div");J.className="geSwitcher";J.style.width="200px";for(var M=0;M<C;M++){var Q=document.createElement("div");Q.className="geSwitcherDot";mxUtils.bind(this,function(W,X){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(W)}))})(M,Q);J.appendChild(Q);D.push(Q)}a.appendChild(J);E();if(15>C&&0<D.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var K=M.cloneNode(!1);K.style.backgroundImage="url("+Editor.chevronRightImage+")";J.insertBefore(M,D[0]);J.appendChild(K);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}))}}else E();return a};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;@@ -3299,14 +3300,14 @@ function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListDiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}function y(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function J(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function K(){mxActor.call(this)}function W(){mxActor.call(this)}function X(){mxActor.call(this)}function T(){mxActor.call(this)}function N(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,N.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,N.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,N.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,N.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,-N.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,N.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function ea(){mxActor.call(this)}function la(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function ia(){mxShape.call(this)}function ta(){mxEllipse.call(this)}-function aa(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ja(){mxShape.call(this)}function na(){mxShape.call(this)}function ya(){mxShape.call(this)}function za(){mxShape.call(this)}function Ka(){mxCylinder.call(this)}function Qa(){mxCylinder.call(this)}function Ia(){mxRectangleShape.call(this)}function Ha(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);+N.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,N.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function ia(){mxShape.call(this)}function ta(){mxEllipse.call(this)}+function aa(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function La(){mxShape.call(this)}function na(){mxShape.call(this)}function za(){mxShape.call(this)}function Aa(){mxShape.call(this)}function Ma(){mxCylinder.call(this)}function Qa(){mxCylinder.call(this)}function Ja(){mxRectangleShape.call(this)}function Ia(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);this.spacing=0}function Wa(){mxActor.call(this)}function $a(){mxRectangleShape.call(this)}function db(){mxActor.call(this)}function pb(){mxActor.call(this)}function eb(){mxActor.call(this)}function Za(){mxActor.call(this)}function gb(){mxActor.call(this)}function bb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function L(){mxEllipse.call(this)}-function R(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ja(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+function R(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ja(){mxRhombus.call(this)}function ea(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function ya(){mxActor.call(this)}function Fa(){mxActor.call(this)}function va(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Ta(){mxConnector.call(this)}function Ra(c,l,t,n,r,v,x,I,z,da){x+=z;var U=n.clone();n.x-=r*(2*x+z);n.y-=v*(2*x+z);r*=x+z;v*=x+z;return function(){c.ellipse(U.x-r-x,U.y-v-x,2*x,2*x);da?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var x=l[v];null!=x&&(null==r?c.moveTo(x.x+t,x.y+n):null!=r&&c.lineTo(x.x+t,x.y+n));r=x}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=0;n<this.line.length&&!l;n++){var r=this.line[n];null!=r&&null!=t&&(l=mxUtils.rectangleIntersectsSegment(c,t,r));t=r}return l};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,l,t,n,r){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,x=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&I<r||!x&&I<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=x;x=I}c.rotate(-this.getShapeRotation(),+!1,x=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?xa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&I<r||!x&&I<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=x;x=I}c.rotate(-this.getShapeRotation(),v,x,l+n/2,t+r/2);s=this.scale;l=this.bounds.x/s;t=this.bounds.y/s;n=this.bounds.width/s;r=this.bounds.height/s;this.paintTableForeground(c,l,t,n,r)}};b.prototype.paintTableForeground=function(c,l,t,n,r){n=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(r=0;r<n.length;r++)a.prototype.paintTableLine(c,n[r],l,t)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(v,r);c.lineTo(0,r-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-v,0),c.lineTo(n,v),c.lineTo(v,@@ -3352,14 +3353,14 @@ function(){return!1};ca.prototype.getLabelBounds=function(c){if(mxUtils.getValue100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};ca.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",ca);mxCellRenderer.registerShape("process2",ca);mxUtils.extend(H,mxRectangleShape);H.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};H.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",H);mxUtils.extend(S,mxHexagon);S.prototype.size=30;S.prototype.position=.5;S.prototype.position2=.5;S.prototype.base=20;S.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",S);mxUtils.extend(ea,-mxActor);ea.prototype.size=.2;ea.prototype.fixedSize=20;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n--l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",ea);mxUtils.extend(la,mxHexagon);la.prototype.size=.25;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",S);mxUtils.extend(fa,+mxActor);fa.prototype.size=.2;fa.prototype.fixedSize=20;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-+l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",fa);mxUtils.extend(la,mxHexagon);la.prototype.size=.25;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,.5*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",la);mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",O);var mb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,t,n,r){mb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),mb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var I=this.style["symbol"+v+"Align"],-z=this.style["symbol"+v+"VerticalAlign"],da=this.style["symbol"+v+"Width"],U=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ua=this.style["symbol"+v+"VSpacing"]||Fa,Pa=this.style["symbol"+v+"ArcSpacing"];null!=Pa&&(Pa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Pa,Ua+=Pa);Pa=l;var oa=t;Pa=I==mxConstants.ALIGN_CENTER?Pa+(n-da)/2:I==mxConstants.ALIGN_RIGHT?Pa+(n-da-Fa):Pa+Fa;oa=z==mxConstants.ALIGN_MIDDLE?oa+(r-U)/2:z==mxConstants.ALIGN_BOTTOM?oa+(r-U-Ua):oa++z=this.style["symbol"+v+"VerticalAlign"],da=this.style["symbol"+v+"Width"],U=this.style["symbol"+v+"Height"],Ga=this.style["symbol"+v+"Spacing"]||0,Ua=this.style["symbol"+v+"VSpacing"]||Ga,Pa=this.style["symbol"+v+"ArcSpacing"];null!=Pa&&(Pa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Ga+=Pa,Ua+=Pa);Pa=l;var oa=t;Pa=I==mxConstants.ALIGN_CENTER?Pa+(n-da)/2:I==mxConstants.ALIGN_RIGHT?Pa+(n-da-Ga):Pa+Ga;oa=z==mxConstants.ALIGN_MIDDLE?oa+(r-U)/2:z==mxConstants.ALIGN_BOTTOM?oa+(r-U-Ua):oa+Ua;c.save();I=new x;I.style=this.style;x.prototype.paintVertexShape.call(I,c,Pa,oa,da,U);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",V);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ha);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",ia);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ta);mxUtils.extend(aa,mxShape);aa.prototype.paintVertexShape=@@ -3377,19 +3378,19 @@ l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixez,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I)]):(r=r?Math.max(0,Math.min(.5*z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z,I),new mxPoint(x+z-r,I+da),new mxPoint(x,I+da),new mxPoint(x+r,I)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+z?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?W.prototype.fixedSize:W.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z-r,I),new mxPoint(x+z,I+da),new mxPoint(x,I+da),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+z,I),new mxPoint(x+z-r,I+da),new mxPoint(x+r,I+da),new mxPoint(x,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(x+z,I),new mxPoint(x+z,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+z,I+r),new mxPoint(x+z,I+da-r),new mxPoint(x,-I+da),new mxPoint(x,I)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+z?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ea.prototype.fixedSize:ea.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height,U=c.getCenterX();+I+da),new mxPoint(x,I)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+z?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?fa.prototype.fixedSize:fa.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height,U=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+z-r,I),new mxPoint(x+z,c),new mxPoint(x+z-r,I+da),new mxPoint(x,I+da),new mxPoint(x+r,c),new mxPoint(x,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z,I),new mxPoint(x+z-r,c),new mxPoint(x+z,I+da),new mxPoint(x+r,I+da),new mxPoint(x,c),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(U,I),new mxPoint(x+z,I+r),new mxPoint(x+z,I+da),new mxPoint(U,I+da-r),new mxPoint(x,I+da),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(U,I+r),new mxPoint(x+z,I),new mxPoint(x+z,I+da-r),new mxPoint(U,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I)]);U=new mxPoint(U,c);n&&(t.x<x||t.x>x+z?U.y=t.y:U.x=t.x);return mxUtils.getPerimeterPoint(I,U,t)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?la.prototype.fixedSize:la.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height,U=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(U,I),new mxPoint(x+z,I+r),new mxPoint(x+z,I+da-r),new mxPoint(U,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I+r),new mxPoint(U,I)]):(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z-r,I),new mxPoint(x+z,c),new mxPoint(x+z-r,I+da),new mxPoint(x+-r,I+da),new mxPoint(x,c),new mxPoint(x+r,I)]);U=new mxPoint(U,c);n&&(t.x<x||t.x>x+z?U.y=t.y:U.x=t.x);return mxUtils.getPerimeterPoint(I,U,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Ja,mxShape);Ja.prototype.size=10;Ja.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};-mxCellRenderer.registerShape("lollipop",Ja);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.inset=2;na.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};-mxCellRenderer.registerShape("requires",na);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(za,mxShape);za.prototype.inset=2;za.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();-c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",za);mxUtils.extend(Ka,mxCylinder);Ka.prototype.jettyWidth=20;Ka.prototype.jettyHeight=10;Ka.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=Math.min(l,r-l),z=Math.min(I+2*l,r-l);v?(c.moveTo(t,I),-c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,z),c.lineTo(x,z),c.lineTo(x,z+l),c.lineTo(t,z+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,z+l),c.lineTo(0,z+l),c.lineTo(0,z),c.lineTo(t,z),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ka);mxUtils.extend(Qa,mxCylinder);Qa.prototype.jettyWidth=32;Qa.prototype.jettyHeight=12;Qa.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,+r,I+da),new mxPoint(x,c),new mxPoint(x+r,I)]);U=new mxPoint(U,c);n&&(t.x<x||t.x>x+z?U.y=t.y:U.x=t.x);return mxUtils.getPerimeterPoint(I,U,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(La,mxShape);La.prototype.size=10;La.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};+mxCellRenderer.registerShape("lollipop",La);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.inset=2;na.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};+mxCellRenderer.registerShape("requires",na);mxUtils.extend(za,mxShape);za.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",za);mxUtils.extend(Aa,mxShape);Aa.prototype.inset=2;Aa.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();+c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Aa);mxUtils.extend(Ma,mxCylinder);Ma.prototype.jettyWidth=20;Ma.prototype.jettyHeight=10;Ma.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=Math.min(l,r-l),z=Math.min(I+2*l,r-l);v?(c.moveTo(t,I),+c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,z),c.lineTo(x,z),c.lineTo(x,z+l),c.lineTo(t,z+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,z+l),c.lineTo(0,z+l),c.lineTo(0,z),c.lineTo(t,z),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ma);mxUtils.extend(Qa,mxCylinder);Qa.prototype.jettyWidth=32;Qa.prototype.jettyHeight=12;Qa.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=.3*r-l/2,z=.7*r-l/2;v?(c.moveTo(t,I),c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,z),c.lineTo(x,z),c.lineTo(x,z+l),c.lineTo(t,z+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,z+l),c.lineTo(0,z+l),c.lineTo(0,z),c.lineTo(t,z),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("component",-Qa);mxUtils.extend(Ia,mxRectangleShape);Ia.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ia);mxUtils.extend(Ha,mxDoubleEllipse);Ha.prototype.outerStroke=-!0;Ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ha);mxUtils.extend(ra,Ha);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,+Qa);mxUtils.extend(Ja,mxRectangleShape);Ja.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ja);mxUtils.extend(Ia,mxDoubleEllipse);Ia.prototype.outerStroke=+!0;Ia.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ia);mxUtils.extend(ra,Ia);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Da.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Da);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Wa,mxActor);Wa.prototype.size=30;Wa.prototype.isRoundable=function(){return!0};Wa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("manualInput",Wa);mxUtils.extend($a,mxRectangleShape);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.isHtmlAllowed=function(){return!1};$a.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/@@ -3405,80 +3406,80 @@ l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.quadTo(n/2,r/2,0,.8*l),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,.8*l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("loopLimit",B);mxUtils.extend(F,mxActor);F.prototype.size=.375;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",L);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();-c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();-c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",fa);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,I=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,I);c.lineTo(l+v+x,I-x/2);c.moveTo(l+v,I);c.lineTo(l+v+x,I+x/2);c.moveTo(l+v,I);c.lineTo(l+n-v,I);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I-x/2);c.moveTo(l+n-v,I);c.lineTo(l+-n-x-v,I+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ka);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),z="1"==mxUtils.getValue(this.style,"left","1"),+c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();+c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,I=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,I);c.lineTo(l+v+x,I-x/2);c.moveTo(l+v,I);c.lineTo(l+v+x,I+x/2);c.moveTo(l+v,I);c.lineTo(l+n-v,I);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I-x/2);c.moveTo(l+n-v,I);c.lineTo(l++n-x-v,I+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.drawHidden=!0;xa.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),z="1"==mxUtils.getValue(this.style,"left","1"),da="1"==mxUtils.getValue(this.style,"right","1"),U="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||I||da||U||z?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,t),this.outline||I?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||da?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||U?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||z)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};-mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Na,mxActor);Na.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,-0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Na);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.2;Aa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,-r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",Aa);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.25;Ga.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ga);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};-wa.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",+mxCellRenderer.registerShape("partialRectangle",xa);mxUtils.extend(Ka,mxEllipse);Ka.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ka);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,+0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Ha);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,+r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(va,mxActor);va.prototype.cst={RECT2:"mxgraph.basic.rect"};+va.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"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=+{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"}]}];va.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};va.prototype.strictDrawShape=function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),z=v&&v.size?v.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),da=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),U=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,-"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ua=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Pa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,U)),oa=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),sa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),qa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),pa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:+"indent",this.indent)))),Ga=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ua=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Pa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,U)),oa=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),sa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),qa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),pa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),wa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ba=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ca=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ea=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Cb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Db=-v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Bb=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Eb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Fb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Gb=Math.max(0,Math.min(50,z));v=wa.prototype;c.setDashed(Fa);Ua&&""!=Ua&&-c.setDashPattern(Ua);c.setStrokeWidth(Db);z=Math.min(.5*r,.5*n,z);I||(z=Gb*Math.min(n,r)/100);z=Math.min(z,.5*Math.min(n,r));I||(U=Math.min(Pa*Math.min(n,r)/100));U=Math.min(U,.5*Math.min(n,r)-z);(oa||sa||qa||pa)&&"frame"!=da&&(c.begin(),oa?v.moveNW(c,l,t,n,r,x,xa,z,pa):c.moveTo(0,0),oa&&v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),sa&&v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),qa&&v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),pa&&v.paintSW(c,-l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=I=Fb,"none"==zb&&(I=0),"none"==Bb&&(Fa=0),c.setGradient(zb,Bb,0,0,n,r,Eb,I,Fa),c.begin(),oa?v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa):c.moveTo(U,0),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),pa&&qa&&v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),qa&&sa&&v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),sa&&oa&&v.paintNEInner(c,-l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),oa&&pa&&v.paintNWInner(c,l,t,n,r,x,xa,z,U),c.fill(),"none"==Cb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,z,oa,sa,qa,pa),c.stroke()));oa||sa||qa||!pa?oa||sa||!qa||pa?!oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,-l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa||!sa||qa||pa?!oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,-l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke(),c.begin(),+v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Bb=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Eb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Fb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Gb=Math.max(0,Math.min(50,z));v=va.prototype;c.setDashed(Ga);Ua&&""!=Ua&&+c.setDashPattern(Ua);c.setStrokeWidth(Db);z=Math.min(.5*r,.5*n,z);I||(z=Gb*Math.min(n,r)/100);z=Math.min(z,.5*Math.min(n,r));I||(U=Math.min(Pa*Math.min(n,r)/100));U=Math.min(U,.5*Math.min(n,r)-z);(oa||sa||qa||pa)&&"frame"!=da&&(c.begin(),oa?v.moveNW(c,l,t,n,r,x,wa,z,pa):c.moveTo(0,0),oa&&v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),sa&&v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),qa&&v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),pa&&v.paintSW(c,+l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Ga=I=Fb,"none"==zb&&(I=0),"none"==Bb&&(Ga=0),c.setGradient(zb,Bb,0,0,n,r,Eb,I,Ga),c.begin(),oa?v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa):c.moveTo(U,0),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),pa&&qa&&v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),qa&&sa&&v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),sa&&oa&&v.paintNEInner(c,+l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),oa&&pa&&v.paintNWInner(c,l,t,n,r,x,wa,z,U),c.fill(),"none"==Cb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,wa,Ba,Ca,Ea,z,oa,sa,qa,pa),c.stroke()));oa||sa||qa||!pa?oa||sa||!qa||pa?!oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,+l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa||!sa||qa||pa?!oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,+l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,-l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,-l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa||sa||qa||pa?oa&&!sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,-z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):-oa&&!sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),-v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&-(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,-l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,-x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,-l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,-n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,-Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,-Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&pa&&("frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,-z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),c.close(),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,-Ea,z,U,qa,pa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),-v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke())):"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,-l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSE(c,-l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,-l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,z,oa,sa,qa,pa);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,0):c.moveTo(0,I)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==-v||!z?c.moveTo(n,0):c.moveTo(n-I,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(n,r):c.moveTo(n,r-I)};wa.prototype.moveSW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,r):c.moveTo(I,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,I,0)}else("snip"==-x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,0):c.lineTo(n-I,0)};wa.prototype.paintNE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n,I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==-x&&"fold"==v)&&c.lineTo(n,I);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,r):c.lineTo(n,r-I)};wa.prototype.paintLeft=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,0):c.lineTo(0,I)};wa.prototype.paintSE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,-I,0,0,l,n-I,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-I,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,r):c.lineTo(I,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,0,r-I)}else("snip"==x||"default"==-x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-I);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,z,.5*z+I);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,z,z+I);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(z,.5*z+I);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,z+I),c.lineTo(z,z+I)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,I,z,da,U){da||-U?!da&&U?c.lineTo(0,z):da&&!U?c.lineTo(z,0):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(I+.5*z,z):c.lineTo(I+z,z):c.lineTo(0,z):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-I-.5*z,z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-I-z,z);else if("snip"==x||"default"==x&&"snip"==-v)c.lineTo(n-I-.5*z,z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,I+z),c.lineTo(n-I-z,z)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n-z,0):da&&!U?c.lineTo(n,z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):c.lineTo(n-z,I+z):c.lineTo(n-z,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,-r):da&&!U?c.lineTo(0,r-z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):c.lineTo(z,r-I-z):c.lineTo(z,r):c.lineTo(0,r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-z,r-I-.5*z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-z,r-I-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n--z,r-I-.5*z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,r-I-z),c.lineTo(n-z,r-I-z)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n,r-z):da&&!U?c.lineTo(n-z,r):"square"==x||"default"==x&&"square"==v||!da?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-I-.5*z,r-z):c.lineTo(n-I-z,r-z):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,I,z,da){if(!da)c.lineTo(z,r);else if("square"==-x||"default"==x&&"square"==v)c.lineTo(z,r-z);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,I+.5*z,r-z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,I+z,r-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(I+.5*z,r-z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,r-I-z),c.lineTo(z+I,r-z)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(z,r-z):"rounded"==x||"default"==-x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,r-I-z):c.moveTo(0,r-z)};wa.prototype.lineSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(z,r-I-z):-c.lineTo(0,r-z)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,r-I-z):c.moveTo(n-z,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==-v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,r-I-z):c.lineTo(n-z,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.moveTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,I+z):c.moveTo(n,-z)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,I+z):c.lineTo(n,z)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.moveTo(z,0):da&&!U?c.moveTo(0,z):"square"==x||"default"==x&&"square"==v?c.moveTo(z,z):"rounded"==-x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,I+z):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,0):da&&!U?c.lineTo(0,z):"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==-x||"default"==x&&"fold"==v)&&c.lineTo(z,I+z):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,I,z,da,U,Fa,Ua,Pa,oa){if("fold"==v||"fold"==x||"fold"==I||"fold"==z||"fold"==da)("fold"==x||"default"==x&&"fold"==v)&&Fa&&oa&&(c.moveTo(0,U),c.lineTo(U,U),c.lineTo(U,0)),("fold"==I||"default"==I&&"fold"==v)&&Fa&&Ua&&(c.moveTo(n-U,0),c.lineTo(n-U,U),c.lineTo(n,U)),("fold"==z||"default"==z&&"fold"==v)&&Pa&&Ua&&(c.moveTo(n-U,r),c.lineTo(n-U,r-U),c.lineTo(n,r-U)),("fold"==da||"default"==da&&"fold"==-v)&&Pa&&oa&&(c.moveTo(0,r-U),c.lineTo(U,r-U),c.lineTo(U,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l){for(var t=[],n=0;n<l.length;n++)t.push(mxUtils.clone(l[n]));n=c.state.dashed;var r=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,t]);3<=c.state.strokeWidth&&(t=mxUtils.getValue(this.style,"fillColor",null),+l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,+l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa||sa||qa||pa?oa&&!sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,+z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):+oa&&!sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),+v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&+(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,+l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,+x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,+l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,+n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,+Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,+Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&pa&&("frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,+z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),c.close(),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,+Ea,z,U,qa,pa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),+v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke())):"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,+l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSE(c,+l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,+l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,wa,Ba,Ca,Ea,z,oa,sa,qa,pa);c.stroke()};va.prototype.moveNW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,0):c.moveTo(0,I)};va.prototype.moveNE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==+v||!z?c.moveTo(n,0):c.moveTo(n-I,0)};va.prototype.moveSE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(n,r):c.moveTo(n,r-I)};va.prototype.moveSW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,r):c.moveTo(I,r)};va.prototype.paintNW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,I,0)}else("snip"==+x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};va.prototype.paintTop=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,0):c.lineTo(n-I,0)};va.prototype.paintNE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n,I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==+x&&"fold"==v)&&c.lineTo(n,I);else c.lineTo(n,0)};va.prototype.paintRight=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,r):c.lineTo(n,r-I)};va.prototype.paintLeft=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,0):c.lineTo(0,I)};va.prototype.paintSE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,+I,0,0,l,n-I,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-I,r);else c.lineTo(n,r)};va.prototype.paintBottom=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,r):c.lineTo(I,r)};va.prototype.paintSW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,0,r-I)}else("snip"==x||"default"==+x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-I);else c.lineTo(0,r)};va.prototype.paintNWInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,z,.5*z+I);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,z,z+I);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(z,.5*z+I);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,z+I),c.lineTo(z,z+I)};va.prototype.paintTopInner=function(c,l,t,n,r,v,x,I,z,da,U){da||+U?!da&&U?c.lineTo(0,z):da&&!U?c.lineTo(z,0):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(I+.5*z,z):c.lineTo(I+z,z):c.lineTo(0,z):c.lineTo(0,0)};va.prototype.paintNEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-I-.5*z,z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-I-z,z);else if("snip"==x||"default"==x&&"snip"==+v)c.lineTo(n-I-.5*z,z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,I+z),c.lineTo(n-I-z,z)};va.prototype.paintRightInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n-z,0):da&&!U?c.lineTo(n,z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):c.lineTo(n-z,I+z):c.lineTo(n-z,0):c.lineTo(n,0)};va.prototype.paintLeftInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,+r):da&&!U?c.lineTo(0,r-z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):c.lineTo(z,r-I-z):c.lineTo(z,r):c.lineTo(0,r)};va.prototype.paintSEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-z,r-I-.5*z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-z,r-I-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-+z,r-I-.5*z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,r-I-z),c.lineTo(n-z,r-I-z)};va.prototype.paintBottomInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n,r-z):da&&!U?c.lineTo(n-z,r):"square"==x||"default"==x&&"square"==v||!da?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-I-.5*z,r-z):c.lineTo(n-I-z,r-z):c.lineTo(n,r)};va.prototype.paintSWInner=function(c,l,t,n,r,v,x,I,z,da){if(!da)c.lineTo(z,r);else if("square"==+x||"default"==x&&"square"==v)c.lineTo(z,r-z);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,I+.5*z,r-z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,I+z,r-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(I+.5*z,r-z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,r-I-z),c.lineTo(z+I,r-z)};va.prototype.moveSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(z,r-z):"rounded"==x||"default"==+x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,r-I-z):c.moveTo(0,r-z)};va.prototype.lineSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(z,r-I-z):+c.lineTo(0,r-z)};va.prototype.moveSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,r-I-z):c.moveTo(n-z,r)};va.prototype.lineSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==+v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,r-I-z):c.lineTo(n-z,r)};va.prototype.moveNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.moveTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,I+z):c.moveTo(n,+z)};va.prototype.lineNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,I+z):c.lineTo(n,z)};va.prototype.moveNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.moveTo(z,0):da&&!U?c.moveTo(0,z):"square"==x||"default"==x&&"square"==v?c.moveTo(z,z):"rounded"==+x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,I+z):c.moveTo(0,0)};va.prototype.lineNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,0):da&&!U?c.lineTo(0,z):"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==+x||"default"==x&&"fold"==v)&&c.lineTo(z,I+z):c.lineTo(0,0)};va.prototype.paintFolds=function(c,l,t,n,r,v,x,I,z,da,U,Ga,Ua,Pa,oa){if("fold"==v||"fold"==x||"fold"==I||"fold"==z||"fold"==da)("fold"==x||"default"==x&&"fold"==v)&&Ga&&oa&&(c.moveTo(0,U),c.lineTo(U,U),c.lineTo(U,0)),("fold"==I||"default"==I&&"fold"==v)&&Ga&&Ua&&(c.moveTo(n-U,0),c.lineTo(n-U,U),c.lineTo(n,U)),("fold"==z||"default"==z&&"fold"==v)&&Pa&&Ua&&(c.moveTo(n-U,r),c.lineTo(n-U,r-U),c.lineTo(n,r-U)),("fold"==da||"default"==da&&"fold"==+v)&&Pa&&oa&&(c.moveTo(0,r-U),c.lineTo(U,r-U),c.lineTo(U,r))};mxCellRenderer.registerShape(va.prototype.cst.RECT2,va);va.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l){for(var t=[],n=0;n<l.length;n++)t.push(mxUtils.clone(l[n]));n=c.state.dashed;var r=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,t]);3<=c.state.strokeWidth&&(t=mxUtils.getValue(this.style,"fillColor",null),null!=t&&(c.setStrokeColor(t),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(n,r),ua.prototype.origPaintEdgeShape.apply(this,[c,l])))};mxCellRenderer.registerShape("filledEdge",ua);mxUtils.extend(Ta,mxConnector);Ta.prototype.defaultWidth=4;Ta.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};Ta.prototype.getFlowAnimationPath=function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};Ta.prototype.origPaintEdgeShape=Ta.prototype.paintEdgeShape;Ta.prototype.paintEdgeShape=function(c,l){for(var t=[],n=0;n<l.length;n++)t.push(mxUtils.clone(l[n]));n=c.state.dashed;var r=c.state.fixDash,v=this.getEdgeWidth();c.setStrokeWidth(v+2*this.strokewidth);c.setDashed(!1);Ta.prototype.origPaintEdgeShape.apply(this,[c,t]);t=mxUtils.getValue(this.style,"fillColor",null);null!=t&&(c.setStrokeWidth(v),c.setStrokeColor(t),c.setDashed(n,r),Ta.prototype.origPaintEdgeShape.apply(this,[c,l]))};mxCellRenderer.registerShape("pipe",Ta);"undefined"!==typeof StyleFormatPanel&&-function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Fa/2,n.y-Fa/2+U/2);c.lineTo(n.x+Fa/2-3*U/2,n.y-3*Fa/2-U/2);-c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1),Ua=n.x+U/2,Pa=n.y+Fa/2;n.x-=U;n.y-=Fa;return function(){c.begin();c.moveTo(Ua-U/2-Fa/2,Pa-Fa/2+U/2);c.lineTo(Ua-U/2+Fa/2,Pa-Fa/2-U/2);c.lineTo(Ua+Fa/2-3*U/2,Pa-3*Fa/2-U/2);c.lineTo(Ua-Fa/2-3*U/2,Pa-3*Fa/2+U/2);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Fa/2,n.y-Fa/2+U/-2);c.lineTo(n.x+Fa/2-3*U/2,n.y-3*Fa/2-U/2);c.moveTo(n.x-U/2+Fa/2,n.y-Fa/2-U/2);c.lineTo(n.x-Fa/2-3*U/2,n.y-3*Fa/2+U/2);c.stroke()}});mxMarker.addMarker("circle",Ra);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,I,z,da){var U=n.clone(),Fa=Ra.apply(this,arguments),Ua=r*(x+2*z),Pa=v*(x+2*z);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(U.x-r*z,U.y-v*z);c.lineTo(U.x-2*Ua+r*z,U.y-2*Pa+v*z);c.moveTo(U.x-Ua-Pa+v*z,U.y-Pa+Ua-r*z);c.lineTo(U.x+Pa-Ua-v*z,U.y-Pa-Ua+r*z);c.stroke()}});-mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1),Ua=n.clone();n.x-=U;n.y-=Fa;return function(){c.begin();c.moveTo(Ua.x-Fa,Ua.y+U);c.quadTo(n.x-Fa,n.y+U,n.x,n.y);c.quadTo(n.x+Fa,n.y-U,Ua.x+Fa,Ua.y-U);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,x,I,z,da){l=r*z*1.118;t=v*z*1.118;r*=x+z;v*=x+z;var U=n.clone();U.x-=l;U.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(U.x,U.y);I?c.lineTo(U.x-r-v/2,U.y-v+r/2):c.lineTo(U.x+v/2-r,U.y--v-r/2);c.lineTo(U.x-r,U.y-v);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,I,z,da,U){v*=I+da;x*=I+da;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);z?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/c):l.lineTo(Fa.x+x/c-v,Fa.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=function(c,l,t){return nb(c,["width"],l,function(n,r,v,x,I){I=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x+-r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));c.style.width=Math.round(2*n)/c.view.scale-t})},nb=function(c,l,t,n,r){return La(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var I=x.length-1;v=c.view.translate;var z=c.view.scale,da=t?x[0]:x[I];x=t?x[1]:x[I-1];I=x.x-da.x;var U=x.y-da.y,Fa=Math.sqrt(I*I+U*U);da=n.call(this,Fa,I/Fa,U/Fa,da,x);return new mxPoint(da.x/z-v.x,da.y/z-v.y)}return null},function(v,x,I){var z=c.absolutePoints,-da=z.length-1;v=c.view.translate;var U=c.view.scale,Fa=t?z[0]:z[da];z=t?z[1]:z[da-1];da=z.x-Fa.x;var Ua=z.y-Fa.y,Pa=Math.sqrt(da*da+Ua*Ua);x.x=(x.x+v.x)*U;x.y=(x.y+v.y)*U;r.call(this,Pa,da/Pa,Ua/Pa,Fa,z,x,I)})},cb=function(c,l){return function(t){return[nb(t,["startWidth"],!0,function(n,r,v,x,I){I=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));t.style.startWidth=-Math.round(2*n)/t.view.scale-l})]}},vb=function(c){return function(l){return[La(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=-Math.max(0,Math.min(c,(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[La(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},yb=function(c,l,t){return function(n){var r=[La(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+-x,v.y+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},sb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=[La(v,["size"],function(I){var z=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=parseFloat(mxUtils.getValue(this.state.style,"size",z?r:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,-da*(z?1:I.width))),I.getCenterY())},function(I,z,da){I=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?z.x-I.x:Math.max(0,Math.min(t,(z.x-I.x)/I.width));this.state.style.size=I},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},qb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[La(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,-"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},rb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l}},ib=function(c,l){return La(c,+function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Ga/2,n.y-Ga/2+U/2);c.lineTo(n.x+Ga/2-3*U/2,n.y-3*Ga/2-U/2);+c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1),Ua=n.x+U/2,Pa=n.y+Ga/2;n.x-=U;n.y-=Ga;return function(){c.begin();c.moveTo(Ua-U/2-Ga/2,Pa-Ga/2+U/2);c.lineTo(Ua-U/2+Ga/2,Pa-Ga/2-U/2);c.lineTo(Ua+Ga/2-3*U/2,Pa-3*Ga/2-U/2);c.lineTo(Ua-Ga/2-3*U/2,Pa-3*Ga/2+U/2);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Ga/2,n.y-Ga/2+U/+2);c.lineTo(n.x+Ga/2-3*U/2,n.y-3*Ga/2-U/2);c.moveTo(n.x-U/2+Ga/2,n.y-Ga/2-U/2);c.lineTo(n.x-Ga/2-3*U/2,n.y-3*Ga/2+U/2);c.stroke()}});mxMarker.addMarker("circle",Ra);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,I,z,da){var U=n.clone(),Ga=Ra.apply(this,arguments),Ua=r*(x+2*z),Pa=v*(x+2*z);return function(){Ga.apply(this,arguments);c.begin();c.moveTo(U.x-r*z,U.y-v*z);c.lineTo(U.x-2*Ua+r*z,U.y-2*Pa+v*z);c.moveTo(U.x-Ua-Pa+v*z,U.y-Pa+Ua-r*z);c.lineTo(U.x+Pa-Ua-v*z,U.y-Pa-Ua+r*z);c.stroke()}});+mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1),Ua=n.clone();n.x-=U;n.y-=Ga;return function(){c.begin();c.moveTo(Ua.x-Ga,Ua.y+U);c.quadTo(n.x-Ga,n.y+U,n.x,n.y);c.quadTo(n.x+Ga,n.y-U,Ua.x+Ga,Ua.y-U);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,x,I,z,da){l=r*z*1.118;t=v*z*1.118;r*=x+z;v*=x+z;var U=n.clone();U.x-=l;U.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(U.x,U.y);I?c.lineTo(U.x-r-v/2,U.y-v+r/2):c.lineTo(U.x+v/2-r,U.y-+v-r/2);c.lineTo(U.x-r,U.y-v);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,I,z,da,U){v*=I+da;x*=I+da;var Ga=r.clone();return function(){l.begin();l.moveTo(Ga.x,Ga.y);z?l.lineTo(Ga.x-v-x/c,Ga.y-x+v/c):l.lineTo(Ga.x+x/c-v,Ga.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=function(c,l,t){return nb(c,["width"],l,function(n,r,v,x,I){I=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x++r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));c.style.width=Math.round(2*n)/c.view.scale-t})},nb=function(c,l,t,n,r){return Na(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var I=x.length-1;v=c.view.translate;var z=c.view.scale,da=t?x[0]:x[I];x=t?x[1]:x[I-1];I=x.x-da.x;var U=x.y-da.y,Ga=Math.sqrt(I*I+U*U);da=n.call(this,Ga,I/Ga,U/Ga,da,x);return new mxPoint(da.x/z-v.x,da.y/z-v.y)}return null},function(v,x,I){var z=c.absolutePoints,+da=z.length-1;v=c.view.translate;var U=c.view.scale,Ga=t?z[0]:z[da];z=t?z[1]:z[da-1];da=z.x-Ga.x;var Ua=z.y-Ga.y,Pa=Math.sqrt(da*da+Ua*Ua);x.x=(x.x+v.x)*U;x.y=(x.y+v.y)*U;r.call(this,Pa,da/Pa,Ua/Pa,Ga,z,x,I)})},cb=function(c,l){return function(t){return[nb(t,["startWidth"],!0,function(n,r,v,x,I){I=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));t.style.startWidth=+Math.round(2*n)/t.view.scale-l})]}},vb=function(c){return function(l){return[Na(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=+Math.max(0,Math.min(c,(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Na(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},yb=function(c,l,t){return function(n){var r=[Na(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x++x,v.y+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},sb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=[Na(v,["size"],function(I){var z=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=parseFloat(mxUtils.getValue(this.state.style,"size",z?r:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,+da*(z?1:I.width))),I.getCenterY())},function(I,z,da){I=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?z.x-I.x:Math.max(0,Math.min(t,(z.x-I.x)/I.width));this.state.style.size=I},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},qb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Na(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,+"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},rb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l}},ib=function(c,l){return Na(c,[mxConstants.STYLE_ARCSIZE],function(t){var n=null!=l?l:t.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var r=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(t.x+t.width-Math.min(t.width/2,r),t.y+n)}r=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(t.x+t.width-Math.min(Math.max(t.width/2,t.height/2),Math.min(t.width,t.height)*-r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},La=function(c,l,t,n,r,v,x){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(da){for(var U=0;U<l.length;U++)this.copyStyle(l[U]);+r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},Na=function(c,l,t,n,r,v,x){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(da){for(var U=0;U<l.length;U++)this.copyStyle(l[U]);x&&x(da)};I.getPosition=t;I.setPosition=n;I.ignoreGrid=null!=r?r:!0;if(v){var z=I.positionChanged;I.positionChanged=function(){z.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},ob={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},pipe:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(nb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,r,v,x,I){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,x,I,z,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,z.x,z.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(da.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),t.push(nb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,@@ -3489,32 +3490,32 @@ r*(I+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.viewmxEvent.isAltDown(da.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),t.push(nb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,x,I){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,I,z,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,z.x,z.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(da.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=-parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ib(c,t/2))}l.push(La(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=+parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ib(c,t/2))}l.push(Na(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],I=0;I<v.length;I++)v[I]!=c.cell&&r.isSwimlane(v[I])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[I]))==-n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:rb(),ext:rb(),rectangle:rb(),triangle:rb(),rhombus:rb(),umlLifeline:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[La(c,+n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:rb(),ext:rb(),rectangle:rb(),triangle:rb(),rhombus:rb(),umlLifeline:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Na(c,["width","height"],function(l){var t=Math.max(ma.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",ma.prototype.width))),n=Math.max(1.5*ma.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",ma.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(ma.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*ma.prototype.corner,Math.min(l.height,t.y-l.y)))},-!1)]},process:function(c){var l=[La(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,-!1)&&l.push(ib(c));return l},cross:function(c){return[La(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Aa.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[La(c,["size"],function(l){var t=Math.max(0,-Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},-function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[La(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Wa.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));-return l},dataStorage:function(c){return[La(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?bb.prototype.fixedSize:bb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=-[La(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position)));mxUtils.getValue(this.state.style,"base",S.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",S.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=-Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),La(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",S.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),La(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,+!1)]},process:function(c){var l=[Na(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,+!1)&&l.push(ib(c));return l},cross:function(c){return[Na(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ya.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,+Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},+function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Na(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Wa.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));+return l},dataStorage:function(c){return[Na(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?bb.prototype.fixedSize:bb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=+[Na(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position)));mxUtils.getValue(this.state.style,"base",S.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",S.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=+Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Na(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",S.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Na(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",S.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},internalStorage:function(c){var l=-[La(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},module:function(c){return[La(c,-["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ka.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ka.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[La(c,-["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[La(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,+[Na(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},module:function(c){return[Na(c,+["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ma.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[Na(c,+["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Na(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:vb(1),doubleArrow:vb(.5),"mxgraph.arrows2.wedgeArrow":cb(20,20),"mxgraph.arrows2.wedgeArrowDashed":cb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":cb(20,20),-folder:function(c){return[La(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,t.x-l.x));mxUtils.getValue(this.state.style,-"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},-!1)]},tape:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[La(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*-Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=+folder:function(c){return[Na(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,t.x-l.x));mxUtils.getValue(this.state.style,+"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},+!1)]},tape:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Na(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*+Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,-n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:sb(ea.prototype.size,!0,null,!0,ea.prototype.fixedSize),hexagon:sb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:sb(X.prototype.size,!1),display:sb(Ga.prototype.size,!1),cube:yb(1,e.prototype.size,!1),card:yb(.5,J.prototype.size,!0),loopLimit:yb(.5,B.prototype.size,!0),trapezoid:qb(.5,W.prototype.size,W.prototype.fixedSize),parallelogram:qb(1,K.prototype.size,-K.prototype.fixedSize)};Graph.createHandle=La;Graph.handleFactory=ob;var ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=ob[l];null==l&&null!=this.state.shape&&+n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:sb(fa.prototype.size,!0,null,!0,fa.prototype.fixedSize),hexagon:sb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:sb(X.prototype.size,!1),display:sb(Fa.prototype.size,!1),cube:yb(1,e.prototype.size,!1),card:yb(.5,J.prototype.size,!0),loopLimit:yb(.5,B.prototype.size,!0),trapezoid:qb(.5,W.prototype.size,W.prototype.fixedSize),parallelogram:qb(1,K.prototype.size,+K.prototype.fixedSize)};Graph.createHandle=Na;Graph.handleFactory=ob;var ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=ob[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=ob[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=ob[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var jb=new mxPoint(1,0),hb=new mxPoint(1,0),Ya=mxUtils.toRadians(-30);-jb=mxUtils.getRotatedPoint(jb,Math.cos(Ya),Math.sin(Ya));var xb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(xb),Math.sin(xb));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var z=jb.x,da=jb.y,U=hb.x,Fa=hb.y,Ua="horizontal"==-mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=I){c=function(oa,sa,qa){oa-=Pa.x;var pa=sa-Pa.y;sa=(Fa*oa-U*pa)/(z*Fa-da*U);oa=(da*oa-z*pa)/(da*U-z*Fa);Ua?(qa&&(Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa),r.push(Pa)),Pa=new mxPoint(Pa.x+U*oa,Pa.y+Fa*oa)):(qa&&(Pa=new mxPoint(Pa.x+U*oa,Pa.y+Fa*oa),r.push(Pa)),Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa));r.push(Pa)};var Pa=I;null==n&&(n=new mxPoint(I.x+(x.x-I.x)/2,I.y+(x.y-I.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",+jb=mxUtils.getRotatedPoint(jb,Math.cos(Ya),Math.sin(Ya));var xb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(xb),Math.sin(xb));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var z=jb.x,da=jb.y,U=hb.x,Ga=hb.y,Ua="horizontal"==+mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=I){c=function(oa,sa,qa){oa-=Pa.x;var pa=sa-Pa.y;sa=(Ga*oa-U*pa)/(z*Ga-da*U);oa=(da*oa-z*pa)/(da*U-z*Ga);Ua?(qa&&(Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa),r.push(Pa)),Pa=new mxPoint(Pa.x+U*oa,Pa.y+Ga*oa)):(qa&&(Pa=new mxPoint(Pa.x+U*oa,Pa.y+Ga*oa),r.push(Pa)),Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa));r.push(Pa)};var Pa=I;null==n&&(n=new mxPoint(I.x+(x.x-I.x)/2,I.y+(x.y-I.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return Ab.apply(this,arguments)};h.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};w.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,@@ -3522,7 +3523,7 @@ Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.pus0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=+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))];xa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,@@ -3534,10 +3535,10 @@ null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,."tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};$a.prototype.constraints=mxRectangleShape.prototype.constraints;bb.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=-mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,-.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Ka.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ka.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,-"jettyHeight",Ka.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,+0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};$a.prototype.constraints=mxRectangleShape.prototype.constraints;bb.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ka.prototype.constraints=+mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,+.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Ma.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ma.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,+"jettyHeight",Ma.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,l),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(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,l));t>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.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)];ha.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,@@ -3545,8 +3546,8 @@ l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.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)];ea.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),new mxConnectionConstraint(new mxPoint(.75,0),!1)];fa.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)];La.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,@@ -3559,12 +3560,12 @@ new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new1),!1));return c};pb.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)];Za.prototype.getConstraints=function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));return c};gb.prototype.getConstraints=function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Aa.prototype.getConstraints=+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};ya.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,x=(l-r)/2;r=x+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ba.prototype.constraints=null;q.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)];A.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)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,+.9),!1)];A.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)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function f(k,u,w,y,C){C.getModel().beginUpdate();try{var D=C.getCellGeometry(k);null!=D&&w&&y&&(w/=y,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,C.getModel().setGeometry(k,D));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,@@ -3709,7 +3710,7 @@ e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.eMenus.prototype.createMenubar=function(a){var b=new Menubar(this.editorUi,a),f=mxUtils.bind(this,function(){for(var g=this.defaultMenuItems,d=0;d<g.length;d++)mxUtils.bind(this,function(h){var m=b.addMenu(mxResources.get(g[d]),mxUtils.bind(this,function(){h.funct.apply(this,arguments)}));this.menuCreated(h,m)})(this.get(g[d]));"kennedy"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme||a.appendChild(this.editorUi.statusContainer)});f();var e=mxUtils.bind(this,function(){a.innerHTML="";f()});this.editorUi.addListener("currentThemeChanged",e);this.editorUi.addListener("languageChanged",e);return b};Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",b.className=f,a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Menubar.prototype.addMenu=function(a,b,f,e){a=this.editorUi.createMenuElement(a,b,e);a.className="geMenubar";null!=f?this.container.insertBefore(a,f):this.container.appendChild(a);return a};Menubar.prototype.destroy=function(){};function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};-Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}+Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.init();this.gestureHandler=mxUtils.bind(this,function(f){this.editorUi.isHideCurrentMenuEvent(f)&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}Toolbar.prototype.init=function(){var a=this.addMenu(this.editorUi.menus.get("viewPanels"),null,Editor.dockRightImage);a.setAttribute("data-min-width","720");this.addSeparator(null,720);var b=this.editorUi.createZoomInput();b.setAttribute("data-min-width","580");this.container.appendChild(b);this.addSeparator(null,580);this.addItems(["zoomIn","zoomOut"],null,null,[Editor.zoomInImage,Editor.zoomOutImage],460);this.addSeparator(null,460);this.addItems(["undo","redo"],null,null,[Editor.undoImage,Editor.redoImage]);this.addSeparator(null,260);this.addItems(["delete"],null,null,[Editor.trashImage],260);this.addSeparator(null,300);this.addItems(["toFront","toBack"],null,null,[Editor.toFrontImage,Editor.toBackImage],660);this.addSeparator(null,660);this.addItems(["fillColor"],null,null,[Editor.fillColorImage],740);this.addItems(["strokeColor"],null,null,[Editor.strokeColorImage],780);this.addItems(["shadow"],null,null,[Editor.shadowImage],820);this.addSeparator(null,820);this.edgeShapeMenu=this.addMenu(this.editorUi.menus.get("edgeShape"));this.edgeShapeMenu.setAttribute("data-min-width",440);this.edgeStyleMenu=this.addMenu(this.editorUi.menus.get("edgeStyle"));this.edgeStyleMenu.setAttribute("data-min-width",480);this.addSeparator(null,480);var f=this.addMenu(this.editorUi.menus.get("insert"),null,Editor.plusImage);f.setAttribute("data-min-width",300);var e=f.cloneNode(!0);e.setAttribute("data-min-width",330);e.style.backgroundImage="url("+Editor.shapesImage+")";this.editorUi.addShapePicker(e,!0);this.container.appendChild(e);var g=@@ -3748,26 +3749,26 @@ G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+"4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(D,E){E=null!=E?E:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",E=!0;var G=mxUtils.parseColor(D);D=G.r/255;var J=G.g/255,M=G.b/255,Q=Math.min(Math.min(D,J),M);G=Math.max(Math.max(D,J),M);var K=G-Q;0===K?D=[null,0,G]:(D=D===Q?3+(M-J)/K:J===Q?5+(D-M)/K:1+(J-D)/K,D=[6===D?0:D,K/G,G]);null!=D[0]&&(g[0]=D[0]);0!=D[2]&&(g[1]=D[1]);g[2]=D[2];p(E)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";-var ColorDialog=function(a,b,f,e,g,d,h){function m(ba){return mxUtils.color2hex("#"+ba).substring(1).toUpperCase()}function p(){ea.src="none"==S.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ba){ba||"none"==S.style.display?(S.style.display="flex",N.focus()):S.style.display="none";p()}function u(ba){""==ba.value&&null!=Q&&W?ba.style.background=ba==N?Q.dark:Q.light:""==ba.value||ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)?ba.style.background="transparent":ba.style.background=+var ColorDialog=function(a,b,f,e,g,d,h){function m(ba){return mxUtils.color2hex("#"+ba).substring(1).toUpperCase()}function p(){fa.src="none"==S.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ba){ba||"none"==S.style.display?(S.style.display="flex",N.focus()):S.style.display="none";p()}function u(ba){""==ba.value&&null!=Q&&W?ba.style.background=ba==N?Q.dark:Q.light:""==ba.value||ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)?ba.style.background="transparent":ba.style.background="#"+ba.value;ba.style.color="transparent"==ba.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ba.style.background)?"#ffffff":"#000000"}function w(){u(X);u(N)}function y(ba){ba?h&&null!=Q?(X.value=Q.light.substring(1).toUpperCase(),ba=!1):(X.value="",N.value="",ca.value="automatic",X.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),N.setAttribute("title",mxResources.get("useBlackAndWhite")),X.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==X.value&&-null!=Q&&(X.value=Q.light.substring(1).toUpperCase()),X.removeAttribute("placeholder"),X.removeAttribute("title"),""==N.value&&null!=Q&&(N.value=Q.dark.substring(1).toUpperCase()),N.removeAttribute("placeholder"),N.removeAttribute("title"),ba=!1);W=ba}function C(ba){"#"==ba.value.charAt(0)&&(ba.value=ba.value.substring(1));var ma=ba.value,Ja=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ja&&"default"!=Ja&&Ja!=mxResources.get("default").toLowerCase()&&Ja!=mxResources.get("automatic").toLowerCase()||+null!=Q&&(X.value=Q.light.substring(1).toUpperCase()),X.removeAttribute("placeholder"),X.removeAttribute("title"),""==N.value&&null!=Q&&(N.value=Q.dark.substring(1).toUpperCase()),N.removeAttribute("placeholder"),N.removeAttribute("title"),ba=!1);W=ba}function C(ba){"#"==ba.value.charAt(0)&&(ba.value=ba.value.substring(1));var ma=ba.value,La=ma.toLowerCase();null==g||""!=ma&&"automatic"!=La&&"default"!=La&&La!=mxResources.get("default").toLowerCase()&&La!=mxResources.get("automatic").toLowerCase()||null==Q?(ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)||(ba.value=m(ba.value),ha.fromString("#"+ba.value)),y(!1),ba!=N||X.value==mxConstants.NONE&&N.value==mxConstants.NONE||(ca.value="custom"),ba==X&&"automatic"==ca.value&&(X.value==mxConstants.NONE?N.value=mxConstants.NONE:mxUtils.isVarColor(X.value)?N.value=X.value:N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ba.value)).substring(1).toUpperCase()),w()):V.click()}function D(){var ba=X.value,ma=N.value;if(W&&null!=Q||(/(^#?[a-zA-Z0-9]*$)/.test(ba)||mxUtils.isVarColor(ba))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(W)ba="default";else if(""==ba&&(ba=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),ba==mxConstants.NONE||mxUtils.isVarColor(ba)||"#"==ba.charAt(0)||(ba="#"+m(ba)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),ba!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=ca.value&&ma!=mxConstants.NONE?ba==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+ba+","+ma+")",12):ba!=mxConstants.NONE&&ColorDialog.addRecentColor(ba.substring(1),12),"none"!=ba||"none"!=ma)ba=ba==mxConstants.NONE?"transparent":ba,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==ca.value||(ba="light-dark("+ba+","+ma+")");Y(ba);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||window.setTimeout(function(){ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)},0)}function G(){ia.value!=mxConstants.NONE&&""!=ia.value&&ha.fromString("#"+ia.value,!0)}function J(){var ba=aa(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ba.style.marginBottom="8px";return ba}function M(ba){13==ba.keyCode&&(C(mxEvent.getSource(ba)),D())}var Q=null!=d?mxUtils.getLightDarkColor(d,null,null,h):null,K=a.editor.graph;this.editorUi=a;var W=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var X=document.createElement("input");X.style.textOverflow="ellipsis";X.style.margin="0 0 0 4px";X.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var T=document.createElement("div");T.style.display="flex";T.style.alignItems="center";d.appendChild(T);var N=document.createElement("input");N.style.textOverflow="ellipsis";N.style.margin="0 4px";N.style.maxWidth="60px";N.style.width="100%";var ca=document.createElement("select");ca.style.textOverflow="ellipsis";ca.style.width="100%";var H=document.createElement("option");H.setAttribute("value","automatic");mxUtils.write(H,mxResources.get("automatic"));ca.appendChild(H);H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("userDefined"));ca.appendChild(H);ca.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var S=document.createElement("div");S.style.padding=-"0 6px 0 6px";H=document.createElement("img");H.setAttribute("title",mxResources.get("dark"));H.className="geAdaptiveAsset";H.src=Editor.thinDarkImage;H.style.width="20px";S.appendChild(H);mxEvent.addListener(H,"click",function(){N.focus()});S.appendChild(N);S.appendChild(ca);S.style.display="flex";S.style.alignItems="center";H=document.createElement("div");H.style.display="flex";H.style.alignItems="center";H.style.userSelect="none";H.style.cursor="pointer";H.style.padding="2px 0 2px 0";var ea=document.createElement("img");-ea.setAttribute("title",mxResources.get("dark"));ea.className="geAdaptiveAsset";ea.style.marginLeft="-2px";H.appendChild(ea);mxUtils.write(H,mxResources.get("advanced"));var la=document.createElement("img");la.setAttribute("title",mxResources.get("swap"));la.className="geAdaptiveAsset";la.style.marginLeft="4px";la.style.width="16px";la.style.height="16px";la.style.cursor="pointer";la.src=Editor.swapImage;mxEvent.addListener(la,"click",function(ba){k(!0);ca.value="custom";var ma=X.value;X.value=N.value;+"0 6px 0 6px";H=document.createElement("img");H.setAttribute("title",mxResources.get("dark"));H.className="geAdaptiveAsset";H.src=Editor.thinDarkImage;H.style.width="20px";S.appendChild(H);mxEvent.addListener(H,"click",function(){N.focus()});S.appendChild(N);S.appendChild(ca);S.style.display="flex";S.style.alignItems="center";H=document.createElement("div");H.style.display="flex";H.style.alignItems="center";H.style.userSelect="none";H.style.cursor="pointer";H.style.padding="2px 0 2px 0";var fa=document.createElement("img");+fa.setAttribute("title",mxResources.get("dark"));fa.className="geAdaptiveAsset";fa.style.marginLeft="-2px";H.appendChild(fa);mxUtils.write(H,mxResources.get("advanced"));var la=document.createElement("img");la.setAttribute("title",mxResources.get("swap"));la.className="geAdaptiveAsset";la.style.marginLeft="4px";la.style.width="16px";la.style.height="16px";la.style.cursor="pointer";la.src=Editor.swapImage;mxEvent.addListener(la,"click",function(ba){k(!0);ca.value="custom";var ma=X.value;X.value=N.value;N.value=ma;w();mxEvent.consume(ba)});H.appendChild(la);var O=document.createElement("img");O.setAttribute("title",mxResources.get("copy"));O.className="geAdaptiveAsset";O.style.marginLeft="4px";O.style.width="16px";O.style.height="16px";O.style.cursor="pointer";O.src=Editor.doubleArrowUpImage;mxEvent.addListener(O,"click",function(ba){ia==N?X.value=N.value:N.value=X.value;k(!0);ca.value="custom";w();mxEvent.consume(ba)});H.appendChild(O);p();mxEvent.addListener(H,"click",function(){k();p();ColorDialog.collapsed="none"==S.style.display});var V=mxUtils.button("",function(){y(!0);w();ia.focus();""==ia.value&&null!=Q&&W&&ha.fromString(ia==N?Q.dark:Q.light,!0)});mxEvent.addListener(ca,"change",function(){"automatic"==ca.value?(X.focus(),C(X)):(y(!1),mxUtils.isVarColor(N.value)||(N.value=W&&null!=Q?Q.dark.substring(1).toUpperCase():N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+X.value)).substring(1).toUpperCase()),N.focus(),E());w()});mxEvent.addListener(X,"change",function(){C(X)});mxEvent.addListener(N,"change",function(){C(N)});var Y=null!=f?f:this.createApplyFunction();this.init=function(){E()};var ha=new ColorPicker,ia=Editor.isDarkMode()&&("auto"==K.getAdaptiveColors()||"simple"==K.getAdaptiveColors()&&"custom"==ca.value)&&!h?N:X;mxEvent.addListener(X,"focus",function(){ia=X;G();O.src=Editor.doubleArrowDownImage});mxEvent.addListener(N,"focus",function(){ia=N;G();O.src=Editor.doubleArrowUpImage});ha.addListener("change",function(ba,ma){ba=ma.getProperty("color").substring(1).toUpperCase();ia.value.toUpperCase()!=-ba&&(ia.value=ba,C(ia),window.setTimeout(function(){ia.focus()},0))});f=document.createElement("div");f.appendChild(ha.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var aa=mxUtils.bind(this,function(ba,ma,Ja,na){ma=null!=ma?ma:12;var ya=document.createElement("table");ya.style.borderCollapse="collapse";ya.setAttribute("cellspacing","0");ya.style.marginBottom="20px";ya.style.cellSpacing="0px";-ya.style.marginLeft="1px";var za=document.createElement("tbody");ya.appendChild(za);for(var Ka=ba.length/ma,Qa=0;Qa<Ka;Qa++){for(var Ia=document.createElement("tr"),Ha=0;Ha<ma;Ha++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ja);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";-else if(mxUtils.isLightDarkColor(ra)){var Va=mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Va=this.colorNames[String(ra).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ia.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ia==N&&N.value==mxConstants.NONE?X.value=mxConstants.NONE:-ia.value=mxConstants.NONE;if(ia==X||ia==N&&X.value==mxConstants.NONE)ca.value="automatic";C(ia);window.setTimeout(function(){ia.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);ca.value="custom";var Wa=mxUtils.getLightDarkColor(ra);X.value=Wa.light.substring(1).toUpperCase();N.value=Wa.dark.substring(1).toUpperCase();C(X);C(N);ia==X?ha.fromString(Wa.light):ha.fromString(Wa.dark)}else ha.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(ba[Qa*ma+Ha]);za.appendChild(Ia)}na&&(ba=document.createElement("td"),-ba.setAttribute("title",mxResources.get("reset")),ba.className="geAdaptiveAsset",ba.style.border="1px solid black",ba.style.padding="0px",ba.style.width="16px",ba.style.height="16px",ba.style.backgroundImage="url('"+Editor.crossImage+"')",ba.style.backgroundPosition="center center",ba.style.backgroundSize="14px 14px",ba.style.backgroundRepeat="no-repeat",ba.style.cursor="pointer",Ia.appendChild(ba),mxEvent.addListener(ba,"click",function(){ColorDialog.resetRecentColors();ya.parentNode.replaceChild(J(),-ya)}));ta.appendChild(ya);return ya});h||(d.appendChild(H),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=ca.value||(S.style.display="none",p()),H=document.createElement("img"),H.setAttribute("title",mxResources.get("light")),H.className="geAdaptiveAsset",H.src=Editor.thinLightImage,H.style.width="20px",T.appendChild(H),mxEvent.addListener(H,"click",function(){X.focus()}));T.appendChild(X);null!=Q&&(V.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),+ba&&(ia.value=ba,C(ia),window.setTimeout(function(){ia.focus()},0))});f=document.createElement("div");f.appendChild(ha.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var aa=mxUtils.bind(this,function(ba,ma,La,na){ma=null!=ma?ma:12;var za=document.createElement("table");za.style.borderCollapse="collapse";za.setAttribute("cellspacing","0");za.style.marginBottom="20px";za.style.cellSpacing="0px";+za.style.marginLeft="1px";var Aa=document.createElement("tbody");za.appendChild(Aa);for(var Ma=ba.length/ma,Qa=0;Qa<Ma;Qa++){for(var Ja=document.createElement("tr"),Ia=0;Ia<ma;Ia++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=La);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";+else if(mxUtils.isLightDarkColor(ra)){var Va=mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Va=this.colorNames[String(ra).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ja.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ia==N&&N.value==mxConstants.NONE?X.value=mxConstants.NONE:+ia.value=mxConstants.NONE;if(ia==X||ia==N&&X.value==mxConstants.NONE)ca.value="automatic";C(ia);window.setTimeout(function(){ia.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);ca.value="custom";var Wa=mxUtils.getLightDarkColor(ra);X.value=Wa.light.substring(1).toUpperCase();N.value=Wa.dark.substring(1).toUpperCase();C(X);C(N);ia==X?ha.fromString(Wa.light):ha.fromString(Wa.dark)}else ha.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(ba[Qa*ma+Ia]);Aa.appendChild(Ja)}na&&(ba=document.createElement("td"),+ba.setAttribute("title",mxResources.get("reset")),ba.className="geAdaptiveAsset",ba.style.border="1px solid black",ba.style.padding="0px",ba.style.width="16px",ba.style.height="16px",ba.style.backgroundImage="url('"+Editor.crossImage+"')",ba.style.backgroundPosition="center center",ba.style.backgroundSize="14px 14px",ba.style.backgroundRepeat="no-repeat",ba.style.cursor="pointer",Ja.appendChild(ba),mxEvent.addListener(ba,"click",function(){ColorDialog.resetRecentColors();za.parentNode.replaceChild(J(),+za)}));ta.appendChild(za);return za});h||(d.appendChild(H),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=ca.value||(S.style.display="none",p()),H=document.createElement("img"),H.setAttribute("title",mxResources.get("light")),H.className="geAdaptiveAsset",H.src=Editor.thinLightImage,H.style.width="20px",T.appendChild(H),mxEvent.addListener(H,"click",function(){X.focus()}));T.appendChild(X);null!=Q&&(V.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),V.style.cursor="pointer",V.style.position="relative",V.style.marginLeft="4px",V.innerText="",K=document.createElement("div"),K.style.display="inline-block",K.style.verticalAlign="middle",K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.marginTop="-2px",K.style.width="12px",K.style.height="12px",h?K.style.backgroundColor=Q.light:K.style.backgroundImage="linear-gradient(to right bottom, "+Q.cssText+" 50%, "+mxUtils.invertLightDarkColor(Q).cssText+" 50.3%)",V.appendChild(K),T.appendChild(V),mxEvent.addListener(V,"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";f.style.whiteSpace="nowrap";T.appendChild(P);K=mxUtils.button("",function(){document.activeElement==P?X.focus():(P.value="#"+X.value,P.click())});K.style.cursor="pointer";H=document.createElement("img");H.src=Editor.colorDropperImage;H.className="geAdaptiveAsset";H.style.position="relative";H.style.verticalAlign="middle";H.style.marginTop="-2px";H.style.width="auto";H.style.height="14px";K.appendChild(H);T.appendChild(K);f.appendChild(d);mxEvent.addListener(P,"change",function(){ha.fromString(P.value)});h||f.appendChild(S);J();d=aa(this.presetColors);d.style.marginBottom="8px";d=aa(this.defaultColors);d.style.marginBottom="16px";f.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";@@ -3804,15 +3805,15 @@ k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=documM.setAttribute("type","checkbox");M.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(M);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=!1;k=document.createElement("td");k.appendChild(Q);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";k=document.createElement("td");k.appendChild(K);g.appendChild(k);p.appendChild(g);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(y,"change",function(){J=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(C.value=Math.floor(h*T),D.value=Math.floor(m*T)):(y.value="100",C.value=h,D.value=m);f()});mxEvent.addListener(C,"change",function(){var T=parseInt(C.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),D.value=Math.floor(m*T)):(y.value="100",C.value=h,D.value=m);f()});mxEvent.addListener(D,"change",function(){var T=parseInt(D.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),C.value=Math.floor(h*-T)):(y.value="100",C.value=h,D.value=m);f()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var W=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,N=w.value,ca=Math.max(0,parseFloat(y.value)||100)/100,H=Math.max(0,parseInt(K.value)),S=e.background,ea=Math.max(1,parseInt(G.value));if(("svg"==N||"png"==N||-"pdf"==N)&&M.checked)S=null;else if(null==S||S==mxConstants.NONE)S="#ffffff";ExportDialog.lastBorderValue=H;ExportDialog.exportFile(a,T,N,S,ca,H,ea,Q.checked)}}));W.className="geBtn gePrimaryBtn";var X=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});X.className="geBtn";a.editor.cancelFirst?(k.appendChild(X),k.appendChild(W)):(k.appendChild(W),k.appendChild(X));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;+T)):(y.value="100",C.value=h,D.value=m);f()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var W=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,N=w.value,ca=Math.max(0,parseFloat(y.value)||100)/100,H=Math.max(0,parseInt(K.value)),S=e.background,fa=Math.max(1,parseInt(G.value));if(("svg"==N||"png"==N||+"pdf"==N)&&M.checked)S=null;else if(null==S||S==mxConstants.NONE)S="#ffffff";ExportDialog.lastBorderValue=H;ExportDialog.exportFile(a,T,N,S,ca,H,fa,Q.checked)}}));W.className="geBtn gePrimaryBtn";var X=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});X.className="geBtn";a.editor.cancelFirst?(k.appendChild(X),k.appendChild(W)):(k.appendChild(W),k.appendChild(X));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;ExportDialog.exportFile=function(a,b,f,e,g,d,h,m){m=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(e,g,d)),b,f);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-p.x)/m.view.scale),Math.floor((d/g-p.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*g/m.view.scale+2*d);g=Math.ceil(p.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};var EditDataDialog=function(a,b){function f(){0<K.value.length?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(T){}var k=new mxForm("properties");k.table.style.width="100%";var u=d.attributes,w=[],y=[],C=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(T,N){var ca=document.createElement("div");ca.style.position="relative";ca.style.paddingRight="20px";ca.style.boxSizing="border-box";ca.style.width="100%";var H=document.createElement("a"),S=mxUtils.createImage(Dialog.prototype.closeImage);S.style.height="9px";S.style.fontSize="9px";S.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";H.className="geButton";H.setAttribute("title",-mxResources.get("delete"));H.style.position="absolute";H.style.top="4px";H.style.right="0px";H.style.margin="0px";H.style.width="9px";H.style.height="9px";H.style.cursor="pointer";H.appendChild(S);N=function(ea){return function(){for(var la=0,O=0;O<w.length;O++){if(w[O]==ea){y[O]=null;k.table.deleteRow(la+(null!=D?1:0));break}null!=y[O]&&la++}}}(N);mxEvent.addListener(H,"click",N);N=T.parentNode;ca.appendChild(T);ca.appendChild(H);N.appendChild(ca)};h=function(T,N,ca){w[T]=N;y[T]=k.addTextarea(w[C]++mxResources.get("delete"));H.style.position="absolute";H.style.top="4px";H.style.right="0px";H.style.margin="0px";H.style.width="9px";H.style.height="9px";H.style.cursor="pointer";H.appendChild(S);N=function(fa){return function(){for(var la=0,O=0;O<w.length;O++){if(w[O]==fa){y[O]=null;k.table.deleteRow(la+(null!=D?1:0));break}null!=y[O]&&la++}}}(N);mxEvent.addListener(H,"click",N);N=T.parentNode;ca.appendChild(T);ca.appendChild(H);N.appendChild(ca)};h=function(T,N,ca){w[T]=N;y[T]=k.addTextarea(w[C]+":",ca,2);y[T].style.width="100%";0<ca.indexOf("\n")&&y[T].setAttribute("rows","2");E(y[T],N);null!=m[N]&&0==m[N].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var G=g.getModel().getParent(b)==g.getModel().getRoot(),J=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==J.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,N){return"label"==T.name?1:"label"==N.name?-1:T.name<N.name?-1:T.name>N.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(N){if(null!=N&&0<N.length&&N!=D)if(g.model.isRoot(b)){var ca=a.getPageById(D);if(null!=ca)if(null==a.getPageById(N)){var H=a.getPageIndex(ca);0<=H&&(a.removePage(ca),ca.node.setAttribute("id",N),D=N,Q.innerHTML=mxUtils.htmlEntities(N),a.insertPage(ca,H))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(N)?(g.getModel().cellRemoved(b),b.setId(N),D=N,Q.innerHTML=mxUtils.htmlEntities(N),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[N])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(C,p[M].name,p[M].value),C++;p=document.createElement("div");@@ -3831,22 +3832,22 @@ mxEvent.addListener(b,"click",function(){h.value="";h.focus()});d.appendChild(h)b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(h.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,h=document.createElement("div");h.style.position="absolute";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),h,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var m=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){m.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();m.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){m.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(h);mxEvent.addMouseWheelListener(function(p,k){for(var u=!1,w=mxEvent.getSource(p);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=p.deltaY&&Math.round(p.deltaY)!=p.deltaY&&(u=1+Math.abs(p.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(p))})},LayersWindow=function(a,b,f,e,g){function d(){var N=K.get(p.getLayerForCells(p.getSelectionCells()));-null!=N?N.appendChild(T):null!=T.parentNode&&T.parentNode.removeChild(T)}function h(){function N(S,ea,la,O){var V=document.createElement("div");V.className="geToolbarContainer";K.put(la,V);V.style.overflow="hidden";V.style.position="relative";V.style.padding="4px";V.style.height="30px";V.style.display="flex";V.style.alignItems="center";V.style.borderWidth="0px 0px 1px 0px";V.style.borderStyle="solid";V.style.whiteSpace="nowrap";V.setAttribute("title",ea+" ("+la.getId()+")");var Y=document.createElement("div");+null!=N?N.appendChild(T):null!=T.parentNode&&T.parentNode.removeChild(T)}function h(){function N(S,fa,la,O){var V=document.createElement("div");V.className="geToolbarContainer";K.put(la,V);V.style.overflow="hidden";V.style.position="relative";V.style.padding="4px";V.style.height="30px";V.style.display="flex";V.style.alignItems="center";V.style.borderWidth="0px 0px 1px 0px";V.style.borderStyle="solid";V.style.whiteSpace="nowrap";V.setAttribute("title",fa+" ("+la.getId()+")");var Y=document.createElement("div");Y.style.display="inline-flex";Y.style.alignItems="center";Y.style.width="100%";Y.style.textOverflow="ellipsis";Y.style.overflow="hidden";var ha=document.createElement("span");mxEvent.addListener(V,"dragover",function(aa){aa.dataTransfer.dropEffect="move";y=S;aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(V,"dragstart",function(aa){"true"!=ha.contentEditable&&(w=V,mxClient.IS_FF&&aa.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(V,"dragend",function(aa){null!=w&&null!=y&&1<p.model.getChildCount(p.model.root)&&p.addCell(la,p.model.root,y);y=w=null;aa.stopPropagation();aa.preventDefault()});var ia=document.createElement("img");ia.setAttribute("draggable","false");ia.setAttribute("align","top");ia.setAttribute("border","0");ia.className="geAdaptiveAsset";ia.style.width="16px";ia.style.padding="0px 6px 0 4px";ia.style.cursor="pointer";ia.setAttribute("title",mxResources.get(p.model.isVisible(la)?"hide":"show"));p.model.isVisible(la)?(ia.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(V,90)):(ia.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(V,40));p.isEnabled()||mxUtils.setOpacity(ia,50);Y.appendChild(ia);mxEvent.addListener(ia,"click",function(aa){p.isEnabled()&&p.model.setVisible(la,!p.model.isVisible(la));mxEvent.consume(aa)});ia=document.createElement("img");ia.setAttribute("draggable","false");ia.setAttribute("align","top");ia.setAttribute("border","0");ia.className="geAdaptiveAsset";ia.style.width="16px";ia.style.padding="0px 6px 0 0";ia.setAttribute("title",mxResources.get("lockUnlock"));var ta=p.getCurrentCellStyle(la);"1"==mxUtils.getValue(ta,"locked","0")?(ia.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ia,90),V.style.color="red"):(ia.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ia,40));p.isEnabled()&&(ia.style.cursor="pointer");mxEvent.addListener(ia,"click",function(aa){if(p.isEnabled()){var P=null;p.getModel().beginUpdate();try{P="1"==mxUtils.getValue(ta,"locked","0")?null:"1",p.setCellStyles("locked",P,[la])}finally{p.getModel().endUpdate()}"1"==-P&&p.removeSelectionCells(p.getModel().getDescendants(la));mxEvent.consume(aa)}});Y.appendChild(ia);mxUtils.write(ha,ea);ha.style.display="block";ha.style.whiteSpace="nowrap";ha.style.overflow="hidden";ha.style.textOverflow="ellipsis";ha.style.position="absolute";ha.style.padding="2px";ha.style.left="52px";ha.style.right="8px";Y.appendChild(ha);V.appendChild(Y);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ea=document.createElement("div"),ea.style.display=-"block",ea.style.textAlign="right",ea.style.whiteSpace="nowrap",ea.style.position="absolute",ea.style.right="16px",ea.style.top="6px",0<S&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toBack")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▼",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",ea.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,-S-1);mxEvent.consume(aa)})),0<=S&&S<C-1&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toFront")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▲",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",ea.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,S+1);mxEvent.consume(aa)})),V.appendChild(ea);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&+P&&p.removeSelectionCells(p.getModel().getDescendants(la));mxEvent.consume(aa)}});Y.appendChild(ia);mxUtils.write(ha,fa);ha.style.display="block";ha.style.whiteSpace="nowrap";ha.style.overflow="hidden";ha.style.textOverflow="ellipsis";ha.style.position="absolute";ha.style.padding="2px";ha.style.left="52px";ha.style.right="8px";Y.appendChild(ha);V.appendChild(Y);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)fa=document.createElement("div"),fa.style.display=+"block",fa.style.textAlign="right",fa.style.whiteSpace="nowrap",fa.style.position="absolute",fa.style.right="16px",fa.style.top="6px",0<S&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toBack")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▼",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",fa.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,+S-1);mxEvent.consume(aa)})),0<=S&&S<C-1&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toFront")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▲",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",fa.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,S+1);mxEvent.consume(aa)})),V.appendChild(fa);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(V.setAttribute("draggable","true"),V.style.cursor="move")}mxEvent.addListener(V,"dblclick",function(aa){var P=mxEvent.getSource(aa).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ha.contentEditable&&(m(la),mxEvent.consume(aa))});p.getDefaultParent()==la&&(V.classList.add("geActivePage"),V.style.fontWeight=p.isEnabled()?"bold":"",D=la);mxEvent.addListener(V,"click",function(aa){p.isEnabled()&&"true"!=ha.contentEditable&&(p.setDefaultParent(O),p.view.setCurrentRoot(null),mxEvent.isShiftDown(aa)&&p.setSelectionCells(la.children),mxEvent.consume(aa))});u.appendChild(V)}p.isEnabled()?(X.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),W.classList.remove("mxDisabled"),J.classList.remove("mxDisabled")):(X.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),W.classList.add("mxDisabled"),J.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";K.clear();for(var ca=C-1;0<=ca;ca--)mxUtils.bind(this,function(S){N(ca,p.convertValueToString(S)||mxResources.get("background"),S,S)})(p.model.getChildAt(p.model.root,-ca));var H=p.convertValueToString(D)||mxResources.get("background");X.setAttribute("title",mxResources.get("removeIt",[H]));W.setAttribute("title",mxResources.get("duplicateIt",[H]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(N){if(p.isEnabled()&&null!=N){var ca=K.get(N);if(null!=ca){var H=ca.getElementsByTagName("span");if(null!=H&&0<H.length){var S=H[0],ea=mxUtils.getTextContent(S);S.style.textOverflow="";S.style.cursor="text";S.contentEditable="true";S.focus();document.execCommand("selectAll",-!1,null);ca.removeAttribute("draggable");ca.style.cursor="";var la=function(O){if("true"==S.contentEditable){S.contentEditable="false";var V=mxUtils.getTextContent(S);O&&V!=ea?(V=mxUtils.getTextContent(S),0<V.length?p.cellLabelChanged(N,V):p.cellLabelChanged(N,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(S,"keydown",function(O){if(13==O.keyCode||27==O.keyCode)la(13==O.keyCode),mxEvent.consume(O)});mxEvent.addListener(S,"blur",function(O){la(!0);mxEvent.consume(O)})}}}}var p=a.editor.graph,+ca));var H=p.convertValueToString(D)||mxResources.get("background");X.setAttribute("title",mxResources.get("removeIt",[H]));W.setAttribute("title",mxResources.get("duplicateIt",[H]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(N){if(p.isEnabled()&&null!=N){var ca=K.get(N);if(null!=ca){var H=ca.getElementsByTagName("span");if(null!=H&&0<H.length){var S=H[0],fa=mxUtils.getTextContent(S);S.style.textOverflow="";S.style.cursor="text";S.contentEditable="true";S.focus();document.execCommand("selectAll",+!1,null);ca.removeAttribute("draggable");ca.style.cursor="";var la=function(O){if("true"==S.contentEditable){S.contentEditable="false";var V=mxUtils.getTextContent(S);O&&V!=fa?(V=mxUtils.getTextContent(S),0<V.length?p.cellLabelChanged(N,V):p.cellLabelChanged(N,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(S,"keydown",function(O){if(13==O.keyCode||27==O.keyCode)la(13==O.keyCode),mxEvent.consume(O)});mxEvent.addListener(S,"blur",function(O){la(!0);mxEvent.consume(O)})}}}}var p=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,y=null;mxEvent.addListener(k,"dragover",function(N){N.dataTransfer.dropEffect="move";y=0;N.stopPropagation();N.preventDefault()});mxEvent.addListener(k,"drop",function(N){N.stopPropagation();N.preventDefault()});var C=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var G=document.createElement("a");G.className="geButton";var J=G.cloneNode(!1);J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(J,"click",function(N){if(p.isEnabled()){p.model.beginUpdate();try{var ca=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(ca)}finally{p.model.endUpdate()}m(ca)}mxEvent.consume(N)});-p.isEnabled()||J.classList.add("mxDisabled");E.appendChild(J);var M=G.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(N){if(p.isEnabled()&&!p.isSelectionEmpty()){var ca=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(H,S){for(var ea=p.getLayerForCells(p.getSelectionCells()),la=C-1;0<=la;la--)mxUtils.bind(this,function(O){var V="1"==mxUtils.getValue(p.getCurrentCellStyle(O),-"locked","0"),Y=H.addItem(p.convertValueToString(O)||mxResources.get("background"),null,mxUtils.bind(this,function(){V||p.moveCells(p.getSelectionCells(),0,0,!1,O)}),S,null,null,!V);V?H.addCheckmark(Y,Editor.lockedImage):O==ea&&H.addCheckmark(Y,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,la))}),ca.x,ca.y+M.offsetHeight,N)}});E.appendChild(M);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,+p.isEnabled()||J.classList.add("mxDisabled");E.appendChild(J);var M=G.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(N){if(p.isEnabled()&&!p.isSelectionEmpty()){var ca=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(H,S){for(var fa=p.getLayerForCells(p.getSelectionCells()),la=C-1;0<=la;la--)mxUtils.bind(this,function(O){var V="1"==mxUtils.getValue(p.getCurrentCellStyle(O),+"locked","0"),Y=H.addItem(p.convertValueToString(O)||mxResources.get("background"),null,mxUtils.bind(this,function(){V||p.moveCells(p.getSelectionCells(),0,0,!1,O)}),S,null,null,!V);V?H.addCheckmark(Y,Editor.lockedImage):O==fa&&H.addCheckmark(Y,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,la))}),ca.x,ca.y+M.offsetHeight,N)}});E.appendChild(M);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(N){p.isEnabled()&&a.showDataDialog(D);mxEvent.consume(N)});p.isEnabled()||Q.classList.add("mxDisabled");E.appendChild(Q);var K=new mxDictionary,W=G.cloneNode(!1);W.style.backgroundImage="url("+Editor.duplicateImage+")";W.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(W,"click",function(N){if(p.isEnabled()){N=null;p.model.beginUpdate();try{N=p.cloneCell(D),p.cellLabelChanged(N,mxResources.get("untitledLayer")),N.setVisible(!0),N=p.addCell(N,p.model.root),p.setDefaultParent(N)}finally{p.model.endUpdate()}null==N||p.isCellLocked(N)||p.selectAll(N)}});p.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);var X=G.cloneNode(!1);X.style.backgroundImage="url("+Editor.trashImage+")";X.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(X,"click",function(N){if(p.isEnabled()){p.model.beginUpdate();try{var ca=p.model.root.getIndex(D);p.removeCells([D],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<ca&&ca<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,ca-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(N)});p.isEnabled()||X.classList.add("mxDisabled");E.appendChild(X);k.appendChild(E);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="•";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",@@ -12161,12 +12162,12 @@ null==pa&&(pa=[],ya[ta]=pa),pa.push(sa))}ka=ka.nextSibling}L.stop();K()}})};m.ap"right";z.style.position="absolute";z.style.left="40px";z.style.bottom="24px";z.style.right="40px";G=mxUtils.button(mxResources.get("cancel"),function(){null!=q&&q();b.hideDialog(!0)});G.className="geBtn";!b.editor.cancelFirst||p&&null==q||z.appendChild(G);f||"1"==urlParams.embed||p||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(ta){ba=ta;fa=null;templateRealURl=xa;b.hideDialog();T()},function(ta){b.handleError(ta)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),f.className="geBtn",z.appendChild(f));Graph.fileSupport&&n&&(n=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(xa){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),n.className="geBtn",z.appendChild(n));z.appendChild(O);b.editor.cancelFirst||null!=c||p&&null==q||z.appendChild(G);m.appendChild(z);this.container=m};NewDialog.tagsList={};-var SaveDialog=function(b,f,k,c,p,q,t,y){function H(J,K,m,u,D,M){var L=null;if(null==c||0>mxUtils.indexOf(c,J)){D=null!=D?D:b.getTitleForService(J);var O=0<=mxUtils.indexOf(T,J);if(O||null!=b.getServiceForName(J)){L=document.createElement("option");var R="";!O&&b.isOffline()&&(L.setAttribute("disabled","disabled"),R=" ("+mxResources.get("offline")+")");if("pick"==M)L.innerHTML=mxUtils.htmlEntities(D)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+R,L.setAttribute("value",-"pickFolder-"+J),L.setAttribute("title",D+" - "+mxResources.get("pickFolder")+"...");else{O=J+(null!=m?"-"+m:"");var S=A[O];null!=S&&null!=S.option&&S.option.parentNode.removeChild(S.option);S=null;if(null!=K){"/"==K.charAt(K.length-1)&&(K=K.substring(0,K.length-1));"/"==K.charAt(0)&&(K=K.substring(1));S=K;if(J!=App.MODE_GITHUB&&J==App.MODE_GITLAB){var V=S.lastIndexOf("/");0<=V&&(S=S.substring(V+1))}40<S.length&&(S=S.substring(0,20)+"..."+S.substring(S.length-20))}L.innerHTML=mxUtils.htmlEntities(D)+-(null!=S?" – "+mxUtils.htmlEntities(S):"")+R;L.setAttribute("title",D+(null!=K?" ("+K+")":"")+(null!=m&&decodeURIComponent(m)!=K?" ["+m+"]":""));L.setAttribute("value",O);A[O]={option:L,mode:J,path:K,id:m};SaveDialog.lastValue==O&&null==y&&"disabled"==!L.getAttribute("disabled")?u=!0:null==u&&("root"==M?u=null==y&&b.mode==J||null!=J&&J==y:"pickFolder-"==Q.value.substring(0,11)&&(u=!0));u&&L.setAttribute("selected","selected")}Q.appendChild(L)}}return L}function F(J){b.pickFolder(J,-function(K){var m=null;J==App.MODE_GOOGLE&&null!=K.docs&&0<K.docs.length?m={mode:J,path:K.docs[0].name,id:K.docs[0].id}:J==App.MODE_ONEDRIVE&&null!=K.value&&0<K.value.length?m={mode:J,path:K.value[0].name,id:OneDriveFile.prototype.getIdOf(K.value[0])}:(J==App.MODE_GITHUB||J==App.MODE_GITLAB)&&null!=K&&0<K.length&&(m={mode:J,path:decodeURIComponent(K),id:K});null!=m&&(U.style.display="",b.addRecent(m,"Folders",5),K=H(m.mode,m.path,m.id,!0),Q.innerHTML="",A={},E(),m=Q.selectedIndex,Q.value=K.value,-0>Q.selectedIndex&&(Q.selectedIndex=m))},!0,!0,!0,!0)}function E(){var J=b.getRecent("Folders"),K=0;if(null!=J&&0<J.length){for(var m=0;m<J.length;m++)null!=H(J[m].mode,J[m].path,J[m].id)&&K++;0<K&&Q.appendChild(P.cloneNode(!0))}H(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");H(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(H(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),H(App.MODE_ONEDRIVE,null,-null,null,null,"pick"));null!=b.dropbox&&H(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);H(App.MODE_GITHUB,null,null,null,null,"pick");H(App.MODE_GITLAB,null,null,null,null,"pick");H(App.MODE_TRELLO);J=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&J&&H(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&&H(App.MODE_BROWSER);+var SaveDialog=function(b,f,k,c,p,q,t,y){function H(J,K,m,u,D,M){var L=null;if(null==c||0>mxUtils.indexOf(c,J)){D=null!=D?D:b.getTitleForService(J);var O=0<=mxUtils.indexOf(T,J);if(O||null!=b.getServiceForName(J)){L=document.createElement("option");var R="";!O&&b.isOffline(J==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(L.setAttribute("disabled","disabled"),R=" ("+mxResources.get("offline")+")");if("pick"==M)L.innerHTML=mxUtils.htmlEntities(D)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))++"..."+R,L.setAttribute("value","pickFolder-"+J),L.setAttribute("title",D+" - "+mxResources.get("pickFolder")+"...");else{O=J+(null!=m?"-"+m:"");var S=A[O];null!=S&&null!=S.option&&S.option.parentNode.removeChild(S.option);S=null;if(null!=K){"/"==K.charAt(K.length-1)&&(K=K.substring(0,K.length-1));"/"==K.charAt(0)&&(K=K.substring(1));S=K;if(J!=App.MODE_GITHUB&&J==App.MODE_GITLAB){var V=S.lastIndexOf("/");0<=V&&(S=S.substring(V+1))}40<S.length&&(S=S.substring(0,20)+"..."+S.substring(S.length-20))}L.innerHTML=+mxUtils.htmlEntities(D)+(null!=S?" – "+mxUtils.htmlEntities(S):"")+R;L.setAttribute("title",D+(null!=K?" ("+K+")":"")+(null!=m&&decodeURIComponent(m)!=K?" ["+m+"]":""));L.setAttribute("value",O);A[O]={option:L,mode:J,path:K,id:m};SaveDialog.lastValue==O&&null==y&&"disabled"==!L.getAttribute("disabled")?u=!0:null==u&&("root"==M?u=null==y&&b.mode==J||null!=J&&J==y:"pickFolder-"==Q.value.substring(0,11)&&(u=!0));u&&L.setAttribute("selected","selected")}Q.appendChild(L)}}return L}+function F(J){b.pickFolder(J,function(K){var m=null;J==App.MODE_GOOGLE&&null!=K.docs&&0<K.docs.length?m={mode:J,path:K.docs[0].name,id:K.docs[0].id}:J==App.MODE_ONEDRIVE&&null!=K.value&&0<K.value.length?m={mode:J,path:K.value[0].name,id:OneDriveFile.prototype.getIdOf(K.value[0])}:(J==App.MODE_GITHUB||J==App.MODE_GITLAB)&&null!=K&&0<K.length&&(m={mode:J,path:decodeURIComponent(K),id:K});null!=m&&(U.style.display="",b.addRecent(m,"Folders",5),K=H(m.mode,m.path,m.id,!0),Q.innerHTML="",A={},E(),m=Q.selectedIndex,+Q.value=K.value,0>Q.selectedIndex&&(Q.selectedIndex=m))},!0,!0,!0,!0)}function E(){var J=b.getRecent("Folders"),K=0;if(null!=J&&0<J.length){for(var m=0;m<J.length;m++)null!=H(J[m].mode,J[m].path,J[m].id)&&K++;0<K&&Q.appendChild(P.cloneNode(!0))}H(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");H(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(H(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),H(App.MODE_ONEDRIVE,+null,null,null,null,"pick"));null!=b.dropbox&&H(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);H(App.MODE_GITHUB,null,null,null,null,"pick");H(App.MODE_GITLAB,null,null,null,null,"pick");H(App.MODE_TRELLO);J=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&J&&H(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&&H(App.MODE_BROWSER);J&&H("download");Editor.popupsAllowed&&H("_blank",null,null,null,mxResources.get("openInNewWindow"));0<K&&(Q.appendChild(P.cloneNode(!0)),K=Q.value,Q.appendChild(U),Q.value=K);if("pickFolder-"==Q.value.substring(0,11)||"reset"==Q.value)K=document.createElement("option"),K.setAttribute("value",""),K.setAttribute("selected","selected"),mxUtils.write(K,mxResources.get("pickFolder")+"..."),Q.insertBefore(K,Q.firstChild);v=Q.value}function d(){if("reset"==Q.value)b.resetRecent("Folders"),Q.innerHTML="",Q.value="",pickFolderOption=null,A={},E();else if("pickFolder-"==Q.value.substring(0,11)){var J=Q.value.substring(11);Q.value=v;F(J)}else if(null!=C&&null!=A[Q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){J=b.getExtensionForService(A[Q.value].mode);var K=G.value;null!=J&&0>f.indexOf(".")&&0>K.indexOf(".")&&(G.value=K+J)}N.innerHTML="";mxUtils.write(N,mxResources.get("download"==Q.value||"_blank"==Q.value?"ok":"save"));""==Q.value?N.setAttribute("disabled","disabled"):N.removeAttribute("disabled")}var g=document.createElement("div");g.style.display="flex";g.style.flexWrap="wrap";g.style.whiteSpace="nowrap";var l=document.createElement("div");l.style.display="grid";l.style.gap="5px 8px";l.style.gridAutoRows="auto auto 44px";l.style.gridAutoColumns="0fr minmax(0,1fr)";l.style.width="100%";var n=null,x=null;if(null!=p&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){l.style.display="inline-grid";l.style.flexBasis=@@ -12747,7 +12748,7 @@ mxEvent.addListener(u,"click",function(Ea){Ba.checked=!0;mxEvent.consume(Ea)}));S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Ka);Ka();var Ma=function(Ea,Ia){Ea=Ia.getProperty("dialog");S.parentNode==Ea.container&&(m.editor.removeListener(Ma),m.removeListener(Ka))};m.editor.addListener("hideDialog",Ma)}this.container=S};var K=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 K.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)}})();(function(){EditorUi.VERSION="28.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&&+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.1.1";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||"1"==urlParams.dev;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:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',@@ -12784,107 +12785,107 @@ A.removeAttribute("modified"),A.removeAttribute("version"),A.removeAttribute("ednull!=this.pages&&A.setAttribute("pages",this.pages.length));null!=U&&(A=A.cloneNode(!0),A.setAttribute("scale",U));null!=T&&(A=A.cloneNode(!0),A.setAttribute("border",T));d=Q?mxUtils.getPrettyXml(A):mxUtils.getXml(A);if(!z&&!x&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))d=this.getHtml2(mxUtils.getXml(A),g,null!=l?l.getTitle():null,v,P);else if(z||!x&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(A),d=this.getEmbeddedSvg(d,g,n,null,I,G,P,null,null,l.scale,l.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,l,n){d=null!=d?d:!0;g=null!=g?g:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(G){var C=G.getElementsByTagName("mxGraphModel"),Q=0<C.length?C[0]:null;C=G;null==Q&&l?(Q=mxUtils.getNodeValue(G),0<Q.length&&(Q=Graph.decompress(Q),null!=Q&&0<Q.length&&(C=G.cloneNode(!1),C.appendChild(mxUtils.parseXml(Q).documentElement)))):null==Q||l?C=G.cloneNode(!0):(C=G.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(Q)));x.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var z=this.pages[g],B=z.node;if(z!=this.currentPage)if(z.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(z.root));-this.editor.graph.saveViewState(z.viewState,I,null,n);EditorUi.removeChildNodes(B);B.appendChild(I);delete z.needsUpdate}else n&&(this.updatePageRoot(z),null!=z.viewState.backgroundImage&&(null!=z.viewState.backgroundImage.originalSrc?z.viewState.backgroundImage=this.createImageForPageLink(z.viewState.backgroundImage.originalSrc,z):Graph.isPageLink(z.viewState.backgroundImage.src)&&(z.viewState.backgroundImage=this.createImageForPageLink(z.viewState.backgroundImage.src,z))),null!=z.viewState.backgroundImage&&-null!=z.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(z.root)),this.editor.graph.saveViewState(z.viewState,I,null,n),B=B.cloneNode(!1),B.appendChild(I)));d(B)}return x};EditorUi.prototype.anonymizeString=function(d,g){for(var l=[],n=0;n<d.length;n++){var x=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=-x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(g?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){d=mxUtils.clone(d);if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var l=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=-mxUtils.getXml(l)}catch(z){d[EditorUi.DIFF_INSERT][g].data=z.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(z){var B=x.cells[z];if(null!=B){for(var I in B)null!=B[I].value&&(B[I].value="["+B[I].value.length+"]"),null!=B[I].xmlValue&&(B[I].xmlValue="["+B[I].xmlValue.length+"]"),null!=B[I].style&&(B[I].style="["+B[I].style.length+"]"),mxUtils.isEmptyObject(B[I])&&-delete B[I];mxUtils.isEmptyObject(B)&&delete x.cells[z]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][n]}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 l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&d.setAttribute(d.attributes[l].name,this.anonymizeString(d.attributes[l].value,-g));if(null!=d.childNodes)for(l=0;l<d.childNodes.length;l++)this.anonymizeAttributes(d.childNodes[l],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var l=0;l<g.length;l++)null!=g[l].getAttribute("value")&&g[l].setAttribute("value","["+g[l].getAttribute("value").length+"]"),null!=g[l].getAttribute("xmlValue")&&g[l].setAttribute("xmlValue","["+g[l].getAttribute("xmlValue").length+"]"),null!=g[l].getAttribute("style")&&g[l].setAttribute("style","["+g[l].getAttribute("style").length+-"]"),null!=g[l].parentNode&&"root"!=g[l].parentNode.nodeName&&null!=g[l].parentNode.parentNode&&(g[l].setAttribute("id",g[l].parentNode.getAttribute("id")),g[l].parentNode.parentNode.replaceChild(g[l],g[l].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.clearStatus(),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();g.handleFileError(l,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(d,g,l,n,x,z,B,I,G,C,Q,U,T){x=null!=x?x:!0;z=null!=z?z:!1;C=null!=C?C:!Editor.defaultCompressed;-var P=this.editor.graph;if((g||!d&&null!=G&&/(\.svg)$/i.test(G.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var A=null!=this.pages?this.pages[0]:null;null==A||this.currentPage==A?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&P.setBackgroundImage(A.viewState.backgroundImage);-P.getGlobalVariable=function(N){return"page"==N&&null!=A?A.getName():"pagenumber"==N?1:v.apply(this,arguments)};document.body.appendChild(P.container);null!=A&&P.model.setRoot(A.root)}B=null!=B?B:this.getXmlFileData(x,z,C,Q);G=null!=G?G:this.getCurrentFile();d=this.createFileData(B,P,G,window.location.href,d,g,l,n,x,I,C,U,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,l,n,x,z){z=null!=z?z:!0;var B=null,I=EditorUi.drawHost+-"/js/embed-static.min.js";if(null!=g){B=z?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var G=g.view.scale;z=Math.floor(B.x/G-g.view.translate.x);G=Math.floor(B.y/G-g.view.translate.y);B=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(I=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",z);d.setAttribute("y0",G)}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!=n&&d.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+-(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&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==x?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+-EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,l,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.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==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':-"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" 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,l=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",-[this],"data",[d],"node",[g],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),l={},0<d.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var z=0;z<d.length;z++){null==d[z].getAttribute("id")&&d[z].setAttribute("id",z);g=new DiagramPage(d[z]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[z+1]));this.pages.push(g);-if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==l[g.getId()])l[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x: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 B=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(z=0;z<B.length;z++)g[B[z]]=!0;var I=this.editor.graph.getModel(),G=I.getChildren(I.root);for(z=0;z<G.length;z++){var C=G[z];I.setVisible(C,g[C.id]||!1)}}catch(Q){}};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,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&Q?".drawio":"")+"."+d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,R){try{return this.createDownloadRequest(O,d,n,R,B,x,I,G,C,Q,U,void 0,void 0,!z,T,P,v,A,N)}catch(S){this.handleError(S)}}));else{var u=null,D=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==d){var M=this.editor.graph.background;-if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();D(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();D(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,g,l,n,x,z,B,I,G,-C,Q,U,T,P,v,A,N,J,K){d=this.downloadRequestBuilder(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K);g="";for(var m in d)l=d[m],null!=l&&(g+=m+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K){var m=this.editor.graph,u=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==z?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var D=null,M=null,L=null;if(!EditorUi.isElectronApp&&(u.width*-u.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==g&&(null!=Q?(D=Q.from,M=Q.to):0==z&&(L="1"));"xmlpng"==g&&(C="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==this.currentPage){D=z;break}z=m.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=Q&&null!=-Q.from&&(x.globalVars.pagenumber=Q.from+1);G&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:D,to:M,allPages:L,bg:null!=z?z:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=-A&&A?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:N,sheetsDown:J}};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 l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{g=JSON.parse(d)}catch(n){}}}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 l=g.lastIndexOf("#");0<l&&(g=g.substring(0,l));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<-l&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,l){var n=window.location.hash,x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,-mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var G=null!=d.interval?parseInt(d.interval):6E4,C=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")+-" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(Q,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();Q()}));U();Q()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var z=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(z,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function g(m){var u=-new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);u.addListener(mxEvent.CLICK,function(D,M){n.alert(m.tooltip)});return u}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,z=x.getModel();z.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=z.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=-mxUtils.parseXml(G).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))z.setValue(I,C);else for(var Q=C.attributes,U=0;U<Q.length;U++)x.setAttributeForCell(I,Q[U].nodeName,0<Q[U].nodeValue.length?Q[U].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var T=d.getAttribute("style");null!=T&&x.model.setStyle(I,T)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var P=d.getAttribute("icon");if(null!=P){var v=-0<P.length?JSON.parse(P):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,g(v))}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}try{var A=d.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var N=x.getCellGeometry(I);if(null!=N){N=N.clone();for(key in A){var J=parseFloat(A[key]);"dx"==key?N.x+=J:"dy"==key?N.y+=J:"dw"==key?N.width+=J:"dh"==key?N.height+=J:N[key]=parseFloat(A[key])}x.model.setGeometry(I,N)}}}catch(m){null!=window.console&&-console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,z)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(B=d.hasAttribute("max-scale")?-parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{z.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,B)}return l};EditorUi.prototype.getCopyFilename=function(d,g){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=l.lastIndexOf(".");0<=n&&(d=l.substring(n),l=l.substring(0,n));if(g){g=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var z=x.getDate(),B=x.getHours(),I=x.getMinutes();x=x.getSeconds();l=g+(" "+(l+"-"+n+"-"+z+"-"+B+"-"+-I+"-"+x))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(l){}};EditorUi.prototype.fileLoaded=function(d,g,l){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!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 z=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);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=-d)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));x=!0;if(!this.isOffline()&&null!=-d.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.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}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(G){}d=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)||z():z()});g?d():(null!=I.fallbackFileData&&(I.alternateAction=-{label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var G=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(G)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,g){var l=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var z=0;z<d.length;z++){this.updatePageRoot(d[z]);var B=d[z].node.cloneNode(!1);-B.removeAttribute("name");n.root=d[z].root;var I=x.encode(n);this.editor.graph.saveViewState(d[z].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");B.appendChild(I);null!=g&&(g.eltCount+=B.getElementsByTagName("*").length,g.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(G,C,Q,U){return!U||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?U&&"mxCell"==G.nodeName&&"previous"==C?null:Q:Math.round(Q)},-g)<<0}return l};EditorUi.prototype.hashValue=function(d,g,l){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,g,l));if(null!=d.attributes){null!=l&&(l.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var z=d.attributes[x].name,B=null!=g?g(d,z,d.attributes[x].value,!0):d.attributes[x].value;null!=B&&(n^=this.hashValue(z,g,l)+this.hashValue(B,-g,l))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)n=(n<<5)-n+this.hashValue(d.childNodes[x],g,l)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=l&&(l.byteCount+=d.length);for(x=0;x<d.length;x++)g=(g<<5)-g+d.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,l,n,x,z,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(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 l=g.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(d,null,2));g.appendChild(l);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 l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);-delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d,g){var l=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:l.firstChild.nextSibling.nextSibling;g=l.lastChild;var n=g.previousSibling;l.insertBefore(g,d);l.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(d,g){var l=mxUtils.parseXml(d.getData());-if("mxlibrary"==l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(d,n,l.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.showSearchWindow=function(d,g){var l=d?"findReplace":"find",-n=l+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,z=d?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(z+20),100,z,d?x?304:288:180,d);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=-g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(d,g,l,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var x=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var z=0;z<this.openLibraries.length;z++)if(this.openLibraries[z].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[z],this.openLibraries);break}x={file:d,images:g,title:l,-expand:n};this.openLibraries.push(x)}else this.scratchpad=d;z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(J,K){0==J.length&&d.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),K.appendChild(B)):this.addLibraryEntries(J,K)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==l&&(l=d.getTitle(),-null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var G=this.sidebar.addPalette(d.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(J){I(g,J)}));null!=x&&(x.div=G);this.repositionLibrary(z,"L.scratchpad"!=d.getHash());n=G.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var C=document.createElement("div");C.style.backgroundColor="inherit";n.style.position="relative";var Q=-document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),-mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var T=this.editor.graph,P=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),G,g,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.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",C.insertBefore(P,C.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=Q.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),C.insertBefore(U,C.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(U.parentNode.removeChild(U),-U=null)});mxEvent.consume(K)})))}),A=mxUtils.bind(this,function(J,K,m,u){J=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(J)));for(var D=0;D<J.length;D++){var M=T.getCellGeometry(J[D]);null!=M&&M.translate(-K.x,-K.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,u||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=u&&(K.title=u);g.push(K);v(m);null!=B&&null!=-B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)}),N=mxUtils.bind(this,function(J){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(J),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var K=T.getSelectionCells(),m=T.view.getBounds(K);if(null!=m&&0<m.width&&0<m.height){var u=T.view.scale;m.x/=u;m.y/=u;m.width/=u;m.height/=u;m.x-=T.view.translate.x;m.y-=T.view.translate.y;-A(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(J))}),-mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,N(J),mxEvent.consume(J))}));mxEvent.addListener(G,"mouseleave",mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor=-"",G.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){G.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";G.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){G.style.cursor="";G.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,-function(K,m,u,D,M,L,O,R,S){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,A(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==-Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,G);g=g.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ha=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ha);-null!=ea&&A(ha,new mxRectangle(0,0,ea.width,ea.height),J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)});null!=S&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(S,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=S?this.isExternalDataComms()?-this.parseFile(S,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"dragleave",function(J){G.style.cursor="";G.style.backgroundColor=-"";J.stopPropagation();J.preventDefault()}));Q=Q.cloneNode(!1);Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("edit"));C.insertBefore(Q,C.firstChild);mxEvent.addListener(Q,"click",l);l=Q.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));C.insertBefore(l,C.firstChild);mxEvent.addListener(l,"click",N);".scratchpad"==d.title&&(this.addSelectionToScratchpad=N);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||-(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",C.insertBefore(l,C.firstChild))}n.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var l=0;l<d.length;l++)try{var n=d[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(z+="aspect=fixed;");z=z+"image="+x+";";-null!=n.style&&(z+=n.style);g.appendChild(this.sidebar.createVertexTemplate(z,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)),I=0==B.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,I,!0,null,!0))}}catch(G){I=null!=G.message?mxResources.get("error")+": "+G.message:String(G),z=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,-I,!0,null,!0),g.appendChild(z)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,l,n,x,z,B){d=new ImageDialog(this,d,g,l,n,-x,z,B);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,l,n,x,z){var B=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=z&&z(I),I==B)this.hideDialog();else{if(0<I.length){var G=JSON.parse(I);localStorage.setItem(g,JSON.stringify(G))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),-null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,l,n){d=null!=d?d:mxUtils.bind(this,function(x,z,B,I){z||(x=new ChangePageSetup(this,n?B:null,x),x.ignoreColor=!n,null!=I&&n&&(x.shadowVisible=I),this.editor.graph.model.execute(x))});d=new BackgroundImageDialog(this,d,g,l,n);this.showDialog(d.container,400,n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,-g,l,n,x){d=new LibraryDialog(this,d,g,l,n,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(z){z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,l,-n,x,z,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{B||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",d)}catch(T){}if(null!=G||null!=g){B=mxUtils.htmlEntities(mxResources.get("unknownError"),-!1);var C=mxResources.get("ok"),Q=null;g=null!=g?g:mxResources.get("error");if(null!=G){null!=G.retry&&(C=mxResources.get("cancel"),Q=function(){I();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!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=x?null:null!=-z?z: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!=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==G.code||404==G.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(g,B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,-function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=n&&n()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){N.innerText="";for(var J=0;J<P.length;J++){var K=document.createElement("option");mxUtils.write(K,P[J].displayName);K.value=J;N.appendChild(K);K=document.createElement("option");K.innerHTML=" ";mxUtils.write(K,"<"+P[J].email+">");K.setAttribute("disabled","disabled");N.appendChild(K)}K=document.createElement("option");-mxUtils.write(K,mxResources.get("addAccount"));K.value=P.length;N.appendChild(K)}var P=this.drive.getUsersList(),v=document.createElement("div"),A=document.createElement("div");A.style.marginBottom="6px";mxUtils.write(A,mxResources.get("changeUser")+": ");v.appendChild(A);var N=document.createElement("select");N.style.width="100%";T();mxEvent.addListener(N,"change",mxUtils.bind(this,function(){var J=N.value,K=P.length!=J;K&&this.drive.setUser(P[J]);this.drive.authorize(K,mxUtils.bind(this,function(){K||-(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(m){this.handleError(m)}),!0)}));v.appendChild(N);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)))}x=d=null;null!=G&&null!=G.helpLink?(d=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):null!=G&&null!=G.ownerEmail?(d=mxResources.get("contactOwner"),-B+=mxUtils.htmlEntities(" ("+d+": "+G.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))})):null!=G&&null!=G.alternateAction&&(d=G.alternateAction.label,x=G.alternateAction.funct);this.showError(g,B,C,l,Q,null,null,d,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(d,g,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=-function(d,g,l,n,x,z){d=null!=d?d:"";var B=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(){B();null!=g&&g()},function(){B();null!=l&&l()},n,x,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,z);d.init()};EditorUi.prototype.showBanner=function(d,g,l,n,x,z,B,I,G){z=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+-d])){B=null!=B?B:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var C=document.createElement("div");C.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");C.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(C.style,"transform",B);mxUtils.setPrefixedStyle(C.style,"transition","all 1000ms ease");null!=G&&mxUtils.setPrefixedStyle(C.style,"transform-origin",G);G=G=document.createElement("img");G.setAttribute("src",Editor.crossImage);G.setAttribute("title",mxResources.get(n?-"doNotShowAgain":"close"));G.setAttribute("border","0");x||(z=document.createElement("img"),z.setAttribute("src",IMAGE_PATH+"/logo.png"),z.setAttribute("border","0"),z.setAttribute("align","absmiddle"),z.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",C.appendChild(z),G.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",C.appendChild(G));mxUtils.write(C,g);document.body.appendChild(C);-this.bannerShowing=!0;x&&(G.className="geLibraryButton",C.appendChild(G));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 Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!n){g.appendChild(Q);var U=document.createElement("label");U.setAttribute("for","geDoNotShowAgainCheckbox");-mxUtils.write(U,mxResources.get("doNotShowAgain"));g.appendChild(U);C.style.paddingBottom=x?"16px":"30px";C.appendChild(g)}var T=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,Q.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=G&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,-"transform",B);window.setTimeout(mxUtils.bind(this,function(){T()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(v){var A=mxEvent.getSource(v);A!=Q&&A!=U?(null!=l&&l(),T(),mxEvent.consume(v)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",I)}),500);window.setTimeout(P,x?5E3:3E4);z=!0}return z};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};-EditorUi.prototype.createImageDataUri=function(d,g,l,n){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,l,n,x){var z="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+z;d=this.createImageDataUri(d,g,l,x);this.saveData(n,z,d.substring(d.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(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,l,n,x,z){"text/xml"!=l||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=z?z:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,l):new Blob([d],{type:l}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(d,!0):(l.document.write(d),l.document.close(),l.document.execCommand("SaveAs",!0,g),l.close());-else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,l,n);else{var B=document.createElement("a");z=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);z=65==(I?parseInt(I[2],10):!1)?!1:z}if(z||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(d,-l):new Blob([d],{type:l}));z?B.download=g: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(d,g,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,l,n,x,z){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=z?"&base64="+z:"")+(null!=g?"&filename="+-encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,l,n,x,z,B,I,G){z=null!=z?z:!1;B=null!=B?B:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(U,T,P,v){try{if("_blank"==T)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var A=new EmbedDialog(this,d);this.showDialog(A.container,450,240,!0,!0);A.init()}else{var N=window.open("about:blank");null==N?mxUtils.popup(d,-!0):(N.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),N.document.close())}else if(T==App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(d,U,l,n,null,I);else if(null!=U&&0<U.length){var J=mxUtils.bind(this,function(K){try{this.exportFile(d,U,l,n,T,K)}catch(m){this.handleError(m)}});null!=v?J(v):this.pickFolder(T,J)}}catch(K){this.handleError(K)}});x=[];z||x.push(App.MODE_BROWSER);B||x.push("_blank");var Q=new SaveDialog(this,g,mxUtils.bind(this,function(U,T,P){C(U.value,T,U,P);this.hideDialog(null,-null,Q.container)}),x,d,l,n,G);this.showDialog(Q.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));Q.init()};EditorUi.prototype.openInNewWindow=function(d,g,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var z=mxUtils.parseXml(d).documentElement.style.backgroundColor;""!=z&&(x="background: "+z+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+-x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||l?(z=l?d:btoa(unescape(encodeURIComponent(d))),n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+z+'"/></body></html>')):n.document.write(x+d+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");n.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(n){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.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,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 x=g.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=-x.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();g.style.display=0<n.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,+this.editor.graph.saveViewState(z.viewState,I,null,n);EditorUi.removeChildNodes(B);B.appendChild(I);delete z.needsUpdate}else n&&(this.updatePageRoot(z),null!=z.viewState.backgroundImage&&null!=z.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(z.root)),this.editor.graph.saveViewState(z.viewState,I,null,n,z),B=B.cloneNode(!1),B.appendChild(I)));d(B)}return x};EditorUi.prototype.anonymizeString=function(d,g){for(var l=[],n=0;n<d.length;n++){var x=+d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(g?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){d=mxUtils.clone(d);if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var l=+mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(l)}catch(z){d[EditorUi.DIFF_INSERT][g].data=z.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(z){var B=x.cells[z];+if(null!=B){for(var I in B)null!=B[I].value&&(B[I].value="["+B[I].value.length+"]"),null!=B[I].xmlValue&&(B[I].xmlValue="["+B[I].xmlValue.length+"]"),null!=B[I].style&&(B[I].style="["+B[I].style.length+"]"),mxUtils.isEmptyObject(B[I])&&delete B[I];mxUtils.isEmptyObject(B)&&delete x.cells[z]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][n]}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 l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&d.setAttribute(d.attributes[l].name,this.anonymizeString(d.attributes[l].value,g));if(null!=d.childNodes)for(l=0;l<d.childNodes.length;l++)this.anonymizeAttributes(d.childNodes[l],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var l=0;l<g.length;l++)null!=g[l].getAttribute("value")&&g[l].setAttribute("value","["+g[l].getAttribute("value").length++"]"),null!=g[l].getAttribute("xmlValue")&&g[l].setAttribute("xmlValue","["+g[l].getAttribute("xmlValue").length+"]"),null!=g[l].getAttribute("style")&&g[l].setAttribute("style","["+g[l].getAttribute("style").length+"]"),null!=g[l].parentNode&&"root"!=g[l].parentNode.nodeName&&null!=g[l].parentNode.parentNode&&(g[l].setAttribute("id",g[l].parentNode.getAttribute("id")),g[l].parentNode.parentNode.replaceChild(g[l],g[l].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.clearStatus(),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();g.handleFileError(l,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(d,g,l,n,x,z,B,I,G,C,Q,U,T){x=null!=x?x:!0;z=null!=z?z:!1;C=null!=C?C:!Editor.defaultCompressed;var P=this.editor.graph;if((g||!d&&null!=G&&/(\.svg)$/i.test(G.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;+var A=null!=this.pages?this.pages[0]:null;null==A||this.currentPage==A?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&P.setBackgroundImage(A.viewState.backgroundImage);P.getGlobalVariable=function(N){return"page"==N&&null!=A?A.getName():"pagenumber"==N?1:v.apply(this,arguments)};document.body.appendChild(P.container);null!=A&&P.model.setRoot(A.root)}B=null!=B?B:this.getXmlFileData(x,z,C,Q);G=null!=G?G:this.getCurrentFile();d=this.createFileData(B,P,G,+window.location.href,d,g,l,n,x,I,C,U,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,l,n,x,z){z=null!=z?z:!0;var B=null,I=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){B=z?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var G=g.view.scale;z=Math.floor(B.x/G-g.view.translate.x);G=Math.floor(B.y/G-g.view.translate.y);B=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(I=EditorUi.drawHost++"/embed.js?s="+g));d.setAttribute("x0",z);d.setAttribute("y0",G)}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!=n&&d.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':+"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&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==x?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,l,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.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==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''++x+"'\"/>\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==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" 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,l=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),+l={},0<d.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var z=0;z<d.length;z++){null==d[z].getAttribute("id")&&d[z].setAttribute("id",z);g=new DiagramPage(d[z]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[z+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==l[g.getId()])l[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=+null!=x?x: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 B=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(z=0;z<B.length;z++)g[B[z]]=!0;var I=this.editor.graph.getModel(),G=I.getChildren(I.root);for(z=0;z<G.length;z++){var C=G[z];I.setVisible(C,g[C.id]||!1)}}catch(Q){}};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,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&Q?".drawio":"")+"."++d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,R){try{return this.createDownloadRequest(O,d,n,R,B,x,I,G,C,Q,U,void 0,+void 0,!z,T,P,v,A,N)}catch(S){this.handleError(S)}}));else{var u=null,D=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==d){var M=this.editor.graph.background;if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,+mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();D(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();D(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K){d=this.downloadRequestBuilder(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K);g="";for(var m in d)l=d[m],null!=l&&(g+=m+"="+encodeURIComponent(l)++"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K){var m=this.editor.graph,u=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==z?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var D=null,M=null,L=null;if(!EditorUi.isElectronApp&&(u.width*u.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==g&&(null!=Q?(D=Q.from,M=Q.to):0==z&&+(L="1"));"xmlpng"==g&&(C="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==this.currentPage){D=z;break}z=m.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=Q&&null!=Q.from&&(x.globalVars.pagenumber=Q.from+1);G&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:+m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:D,to:M,allPages:L,bg:null!=z?z:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=A&&A?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:N,sheetsDown:J}};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 l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{g=JSON.parse(d)}catch(n){}}}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 l=g.lastIndexOf("#");0<l&&(g=g.substring(0,l));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<l&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,l){var n=window.location.hash,+x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var G=null!=d.interval?+parseInt(d.interval):6E4,C=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(Q,+G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();Q()}));U();Q()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var z=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(z,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function g(m){var u=new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);u.addListener(mxEvent.CLICK,function(D,M){n.alert(m.tooltip)});+return u}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,z=x.getModel();z.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=z.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=mxUtils.parseXml(G).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))z.setValue(I,C);else for(var Q=C.attributes,U=0;U<+Q.length;U++)x.setAttributeForCell(I,Q[U].nodeName,0<Q[U].nodeValue.length?Q[U].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var T=d.getAttribute("style");null!=T&&x.model.setStyle(I,T)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var P=d.getAttribute("icon");if(null!=P){var v=0<P.length?JSON.parse(P):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,g(v))}}catch(m){null!=window.console&&+console.log("Error in icon for "+I.id+": "+m)}try{var A=d.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var N=x.getCellGeometry(I);if(null!=N){N=N.clone();for(key in A){var J=parseFloat(A[key]);"dx"==key?N.x+=J:"dy"==key?N.y+=J:"dw"==key?N.width+=J:"dh"==key?N.height+=J:N[key]=parseFloat(A[key])}x.model.setGeometry(I,N)}}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=+K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,z)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(B=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{z.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,+B)}return l};EditorUi.prototype.getCopyFilename=function(d,g){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=l.lastIndexOf(".");0<=n&&(d=l.substring(n),l=l.substring(0,n));if(g){g=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var z=x.getDate(),B=x.getHours(),I=x.getMinutes();x=x.getSeconds();l=g+(" "+(l+"-"+n+"-"+z+"-"+B+"-"+I+"-"+x))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",+[d])}catch(l){}};EditorUi.prototype.fileLoaded=function(d,g,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[d],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!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 z=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);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=d)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));x=!0;if(!this.isOffline()&&null!=d.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.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}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(G){}d=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)||z():z()});g?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,+function(){this.hideDialog();var G=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(G)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,g){var l=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var z=0;z<d.length;z++){this.updatePageRoot(d[z]);var B=d[z].node.cloneNode(!1);B.removeAttribute("name");n.root=d[z].root;+var I=x.encode(n);this.editor.graph.saveViewState(d[z].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");B.appendChild(I);null!=g&&(g.eltCount+=B.getElementsByTagName("*").length,g.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(G,C,Q,U){return!U||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?U&&"mxCell"==G.nodeName&&"previous"==C?null:Q:Math.round(Q)},g)<<0}return l};EditorUi.prototype.hashValue=+function(d,g,l){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,g,l));if(null!=d.attributes){null!=l&&(l.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var z=d.attributes[x].name,B=null!=g?g(d,z,d.attributes[x].value,!0):d.attributes[x].value;null!=B&&(n^=this.hashValue(z,g,l)+this.hashValue(B,g,l))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)n=+(n<<5)-n+this.hashValue(d.childNodes[x],g,l)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=l&&(l.byteCount+=d.length);for(x=0;x<d.length;x++)g=(g<<5)-g+d.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,l,n,x,z,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(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 l=g.createElement("mxlibrary");+mxUtils.setTextContent(l,JSON.stringify(d,null,2));g.appendChild(l);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 l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);delete this.sidebar.palettes[d]}};+EditorUi.prototype.repositionLibrary=function(d,g){var l=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:l.firstChild.nextSibling.nextSibling;g=l.lastChild;var n=g.previousSibling;l.insertBefore(g,d);l.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(d,g){var l=mxUtils.parseXml(d.getData());if("mxlibrary"==+l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(d,n,l.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.showSearchWindow=function(d,g){var l=d?"findReplace":"find",n=l+"Window";+if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,z=d?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(z+20),100,z,d?x?304:288:180,d);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),+this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(d,g,l,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var x=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var z=0;z<this.openLibraries.length;z++)if(this.openLibraries[z].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[z],this.openLibraries);break}x={file:d,images:g,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=+d;z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(J,K){0==J.length&&d.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),K.appendChild(B)):this.addLibraryEntries(J,K)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));+var G=this.sidebar.addPalette(d.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(J){I(g,J)}));null!=x&&(x.div=G);this.repositionLibrary(z,"L.scratchpad"!=d.getHash());n=G.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var C=document.createElement("div");C.style.backgroundColor="inherit";n.style.position="relative";var Q=document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",+Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var T=+this.editor.graph,P=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),G,g,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.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",C.insertBefore(P,C.firstChild),this.saveLibrary(d.getTitle(),+g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=Q.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),C.insertBefore(U,C.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(K)})))}),A=mxUtils.bind(this,function(J,+K,m,u){J=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(J)));for(var D=0;D<J.length;D++){var M=T.getCellGeometry(J[D]);null!=M&&M.translate(-K.x,-K.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,u||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=u&&(K.title=u);g.push(K);v(m);null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)}),N=+mxUtils.bind(this,function(J){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(J),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var K=T.getSelectionCells(),m=T.view.getBounds(K);if(null!=m&&0<m.width&&0<m.height){var u=T.view.scale;m.x/=u;m.y/=u;m.width/=u;m.height/=u;m.x-=T.view.translate.x;m.y-=T.view.translate.y;A(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),+mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(J))}),mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&+(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,N(J),mxEvent.consume(J))}));mxEvent.addListener(G,"mouseleave",mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor="",G.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,+"dragover",mxUtils.bind(this,function(J){G.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";G.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){G.style.cursor="";G.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(K,m,u,D,M,L,O,R,S){if(null!=K&&"image/"==m.substring(0,6))K=+"shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,A(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&+(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,G);g=g.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ha=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ha);null!=ea&&A(ha,new mxRectangle(0,0,ea.width,ea.height),+J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)});null!=S&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(S,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(W){4==W.readyState&&+(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"dragleave",function(J){G.style.cursor="";G.style.backgroundColor="";J.stopPropagation();J.preventDefault()}));Q=+Q.cloneNode(!1);Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("edit"));C.insertBefore(Q,C.firstChild);mxEvent.addListener(Q,"click",l);l=Q.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));C.insertBefore(l,C.firstChild);mxEvent.addListener(l,"click",N);".scratchpad"==d.title&&(this.addSelectionToScratchpad=N);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,+!0),l.className="geLibraryButton",C.insertBefore(l,C.firstChild))}n.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var l=0;l<d.length;l++)try{var n=d[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(z+="aspect=fixed;");z=z+"image="+x+";";null!=n.style&&(z+=n.style);g.appendChild(this.sidebar.createVertexTemplate(z,+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)),I=0==B.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,I,!0,null,!0))}}catch(G){I=null!=G.message?mxResources.get("error")+": "+G.message:String(G),z=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,I,!0,null,!0),g.appendChild(z)}};EditorUi.prototype.getResource=function(d){return null!=+d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,l,n,x,z,B){d=new ImageDialog(this,d,g,l,n,x,z,B);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,+!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,l,n,x,z){var B=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=z&&z(I),I==B)this.hideDialog();else{if(0<I.length){var G=JSON.parse(I);localStorage.setItem(g,JSON.stringify(G))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),null,mxResources.get("close"),+null,null,null,!0,null,null,x,l,n);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,l,n){d=null!=d?d:mxUtils.bind(this,function(x,z,B,I){z||(x=new ChangePageSetup(this,n?B:null,x),x.ignoreColor=!n,null!=I&&n&&(x.shadowVisible=I),this.editor.graph.model.execute(x))});d=new BackgroundImageDialog(this,d,g,l,n);this.showDialog(d.container,400,n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,l,n,x){d=new LibraryDialog(this,+d,g,l,n,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(z){z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,l,n,x,z,B){var I=null!=this.spinner&&+null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{B||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",d)}catch(T){}if(null!=G||null!=g){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),Q=null;+g=null!=g?g:mxResources.get("error");if(null!=G){null!=G.retry&&(C=mxResources.get("cancel"),Q=function(){I();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!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=x?null:null!=z?z: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!=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==G.code||404==G.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(g,B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="++U);null!=n&&n()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){N.innerText="";for(var J=0;J<P.length;J++){var K=document.createElement("option");mxUtils.write(K,P[J].displayName);K.value=J;N.appendChild(K);K=document.createElement("option");K.innerHTML=" ";mxUtils.write(K,"<"+P[J].email+">");K.setAttribute("disabled","disabled");N.appendChild(K)}K=document.createElement("option");mxUtils.write(K,mxResources.get("addAccount"));K.value=P.length;N.appendChild(K)}+var P=this.drive.getUsersList(),v=document.createElement("div"),A=document.createElement("div");A.style.marginBottom="6px";mxUtils.write(A,mxResources.get("changeUser")+": ");v.appendChild(A);var N=document.createElement("select");N.style.width="100%";T();mxEvent.addListener(N,"change",mxUtils.bind(this,function(){var J=N.value,K=P.length!=J;K&&this.drive.setUser(P[J]);this.drive.authorize(K,mxUtils.bind(this,function(){K||(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(m){this.handleError(m)}),+!0)}));v.appendChild(N);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)))}x=d=null;null!=G&&null!=G.helpLink?(d=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):null!=G&&null!=G.ownerEmail?(d=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+d+": "+G.ownerEmail+")",!1),x=mxUtils.bind(this,+function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))})):null!=G&&null!=G.alternateAction&&(d=G.alternateAction.label,x=G.alternateAction.funct);this.showError(g,B,C,l,Q,null,null,d,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(d,g,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,l,n,x,z){d=null!=d?d:"";var B=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(){B();null!=g&&g()},function(){B();null!=l&&l()},n,x,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,z);d.init()};EditorUi.prototype.showBanner=function(d,g,l,n,x,z,B,I,G){z=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";+var C=document.createElement("div");C.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");C.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(C.style,"transform",B);mxUtils.setPrefixedStyle(C.style,"transition","all 1000ms ease");null!=G&&mxUtils.setPrefixedStyle(C.style,"transform-origin",G);G=G=document.createElement("img");G.setAttribute("src",Editor.crossImage);G.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));G.setAttribute("border","0");x||(z=document.createElement("img"),+z.setAttribute("src",IMAGE_PATH+"/logo.png"),z.setAttribute("border","0"),z.setAttribute("align","absmiddle"),z.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",C.appendChild(z),G.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",C.appendChild(G));mxUtils.write(C,g);document.body.appendChild(C);this.bannerShowing=!0;x&&(G.className="geLibraryButton",C.appendChild(G));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 Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!n){g.appendChild(Q);var U=document.createElement("label");U.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(U,mxResources.get("doNotShowAgain"));g.appendChild(U);C.style.paddingBottom=+x?"16px":"30px";C.appendChild(g)}var T=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,Q.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=G&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",B);window.setTimeout(mxUtils.bind(this,+function(){T()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(v){var A=mxEvent.getSource(v);A!=Q&&A!=U?(null!=l&&l(),T(),mxEvent.consume(v)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",I)}),500);window.setTimeout(P,x?5E3:3E4);z=!0}return z};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=+function(d,g,l,n){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,l,n,x){var z="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+z;d=this.createImageDataUri(d,g,l,x);this.saveData(n,z,d.substring(d.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(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,l,n,x,z){"text/xml"!=l||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=z?z:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,l):new Blob([d],{type:l}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(d,!0):(l.document.write(d),l.document.close(),l.document.execCommand("SaveAs",!0,g),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||+null==l||"image/"!=l.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,l,n);else{var B=document.createElement("a");z=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);z=65==(I?parseInt(I[2],10):!1)?!1:z}if(z||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(d,l):new Blob([d],{type:l}));z?B.download=g: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(d,g,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,l,n,x,z){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=z?"&base64="+z:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=+function(d,g,l,n,x,z,B,I,G){z=null!=z?z:!1;B=null!=B?B:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(U,T,P,v){try{if("_blank"==T)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var A=new EmbedDialog(this,d);this.showDialog(A.container,450,240,!0,!0);A.init()}else{var N=window.open("about:blank");null==N?mxUtils.popup(d,!0):(N.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),N.document.close())}else if(T==+App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(d,U,l,n,null,I);else if(null!=U&&0<U.length){var J=mxUtils.bind(this,function(K){try{this.exportFile(d,U,l,n,T,K)}catch(m){this.handleError(m)}});null!=v?J(v):this.pickFolder(T,J)}}catch(K){this.handleError(K)}});x=[];z||x.push(App.MODE_BROWSER);B||x.push("_blank");var Q=new SaveDialog(this,g,mxUtils.bind(this,function(U,T,P){C(U.value,T,U,P);this.hideDialog(null,null,Q.container)}),x,d,l,n,G);this.showDialog(Q.container,420,110,!0,!1,mxUtils.bind(this,+function(){this.hideDialog()}));Q.init()};EditorUi.prototype.openInNewWindow=function(d,g,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var z=mxUtils.parseXml(d).documentElement.style.backgroundColor;""!=z&&(x="background: "+z+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=+g||l?(z=l?d:btoa(unescape(encodeURIComponent(d))),n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+z+'"/></body></html>')):n.document.write(x+d+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");n.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(n){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.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,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 x=g.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.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();g.style.display=0<n.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.editor.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=d(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var z=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=z.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=z.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",@@ -13032,101 +13033,101 @@ g.getModel().beginUpdate();try{g.setCellStyles("image",R,[u]);var X=g.model.getGfunction(u,D){try{var M=this.graph.getAttributeForCell(u,"plantUmlData");if(null!=M)this.editPlantUmlData(u,D,M);else if(M=this.graph.getAttributeForCell(u,"mermaidData"),null!=M&&window.isMermaidEnabled)this.editMermaidData(u,D,M);else{var L=g.getCellStyle(u);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(u):n.apply(this,arguments)}}catch(O){d.handleError(O)}};g.getLinkTitle=function(u){return d.getLinkTitle(u)};g.customLinkClicked=function(u,D){var M=!1;try{var L=this.getGraphBounds();d.handleCustomLink(u,D);M=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(D))}catch(O){d.handleError(O)}return M};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(u){var D=x.apply(this,arguments);null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src});return D};var z=g.setBackgroundImage;g.setBackgroundImage=function(u){null!=u&&null!=u.originalSrc&&(u=d.createImageForPageLink(u.originalSrc,d.currentPage,this));z.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(u,D){u=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=u){var M=u.indexOf(",");if(0<M)for(u=u.substring(M+1),D=D.getProperty("patches"),M=0;M<D.length;M++)if(null!=D[M][EditorUi.DIFF_UPDATE]&&null!=D[M][EditorUi.DIFF_UPDATE][u]||-null!=D[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(D[M][EditorUi.DIFF_REMOVE],u)){g.refreshBackgroundImage();break}}}));var B=g.getBackgroundImageObject;g.getBackgroundImageObject=function(u,D){var M=B.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=D?d.createImageForPageLink(M.originalSrc,null,null,!0):{src:M.originalSrc});return M};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(u){u=null!=u?u:"";"1"==urlParams.dev&&(u+=(0<u.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(u,D,M){var L=D;D=function(O,R,S){if(null==R){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(R=V.getAttribute("href"))}null!=-R&&g.isCustomLink(R)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&g.customLinkClicked(R,S)&&mxEvent.consume(O);null!=L&&L(O,R,S)};G.call(this,u,D,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(u,D,M){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(u,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);g.isSelectionEmpty()||-null==d.addSelectionToScratchpad||this.addMenuItems(u,["-","addToScratchpad"],null,M);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(u,["-","exitGroup","home"],null,M)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(u,D,M){if(d.editor.graph.isSelectionEmpty())Q.apply(this,arguments),d.menus.addMenuItems(u,["copyAsImage","copyAsSvg"],null,M);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(u,D,M):this.addPopupMenuArrangeItems(u,D,-M),this.addMenuItems(u,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,M),this.isShowCellEditItems()||this.addPopupDeleteItem(u,D,M),this.addMenuItems(u,["lockUnlock","-"],null,M),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(D)&&g.isCellEditable(D)&&(this.addSubmenu("editCell",u,null,mxResources.get("edit")),u.addSeparator(),g.getModel().isEdge(D))){this.addSubmenu("line",u);var L=g.getModel().getGeometry(D);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(u,-["clearWaypoints"],null,M)}1==g.getSelectionCount()&&this.addMenuItems(u,["enterGroup"],null,M);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(u,"mergeCells"):(1<L.style.colspan||1<L.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.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=g.getExportVariables;g.getExportVariables=function(){var u=U.apply(this,arguments),D=d.getCurrentFile();null!=D&&(u.filename=D.getTitle());u.pagecount=null!=d.pages?d.pages.length:1;u.page=null!=d.currentPage?d.currentPage.getName():"";u.pagenumber=null!=d.pages&&null!=-d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return u};var T=g.getGlobalVariable;g.getGlobalVariable=function(u){var D=d.getCurrentFile();return"filename"==u&&null!=D?D.getTitle():"page"==u&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==u?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==u?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var P=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var u=-this.getCurrentFile(),D=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;P!=D&&u==v&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=D;v=u}));var A=g.labelLinkClicked;g.labelLinkClicked=function(u,D,M){var L=D.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))A.apply(this,arguments);else{if(!g.isEnabled()||null!=u&&g.isCellLocked(u.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(M)}};-this.editor.getOrCreateFilename=function(){var u=d.defaultFilename,D=d.getCurrentFile();null!=D&&(u=null!=D.getTitle()?D.getTitle():u);return u};var N=this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);N.visible=N.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&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(u,D){null!=D&&g.isEnabled()&&!g.isEditing()&&null!=D.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(u){var D=g.cellEditor.text2,M=null;null!=-D&&(mxEvent.addListener(D,"dragleave",function(L){null!=M&&(M.parentNode.removeChild(M),M=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(D));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(R,S,V,X,W,Y){g.insertImage(R,-W,Y)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var S=0;S<R.length;S++)R[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var O=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(R){var S=Math.max(1,R.width);R=Math.max(1,R.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,S)),V/Math.max(1,R));g.insertImage(decodeURIComponent(O),-S*V,R*V)})):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()){N=this.editor.graph.view;var J=mxSettings.getUnit();N.setUnit(J);Editor.pageSizeUnit=-J==mxConstants.METERS?mxConstants.MILLIMETERS:J;N.addListener("unitChanged",function(u,D){u=D.getProperty("unit");mxSettings.setUnit(u);mxSettings.save();Editor.pageSizeUnit=u==mxConstants.METERS?mxConstants.MILLIMETERS:u});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,N.unit);this.refresh()}if("1"==urlParams.styledev){N=document.getElementById("geFooter");-null!=N&&(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)})),N.appendChild(this.styleInput),-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,D){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 K=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==this.styleInput?!0:K.apply(this,arguments)}}N=document.getElementById("geInfo");-null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var m=null;mxEvent.addListener(g.container,"dragleave",function(u){g.isEnabled()&&(null!=m&&(m.parentNode.removeChild(m),m=null),u.stopPropagation(),u.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(u){null==m&&(m=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();u.stopPropagation();u.preventDefault()}));mxEvent.addListener(g.container,-"drop",mxUtils.bind(this,function(u){null!=m&&(m.parentNode.removeChild(m),m=null);if(g.isEnabled()){var D=mxUtils.convertPoint(g.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),M=u.dataTransfer.files,L=g.view.translate,O=g.view.scale,R=D.x/O-L.x,S=D.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(u)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(u)&&(S=R=null),this.importFiles(M,R,S,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(u),null,null,mxEvent.isShiftDown(u),u));else{mxEvent.isAltDown(u)&&(S=R=0);var V=0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):null;D=this.extractGraphModelFromEvent(u,null!=this.pages);if(null!=D)g.setSelectionCells(this.importXml(D,R,S,!0));else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/html")){var X=u.dataTransfer.getData("text/html");D=document.createElement("div");D.innerHTML=Graph.sanitizeHtml(X);-var W=null;M=D.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(W=!0)):(M=D.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(D=D.getElementsByTagName("pre"),null!=D&&1==D.length&&(X=mxUtils.getTextContent(D[0]))));var Y=!0,Z=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(X,R,S,!0,W,null,Y,mxEvent.isControlDown(u)))});W&&null!=X&&X.length>this.resampleThreshold?-this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(u)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(aa){var ha=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ha)),ea/Math.max(1,aa));g.setSelectionCell(g.insertVertex(null,null,"",R,S,ha*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-V+";"))}),mxUtils.bind(this,function(aa){g.setSelectionCells(this.insertTextAt(V,R,S,!0))})):0<=mxUtils.indexOf(u.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(u.dataTransfer.getData("text/plain"),R,S,!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(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var u=parseInt(this.div.offsetLeft),D=parseInt(this.div.offsetWidth),-M=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),R=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(u,M-D))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,R-O))+"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(N=-Editor.currentTheme,"simple"==N||"sketch"==N)this.doSetCurrentTheme(N,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));N=!1;if(null!=urlParams.dark)N=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)N="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||-N&&"auto"!=mxSettings.settings.darkMode||(N=mxSettings.settings.darkMode);"auto"==N&&this.isAutoDarkModeSupported()&&(N=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof N?"1"==N:N);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);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",-mxUtils.bind(this,function(u,D){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var t=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}t.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,-mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);-this.bottomResizer=x;var z=null,B=null,I=null,G=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);z=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();-mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var Q=!1;null!=z&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-z)+"px",Q=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-B)+"px",Q=!0);Q&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),-function(C){null==z&&null==B||mxEvent.consume(C);B=z=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";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",-mxUtils.bind(this,function(C){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";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML=-" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var g=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(z){var B=mxEvent.getSource(z);null==g.container||!g.isEnabled()||g.isMouseDown||-g.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=z.keyCode&&(mxClient.IS_MAC||17!=z.keyCode)&&(!mxClient.IS_MAC||91!=z.keyCode&&93!=z.keyCode)||n||(l.style.left=g.container.scrollLeft+10+"px",l.style.top=g.container.scrollTop+10+"px",z=g.container.scrollLeft,B=g.container.scrollTop,g.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=z,g.container.scrollTop=B)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(z){var B=z.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(z){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(z){if(g.isEnabled())try{mxClipboard.copy(g),-this.copyCells(l,!0),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(z){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=z.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(z,l,!0,!0)),!mxEvent.isConsumed(z)){var B=g.container.scrollLeft,I=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=B,g.container.scrollTop=I,Graph.removePasteFormatting(l.firstChild),-this.pasteCells(z,l,!1,!0)}catch(G){this.handleError(G)}}),0)}}catch(G){this.handleError(G)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(z){return mxEvent.getSource(z)==l?!0:x.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){if(null==d||""==d)d=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(d)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==d||d==Editor.currentTheme;if(l||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return l};EditorUi.prototype.saveScrollState=-function(d){var g=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));g={x:l,y:n,tx:g.x,ty:g.y};d&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=-d.boundingRect){var n=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-n.x;d.y-=d.boundingRect.y-n.y}this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(l.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="")}));mxEvent.addListener(d,-"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(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;g=null!=n&&null!=n.getAttribute("class");if(!g&&null!=n){n=n.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;-n==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";n=32>=d.clientWidth;d.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=-""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(d){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);"sketch"==d&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];-null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=-function(d){null==this.sidebarWindow||d||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||d||(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(d){var g=-this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);if("simple"==d||"sketch"==d){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=-!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(d){};EditorUi.prototype.createMainMenuForTheme=function(d){};EditorUi.prototype.createFooterMenuForTheme=function(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="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display=-"",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,g,l,n){l=null!=l?l:"geButton";var x=this.menus.get(d);n=this.menubar.addMenu(mxResources.get(d),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(x,n,l);null!=g&&(n.style.backgroundImage="url("+g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(d,g,l,n){d=this.createToolbarButton(d,g,l);n=null!=n?n:this.container;n.appendChild(d);return d};-EditorUi.prototype.createToolbarButton=function(d,g,l){var n=document.createElement("a");n.className="geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=g&&n.setAttribute("title",g);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(d,g,l){var n=this.actions.get(d),x=null!=n?n.funct:null,z=this.createToolbarButton(g,-mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(d=function(){n.isEnabled()?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",d),n.addListener("stateChanged",d),d());return z};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="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"),g,60,240,l,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width=-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");d.format.refresh();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?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var z=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>z||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var y=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=-function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):y.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=d?g:0,z=Editor.transitionDelay;-mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+z+"s 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==x&&n()}),1E3*z)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var H=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=-mxUtils.bind(this,function(B,I){var G=this.menus.get(B);B=this.createMenuElement(I,mxUtils.bind(this,function(){G.funct.apply(this,arguments)}));B.setAttribute("title",I);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";d.parentNode.appendChild(B);return B});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-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",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.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var l=-g("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var z=document.createElement("span");x.appendChild(z);this.dependsOnLanguage(mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));z.innerHTML="";mxUtils.write(z,mxResources.get("openLibraryFrom"));x.setAttribute("title",-mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);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),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-g)/2):56,d-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));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.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=-d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};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){this.spinner.spin(document.body,mxResources.get("working"))&&-(mxSettings.setLanguage(d),mxSettings.save(),mxClient.language=d,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(d,g){this.dependsOnLanguage(mxUtils.bind(this,function(){d.setAttribute("title",mxResources.get(g))}))};EditorUi.prototype.dependsOnLanguage=function(d){d();this.addListener("languageChanged",d)};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 l=-window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!d?g.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&d&&g.setAttribute("media",l?"(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.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){mxUtils.lightDarkColorSupported&&(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,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(!0))),(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,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",l.style.left="10px",-l.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 n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var z=parseInt(x[2]);x=parseInt(x[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=-z+"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";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.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-4):(d.vertexFontSize=Graph.prototype.vertexFontSize,-d.edgeFontSize=Graph.prototype.edgeFontSize),d.defaultEdgeStyle.fontSize=d.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="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 l=d.indexOf(",");0<l&&(g=this.getPageById(d.substring(l+-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 l=JSON.parse(d.substring(17));null!=l&&null!=l.title&&(g=l.title)}catch(n){}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,l){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,l){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());-mxSettings.save()}));d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,l){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,-l){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,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(g,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.writeImageToClipboard=function(d,g,l,n,x,z){n=null!=n?n:"image/png";var B=null==g||null==l?'<img src="'+d+'">':'<img src="'+d+'" width="'+g+'" height="'+l+'">',I={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(I[n]=this.base64ToBlob(d.substring(d.indexOf(",")+-1),n));var G=new ClipboardItem(I);navigator.clipboard.write([G]).then(x)["catch"](z);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[d],"w",g,"h",l,"type",n,"html",[B],"data",[I],"item",[G])};EditorUi.prototype.writeHtmlToClipboard=function(d,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(d)],{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(d,g){navigator.clipboard.writeText(d)["catch"](g)};+null!=D[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(D[M][EditorUi.DIFF_REMOVE],u)){g.refreshBackgroundImage();break}}}));var B=g.getBackgroundImageObject;g.getBackgroundImageObject=function(u,D,M){var L=B.apply(this,arguments);null!=L&&null!=L.originalSrc&&(L=D?d.createImageForPageLink(L.originalSrc,M,null,!0):{src:L.originalSrc});return L};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(u){u=null!=u?u:"";"1"==urlParams.dev&&(u+=(0<u.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(u,D,M){var L=D;D=function(O,R,S){if(null==R){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(R=V.getAttribute("href"))}null!=R&&g.isCustomLink(R)&&(mxEvent.isTouchEvent(O)||+!mxEvent.isPopupTrigger(O))&&g.customLinkClicked(R,S)&&mxEvent.consume(O);null!=L&&L(O,R,S)};G.call(this,u,D,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(u,D,M){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(u,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(u,+["-","addToScratchpad"],null,M);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(u,["-","exitGroup","home"],null,M)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(u,D,M){if(d.editor.graph.isSelectionEmpty())Q.apply(this,arguments),d.menus.addMenuItems(u,["copyAsImage","copyAsSvg"],null,M);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(u,D,M):this.addPopupMenuArrangeItems(u,D,M),this.addMenuItems(u,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),+null,M),this.isShowCellEditItems()||this.addPopupDeleteItem(u,D,M),this.addMenuItems(u,["lockUnlock","-"],null,M),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(D)&&g.isCellEditable(D)&&(this.addSubmenu("editCell",u,null,mxResources.get("edit")),u.addSeparator(),g.getModel().isEdge(D))){this.addSubmenu("line",u);var L=g.getModel().getGeometry(D);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(u,["clearWaypoints"],null,M)}1==g.getSelectionCount()&&this.addMenuItems(u,+["enterGroup"],null,M);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(u,"mergeCells"):(1<L.style.colspan||1<L.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.dependsOnLanguage(mxUtils.bind(this,+function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=g.getExportVariables;g.getExportVariables=function(){var u=U.apply(this,arguments),D=d.getCurrentFile();null!=D&&(u.filename=D.getTitle());u.pagecount=null!=d.pages?d.pages.length:1;u.page=null!=d.currentPage?d.currentPage.getName():"";u.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return u};var T=g.getGlobalVariable;g.getGlobalVariable=+function(u){var D=d.getCurrentFile();return"filename"==u&&null!=D?D.getTitle():"page"==u&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==u?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==u?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var P=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var u=this.getCurrentFile(),D=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;P!=D&&u==v&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),+g.view.validate());P=D;v=u}));var A=g.labelLinkClicked;g.labelLinkClicked=function(u,D,M){var L=D.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))A.apply(this,arguments);else{if(!g.isEnabled()||null!=u&&g.isCellLocked(u.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var u=d.defaultFilename,D=d.getCurrentFile();null!=D&&(u=null!=D.getTitle()?D.getTitle():u);return u};var N=+this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);N.visible=N.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&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(u,D){null!=+D&&g.isEnabled()&&!g.isEditing()&&null!=D.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(u){var D=g.cellEditor.text2,M=null;null!=D&&(mxEvent.addListener(D,"dragleave",function(L){null!=M&&(M.parentNode.removeChild(M),M=null);L.stopPropagation();L.preventDefault()}),+mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(D));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(R,S,V,X,W,Y){g.insertImage(R,W,Y)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var S=0;S<R.length;S++)R[S]()},mxEvent.isControlDown(L));+else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var O=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(R){var S=Math.max(1,R.width);R=Math.max(1,R.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,S)),V/Math.max(1,R));g.insertImage(decodeURIComponent(O),S*V,R*V)})):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()){N=this.editor.graph.view;var J=mxSettings.getUnit();N.setUnit(J);Editor.pageSizeUnit=J==mxConstants.METERS?mxConstants.MILLIMETERS:J;N.addListener("unitChanged",function(u,D){u=D.getProperty("unit");mxSettings.setUnit(u);+mxSettings.save();Editor.pageSizeUnit=u==mxConstants.METERS?mxConstants.MILLIMETERS:u});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,N.unit);this.refresh()}if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(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)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,D){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 K=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==this.styleInput?!0:K.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var m=null;mxEvent.addListener(g.container,+"dragleave",function(u){g.isEnabled()&&(null!=m&&(m.parentNode.removeChild(m),m=null),u.stopPropagation(),u.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(u){null==m&&(m=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();u.stopPropagation();u.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(u){null!=m&&(m.parentNode.removeChild(m),m=null);if(g.isEnabled()){var D=mxUtils.convertPoint(g.container,+mxEvent.getClientX(u),mxEvent.getClientY(u)),M=u.dataTransfer.files,L=g.view.translate,O=g.view.scale,R=D.x/O-L.x,S=D.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(u)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(u)&&(S=R=null),this.importFiles(M,R,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(u),null,null,mxEvent.isShiftDown(u),u));else{mxEvent.isAltDown(u)&&(S=R=0);var V=0<=mxUtils.indexOf(u.dataTransfer.types,+"text/uri-list")?u.dataTransfer.getData("text/uri-list"):null;D=this.extractGraphModelFromEvent(u,null!=this.pages);if(null!=D)g.setSelectionCells(this.importXml(D,R,S,!0));else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/html")){var X=u.dataTransfer.getData("text/html");D=document.createElement("div");D.innerHTML=Graph.sanitizeHtml(X);var W=null;M=D.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||+(W=!0)):(M=D.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(D=D.getElementsByTagName("pre"),null!=D&&1==D.length&&(X=mxUtils.getTextContent(D[0]))));var Y=!0,Z=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(X,R,S,!0,W,null,Y,mxEvent.isControlDown(u)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(u)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),+mxUtils.bind(this,function(aa){var ha=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ha)),ea/Math.max(1,aa));g.setSelectionCell(g.insertVertex(null,null,"",R,S,ha*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){g.setSelectionCells(this.insertTextAt(V,R,S,!0))})):0<=mxUtils.indexOf(u.dataTransfer.types,"text/plain")&&+g.setSelectionCells(this.insertTextAt(u.dataTransfer.getData("text/plain"),R,S,!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(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",+function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var u=parseInt(this.div.offsetLeft),D=parseInt(this.div.offsetWidth),M=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),R=d.embedViewport.y+d.embedViewport.height;+this.div.style.left=Math.max(d.embedViewport.x,Math.min(u,M-D))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,R-O))+"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(N=Editor.currentTheme,"simple"==N||"sketch"==N)this.doSetCurrentTheme(N,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():+(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));N=!1;if(null!=urlParams.dark)N=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)N="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||N&&"auto"!=mxSettings.settings.darkMode||(N=mxSettings.settings.darkMode);"auto"==N&&this.isAutoDarkModeSupported()&&(N=window.matchMedia("(prefers-color-scheme: dark)").matches);+this.setDarkMode("string"===typeof N?"1"==N:N);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);+Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(u,D){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=+0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var t=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}t.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),+this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var z=null,B=null,I=null,G=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(C);+n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);z=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var Q=!1;null!=z&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-+z)+"px",Q=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-B)+"px",Q=!0);Q&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==z&&null==B||mxEvent.consume(C);B=z=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";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(C){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";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var g=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(z){var B=mxEvent.getSource(z);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=z.keyCode&&(mxClient.IS_MAC||17!=z.keyCode)&&(!mxClient.IS_MAC||91!=z.keyCode&&93!=z.keyCode)||+n||(l.style.left=g.container.scrollLeft+10+"px",l.style.top=g.container.scrollTop+10+"px",z=g.container.scrollLeft,B=g.container.scrollTop,g.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=z,g.container.scrollTop=B)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(z){var B=z.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),+l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(z){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(z){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l,!0),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(z){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(l.innerHTML=+" ",l.focus(),null!=z.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(z,l,!0,!0)),!mxEvent.isConsumed(z)){var B=g.container.scrollLeft,I=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=B,g.container.scrollTop=I,Graph.removePasteFormatting(l.firstChild),this.pasteCells(z,l,!1,!0)}catch(G){this.handleError(G)}}),0)}}catch(G){this.handleError(G)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(z){return mxEvent.getSource(z)==+l?!0:x.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){if(null==d||""==d)d=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(d)||this.isDefaultTheme(Editor.currentTheme)&&+"simple"==d||d==Editor.currentTheme;if(l||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return l};EditorUi.prototype.saveScrollState=function(d){var g=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?+(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));g={x:l,y:n,tx:g.x,ty:g.y};d&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=d.boundingRect){var n=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-n.x;d.y-=d.boundingRect.y-n.y}this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*g;+this.diagramContainer.scrollTop=d.y+(l.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="")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(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;g=null!=n&&null!=n.getAttribute("class");if(!g&&null!=n){n=n.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',+g=!0)}this.statusContainer.style.display="none";n=32>=d.clientWidth;d.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(d){this.destroyWindows(!0);this.updateDefaultStyles();+this.switchThemeConstants(d);this.switchCssForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);"sketch"==d&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,+this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(d){null==this.sidebarWindow||d||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||d||(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(d){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=+Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);if("simple"==d||"sketch"==d){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||+Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(d){};EditorUi.prototype.createMainMenuForTheme=function(d){};EditorUi.prototype.createFooterMenuForTheme=function(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="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,+g,l,n){l=null!=l?l:"geButton";var x=this.menus.get(d);n=this.menubar.addMenu(mxResources.get(d),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(x,n,l);null!=g&&(n.style.backgroundImage="url("+g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(d,g,l,n){d=this.createToolbarButton(d,g,l);n=null!=n?n:this.container;n.appendChild(d);return d};EditorUi.prototype.createToolbarButton=function(d,g,l){var n=document.createElement("a");n.className=+"geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=g&&n.setAttribute("title",g);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(d,g,l){var n=this.actions.get(d),x=null!=n?n.funct:null,z=this.createToolbarButton(g,mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(d=function(){n.isEnabled()?+z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",d),n.addListener("stateChanged",d),d());return z};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="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"),+g,60,240,l,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=+x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");d.format.refresh();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?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var z=+window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>z||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var y=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):+y.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=d?g:0,z=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");+0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+z+"s 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==x&&n()}),1E3*z)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var H=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(B,I){var G=this.menus.get(B);B=this.createMenuElement(I,+mxUtils.bind(this,function(){G.funct.apply(this,arguments)}));B.setAttribute("title",I);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";d.parentNode.appendChild(B);return B});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-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",+g.className="geButton",g.style.left="0px",g.style.right="50%",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.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var l=g("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);+var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var z=document.createElement("span");x.appendChild(z);this.dependsOnLanguage(mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));z.innerHTML="";mxUtils.write(z,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);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),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-+g)/2):56,d-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));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.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};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){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(d),mxSettings.save(),mxClient.language=d,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,+null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(d,g){this.dependsOnLanguage(mxUtils.bind(this,function(){d.setAttribute("title",mxResources.get(g))}))};EditorUi.prototype.dependsOnLanguage=function(d){d();this.addListener("languageChanged",d)};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 l=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!d?+g.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&d&&g.setAttribute("media",l?"(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.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){mxUtils.lightDarkColorSupported&&(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,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(!0))),+(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,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",l.style.left="10px",l.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 n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");+var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var z=parseInt(x[2]);x=parseInt(x[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=z+"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";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.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-4):(d.vertexFontSize=Graph.prototype.vertexFontSize,d.edgeFontSize=Graph.prototype.edgeFontSize),d.defaultEdgeStyle.fontSize=d.edgeFontSize;if(null==Editor.config||+null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="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 l=d.indexOf(",");0<l&&(g=this.getPageById(d.substring(l+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 l=JSON.parse(d.substring(17));null!=l&&null!=l.title&&(g=l.title)}catch(n){}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,l){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,l){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));+d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,l){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,l){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,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(g,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.writeImageToClipboard=function(d,g,l,n,x,z){n=null!=n?n:"image/png";var B=null==g||null==l?'<img src="'+d+'">':'<img src="'+d+'" width="'+g+'" height="'+l+'">',I={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(I[n]=this.base64ToBlob(d.substring(d.indexOf(",")+1),n));var G=new ClipboardItem(I);+navigator.clipboard.write([G]).then(x)["catch"](z);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[d],"w",g,"h",l,"type",n,"html",[B],"data",[I],"item",[G])};EditorUi.prototype.writeHtmlToClipboard=function(d,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(d)],{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(d,g){navigator.clipboard.writeText(d)["catch"](g)};EditorUi.prototype.copySvg=function(d,g,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<d.length?d:null);n.setAttribute("content",g);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),z=parseInt(n.getAttribute("width")),B=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,z,B,"image/svg+xml",null,mxUtils.bind(this,function(I){this.handleError(I)}))}}catch(I){this.handleError(I)}};EditorUi.prototype.copyImage=function(d,g,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var z=this.createImageDataUri(n,g,"png"),B=Math.round(parseInt(x.getAttribute("width"))/l),I=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[d],"xml",[g],"scale",[l]);this.writeImageToClipboard(z,B,I,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var G=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(z.substring(z.lastIndexOf(",")+1),G,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,@@ -13874,8 +13875,8 @@ App.prototype.generateDiagram=function(b,f,k){var c=!1,p=null,q='Write a detailef(p,y)},k)};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};App.prototype.filterDrafts=function(b,f,k){function c(){k(p)}var p=[];try{this.getDatabaseItems(mxUtils.bind(this,function(q){EditorUi.debug("App.filterDrafts",[this],"items",q);for(var t=0;t<q.length;t++)try{var y=q[t].key;if(null!=y&&".draft_"==y.substring(0,7)){var H=JSON.parse(q[t].data);null!=H&&"draft"==H.type&&H.aliveCheck!=f&&(null==b&&null==H.fileObject||null!=H.fileObject&&H.fileObject.path==b)&&(H.key=y,p.push(H))}}catch(F){}c()}),c)}catch(q){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(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 k=new Date(f[0].modified);k=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",-[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c&&null!=f[c]?c:0;this.loadDraft(f[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[c].key)}))}),mxUtils.bind(this,function(c,p){this.removeDatabaseItem(f[""!=c?c:0].key);null!=p&&p()}),null,null,null,1<f.length?f:null);this.showDialog(k.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)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};+[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c&&null!=f[c]?c:0;this.loadDraft(f[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[c].key)}))}),mxUtils.bind(this,function(c,p){this.removeDatabaseItem(f[""!=c?c:0].key);null!=p&&p()}),null,null,null,1<f.length?f:null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(c){c&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,+this.getFileData(),null,null,null,null,null,!0))}));k.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),k=mxUtils.bind(this,function(){var p=new SplashDialog(this);this.showDialog(p.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(q,t){!q&&!t||mxClient.IS_CHROMEAPP||(q=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=q)}),!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||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(c.container,3>b?200:300,3<f?320:210,!0,!1)}}};App.prototype.addLanguageMenu=function(b,f,k){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),this.setElementTitle(c,"language"),c.className="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=@@ -13913,14 +13914,14 @@ App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===tmxClient.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 k=f.documentElement.getElementsByTagName("diagram"),c=0;c<k.length;c++){var p=Editor.parseDiagramNode(k[c],!0);null!=p&&(mxUtils.setTextContent(k[c],""),k[c].appendChild(p))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(q){}return b};-App.prototype.createFile=function(b,f,k,c,p,q,t,y,H,F){c=y?null:null!=c?c: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 E=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){E();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=l&&this.handleError(l)});try{var g=mxUtils.bind(this,function(l){E();this.fileCreated(l,-k,q,p,H,F)});c==App.MODE_GOOGLE&&null!=this.drive?(null==t&&null!=this.stateArg&&null!=this.stateArg.folderId&&(t=this.stateArg.folderId),this.drive.insertFile(b,f,t,g,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,g,d,!1,t):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,g,d,!1,t):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,g,d,!1,t):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,g,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,f,g,d,!1,t):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,g,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,k,q,p,H,F)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):(E(),this.fileCreated(new LocalFile(this,f,b,null==c),k,q,p,H,F))}catch(l){E(),-this.handleError(l)}}};-App.prototype.fileCreated=function(b,f,k,c,p,q){var t=window.location.pathname;null!=f&&0<f.length&&(t+="?libs="+f);null!=p&&0<p.length&&(t+="?clibs="+p);t=this.getUrl(t);b.getMode()!=App.MODE_DEVICE&&(t+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var H=window.location.protocol+"//"+window.location.hostname+t,F=y,E=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(E=-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(E.container),F=this.decodeNodeIntoGraph(F,E));b.setData(this.createFileData(y,E,b,H));null!=E&&E.container.parentNode.removeChild(E.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==k&&null!=l&&(k=!l.isModified()&&null==l.getMode());var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);k&&this.updateStatus(mxUtils.bind(this,-function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var z=[],B=p.split(";"),I=0;I<B.length;I++)z.push(decodeURIComponent(B[I]));this.loadLibraries(z)}null!=c&&c()}),x=mxUtils.bind(this,function(){k||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==k||k?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),-b.getTitle(),null==b.getMode())),window.geOpenWindow(t,null,x))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(l){d();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};+App.prototype.createFile=function(b,f,k,c,p,q,t,y,H,F){EditorUi.debug("App.createFile",[this],"title",[b],"data",[f],"libs",[k],"mode",[c]);c=y?null:null!=c?c: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 E=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){E();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():+null!=l&&this.handleError(l)});try{var g=mxUtils.bind(this,function(l){E();this.fileCreated(l,k,q,p,H,F)});c==App.MODE_GOOGLE&&null!=this.drive?(null==t&&null!=this.stateArg&&null!=this.stateArg.folderId&&(t=this.stateArg.folderId),this.drive.insertFile(b,f,t,g,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,g,d,!1,t):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,g,d,!1,t):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,g,d,!1,t):c==App.MODE_DROPBOX&&+null!=this.dropbox?this.dropbox.insertFile(b,f,g,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,g,d,!1,t):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,g,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,k,q,p,H,F)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):+(E(),this.fileCreated(new LocalFile(this,f,b,null==c),k,q,p,H,F))}catch(l){E(),this.handleError(l)}}};+App.prototype.fileCreated=function(b,f,k,c,p,q){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[f],"replace",[k]);var t=window.location.pathname;null!=f&&0<f.length&&(t+="?libs="+f);null!=p&&0<p.length&&(t+="?clibs="+p);t=this.getUrl(t);b.getMode()!=App.MODE_DEVICE&&(t+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var H=window.location.protocol++"//"+window.location.hostname+t,F=y,E=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(E=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(E.container),F=this.decodeNodeIntoGraph(F,E));b.setData(this.createFileData(y,E,b,H));null!=E&&E.container.parentNode.removeChild(E.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==k&&null!=l&&(k=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));+var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);k&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var z=[],B=p.split(";"),I=0;I<B.length;I++)z.push(decodeURIComponent(B[I]));this.loadLibraries(z)}null!=c&&c()}),x=mxUtils.bind(this,function(){k||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});+null==k||k?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(t,null,x))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(l){d();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};App.prototype.loadFile=function(b,f,k,c,p){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var q=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var H=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=c&&c()):H({message:mxResources.get("fileNotFound")})}),H)}else 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 if(null!=k)this.spinner.stop(),this.fileLoaded(k),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 F=decodeURIComponent(b.substring(1));"<"!=F.charAt(0)&&(F=Graph.decompress(F));F=new LocalFile(this,F,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,@@ -14209,9 +14210,9 @@ EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(bGraph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),p=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(H){H=H.split("^");return{name:H[0],url:H[1]}})}catch(H){console.log("ExtFonts format error: "+H.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!=q&&0<q.length?q:null,backgroundImage:t,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(c)||isNaN(p)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,c,p),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:y||[]}};-Graph.prototype.saveViewState=function(b,f,k,c){k||(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);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&f.setAttribute("backgroundImage",-JSON.stringify(c)));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(p){return p.name+"^"+p.url}).join("|"))};+Graph.prototype.saveViewState=function(b,f,k,c,p){k||(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);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,+c,p),null!=c&&f.setAttribute("backgroundImage",JSON.stringify(c)));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(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;diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.jsindex 8f2fb9eec..295dcddbc 100644--- a/src/main/webapp/js/integrate.min.js+++ b/src/main/webapp/js/integrate.min.js@@ -56,13 +56,13 @@ if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMaplang.substring(0,dash));0<=window.mxLanguages.indexOf(lang)&&(window.mxLanguage=lang)}}"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="1"));"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}"dark"==urlParams.ui&&null==urlParams.dark&&(urlParams.dark="1");"sketch"==a&&null==urlParams.sketch&&"ac.draw.io"===window.location.hostname&&(urlParams.sketch="1");return a}();-(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,-8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";+(function(){if("undefined"!==typeof JSON&&isLocalStorage){try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}try{a=localStorage.getItem(".configuration"),b=null,null!=a&&(b=JSON.parse(a).lockdown),null!=b&&(urlParams.lockdown=b)}catch(d){}}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&+(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,+b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"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:"28.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/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.1.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),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||@@ -88,8 +88,8 @@ unescape(c)):mxResources.resources[d]=c}}}},containsKey:function(a){return null!"/resources/editor",null,function(){mxResources.add(mxClient.basePath+"/resources/graph",null,a)})}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.intersect=function(a){if(null!=a){var b=this.x+this.width,c=a.x+a.width,d=this.y+this.height,e=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(b,c)-this.x;this.height=Math.min(d,e)-this.y}};-mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};-mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};+mxRectangle.prototype.intersectsPoint=function(a,b){return a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,q=(l.geometry.y-l.previous.y)*n,r=(l.geometry.width-l.previous.width)*n;n*=l.geometry.height-l.previous.height;0==d?(m.x-=p,m.y-=q,m.width-=r,m.height-=n):(m.x+=p/10,m.y+=q/10,m.width+=r/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},@@ -2084,33 +2084,33 @@ f.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,p){return thisu=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var y=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+y*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+h.height/this.scale)/k)-y)*k)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=h+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(h,m,p,k,u,w){var y=g.apply(this,arguments);null==w||w||mxEvent.addListener(y,"mousedown",function(C){mxEvent.consume(C)});return y};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(h,m,p){var k=this.graph.model.getParent(h);if(m){var u=this.graph.model.isEdge(h)?null:this.graph.getCellGeometry(h);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(h)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(h))}else if(u=d.apply(this,arguments),this.graph.isTableCell(h)||this.graph.isTableRow(h))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(h)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),p=m.getParent(h),k=this.graph.view.getState(p),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=p;p=m.getParent(p)}return h}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this,g=this.editor.graph;g.lightbox=f;var d=g.getGraphBounds;g.getGraphBounds=function(){var H=d.apply(this,arguments),S=this.backgroundImage;if(null!=S&&null!=S.width&&null!=S.height){var ea=this.view.translate,la=this.view.scale;H=mxRectangle.fromRectangle(H);H.add(new mxRectangle((ea.x+S.x)*la,(ea.y+S.y)*la,S.width*la,S.height*la))}return H};g.useCssTransforms&&+this.graph.isCellSelected(h)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),p=m.getParent(h),k=this.graph.view.getState(p),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=p;p=m.getParent(p)}return h}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this,g=this.editor.graph;g.lightbox=f;var d=g.getGraphBounds;g.getGraphBounds=function(){var H=d.apply(this,arguments),S=this.backgroundImage;if(null!=S&&null!=S.width&&null!=S.height){var fa=this.view.translate,la=this.view.scale;H=mxRectangle.fromRectangle(H);H.add(new mxRectangle((fa.x+S.x)*la,(fa.y+S.y)*la,S.width*la,S.height*la))}return H};g.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(H,S){this.clearSelectionState()});g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);g.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);g.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){g.isEnabled=function(){return!1};g.panningHandler.isForcePanningEvent=function(H){for(var S=H.getSource();null!=S&&S!=g.container;){if("foreignObject"===S.nodeName||"text"===S.nodeName)return!1;S=S.parentNode}return!mxEvent.isPopupTrigger(H.getEvent())};var h=g.panningHandler.start;g.panningHandler.start=function(){h.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var m=!1,p=!1;this.setDefaultStyle=function(H){try{g.getModel().isEdge(H)?-p=g.pasteEdgeStyle=!1:m=!1;var S=g.getCellStyle(H,!1),ea=[],la=[],O;for(O in S)ea.push(S[O]),la.push(O);g.getModel().isEdge(H)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ea,"cells",[H],"force",!0));g.getModel().isEdge(H)?p=g.pasteEdgeStyle=!0:m=!0}catch(V){this.handleError(V)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=p=g.pasteEdgeStyle=+p=g.pasteEdgeStyle=!1:m=!1;var S=g.getCellStyle(H,!1),fa=[],la=[],O;for(O in S)fa.push(S[O]),la.push(O);g.getModel().isEdge(H)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",fa,"cells",[H],"force",!0));g.getModel().isEdge(H)?p=g.pasteEdgeStyle=!0:m=!0}catch(V){this.handleError(V)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=p=g.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};g.addListener("cellsInserted",function(H,S){g.pasteCellStyles(g.includeDescendants(S.getProperty("cells")))});g.addListener("textInserted",function(H,S){g.pasteCellStyles(S.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(H){null==H&&(H=window.event);return g.isEditing()||null!=H&&this.isSelectionAllowed(H)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var H=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var S=-navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{H=[parseInt(S[1],10),parseInt(S[2],10),parseInt(S[3]||0,10)]}catch(ea){}}return H}(),null!=b&&16<=b[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"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{H=[parseInt(S[1],10),parseInt(S[2],10),parseInt(S[3]||0,10)]}catch(fa){}}return H}(),null!=b&&16<=b[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"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(H){if(null!=H){var S=mxEvent.getSource(H);if("A"==S.nodeName)for(;null!=S;){if("geHint"==S.className)return!0;S=S.parentNode}}return k(H)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=e.hoverIcons&&e.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(H){var S=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(H)-S.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(H)-S.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(H,S){return e.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(H){16==H.which?this.shiftDown=!0:32!=H.which||g.isEditing()?mxEvent.isConsumed(H)||27!=H.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(H)!=g.container||mxEvent.consume(H))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(H){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(H){return y.apply(this,arguments)||e.isSpaceDown()||mxEvent.isMouseEvent(H.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(H.getEvent()))&&(!mxEvent.isControlDown(H.getEvent())&&mxEvent.isRightMouseButton(H.getEvent())||mxEvent.isMiddleMouseButton(H.getEvent()))};var C=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(H){return C.apply(this,arguments)||13==H.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(H)||mxClient.IS_MAC&&mxEvent.isMetaDown(H)||mxClient.IS_SF&&mxEvent.isShiftDown(H))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return e.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,-function(){if(null!=this.toolbar)for(var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,S=this.toolbar.container.firstChild;null!=S;){var ea=S.getAttribute("data-min-width");null!=ea&&parseInt(ea)>H?S.style.display="none":S.style.display="";S=S.nextSibling}}),G=!1,J=null,M=null,Q=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var H=this.toolbar.container.firstChild,S=[];null!=H;){var ea=H.nextSibling;H.parentNode.removeChild(H);-S.push(H);H=ea}H=this.toolbar.fontMenu;ea=this.toolbar.sizeMenu;if(null==Q)this.toolbar.createTextToolbar();else{for(var la=0;la<Q.length;la++)this.toolbar.container.appendChild(Q[la]);this.toolbar.fontMenu=J;this.toolbar.sizeMenu=M}G=g.cellEditor.isContentEditing();J=H;M=ea;Q=S;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,-"resize",E);E();g.isTouchPopupMenuEnabled=function(){return null==e.dialog};var W=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){W.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var H=!1,S=function(){H||(H=!0,window.setTimeout(function(){var ea=g.getSelectedEditingElement();null!=ea&&(ea=mxUtils.getCurrentStyle(ea),null!=ea&&null!=e.toolbar&&(e.toolbar.setFontName(mxUtils.getCssFontFamily(ea.fontFamily)),e.toolbar.setFontSize(parseInt(ea.fontSize))));H=!1},0))};mxEvent.addListener(g.cellEditor.textarea,-"input",S);mxEvent.addListener(g.cellEditor.textarea,"touchend",S);mxEvent.addListener(g.cellEditor.textarea,"mouseup",S);mxEvent.addListener(g.cellEditor.textarea,"keyup",S);S()}};var X=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(H,S){try{X.apply(this,arguments),K()}catch(ea){e.handleError(ea)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(H){}var T=g.fireMouseEvent;-g.fireMouseEvent=function(H,S,ea){try{H==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(la){e.handleError(la)}};var N=g.foldCells;g.foldCells=function(H,S,ea,la,O){try{N.apply(this,arguments)}catch(V){e.handleError(V)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(H,S,ea){this.menus.createPopupMenu(H,S,ea)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(H){g.popupMenuHandler.hideMenu()}));-this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(H,S){var ea=[S.getProperty("cell")];S.getProperty("terminalInserted")&&(ea.push(S.getProperty("terminal")),window.setTimeout(function(){null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(ea[ea.length-1]))},0));g.pasteCellStyles(ea)});this.addListener("styleChanged",mxUtils.bind(this,function(H,S){H=S.getProperty("force");(this.updateDefaultStyle||+function(){if(null!=this.toolbar)for(var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,S=this.toolbar.container.firstChild;null!=S;){var fa=S.getAttribute("data-min-width");null!=fa&&parseInt(fa)>H?S.style.display="none":S.style.display="";S=S.nextSibling}}),G=!1,J=null,M=null,Q=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var H=this.toolbar.container.firstChild,S=[];null!=H;){var fa=H.nextSibling;H.parentNode.removeChild(H);+S.push(H);H=fa}H=this.toolbar.fontMenu;fa=this.toolbar.sizeMenu;if(null==Q)this.toolbar.createTextToolbar();else{for(var la=0;la<Q.length;la++)this.toolbar.container.appendChild(Q[la]);this.toolbar.fontMenu=J;this.toolbar.sizeMenu=M}G=g.cellEditor.isContentEditing();J=H;M=fa;Q=S;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,+"resize",E);E();g.isTouchPopupMenuEnabled=function(){return null==e.dialog};var W=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){W.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var H=!1,S=function(){H||(H=!0,window.setTimeout(function(){var fa=g.getSelectedEditingElement();null!=fa&&(fa=mxUtils.getCurrentStyle(fa),null!=fa&&null!=e.toolbar&&(e.toolbar.setFontName(mxUtils.getCssFontFamily(fa.fontFamily)),e.toolbar.setFontSize(parseInt(fa.fontSize))));H=!1},0))};mxEvent.addListener(g.cellEditor.textarea,+"input",S);mxEvent.addListener(g.cellEditor.textarea,"touchend",S);mxEvent.addListener(g.cellEditor.textarea,"mouseup",S);mxEvent.addListener(g.cellEditor.textarea,"keyup",S);S()}};var X=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(H,S){try{X.apply(this,arguments),K()}catch(fa){e.handleError(fa)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(H){}var T=g.fireMouseEvent;+g.fireMouseEvent=function(H,S,fa){try{H==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(la){e.handleError(la)}};var N=g.foldCells;g.foldCells=function(H,S,fa,la,O){try{N.apply(this,arguments)}catch(V){e.handleError(V)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(H,S,fa){this.menus.createPopupMenu(H,S,fa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(H){g.popupMenuHandler.hideMenu()}));+this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(H,S){var fa=[S.getProperty("cell")];S.getProperty("terminalInserted")&&(fa.push(S.getProperty("terminal")),window.setTimeout(function(){null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(fa[fa.length-1]))},0));g.pasteCellStyles(fa)});this.addListener("styleChanged",mxUtils.bind(this,function(H,S){H=S.getProperty("force");(this.updateDefaultStyle||H)&&g.copyCellStyles(S.getProperty("cells"),S.getProperty("keys"),S.getProperty("values"),g.currentVertexStyle,g.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&"1"==g.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==g.currentEdgeStyle.edgeStyle||"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):"filledEdge"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.filledEdgeImage.src):"pipe"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.pipeEdgeImage.src):"wire"==g.currentEdgeStyle.shape?-this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var H=g.currentVertexStyle.fontFamily||"Helvetica",S=String(g.currentVertexStyle.fontSize||"12"),ea=g.getView().getState(g.getSelectionCell());null!=ea&&(H=ea.style[mxConstants.STYLE_FONTFAMILY]||H,S=ea.style[mxConstants.STYLE_FONTSIZE]||S,10<H.length&&(H=H.substring(0,8)+"..."));this.toolbar.setFontName(H);+this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var H=g.currentVertexStyle.fontFamily||"Helvetica",S=String(g.currentVertexStyle.fontSize||"12"),fa=g.getView().getState(g.getSelectionCell());null!=fa&&(H=fa.style[mxConstants.STYLE_FONTFAMILY]||H,S=fa.style[mxConstants.STYLE_FONTSIZE]||S,10<H.length&&(H=H.substring(0,8)+"..."));this.toolbar.setFontName(H);this.toolbar.setFontSize(S)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(H,S){H=S.getProperty("cells");S=S.getProperty("parent");null!=S&&g.getModel().isLayer(S)&&!g.isCellVisible(S)&&null!=H&&0<H.length&&g.getModel().setVisible(S,!0)});Graph.selectParentLayer&&g.selectionModel.addListener(mxEvent.CHANGE,function(){if(g.isEnabled()&&!g.isSelectionEmpty()){var H=g.getLayerForCells(g.getSelectionCells());-null!=H&&g.setDefaultParent(H)}});this.gestureHandler=mxUtils.bind(this,function(H){null!=this.currentMenu&&mxEvent.getSource(H)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=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(){g.view.validateBackground()}));-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;+null!=H&&g.setDefaultParent(H)}});this.gestureHandler=mxUtils.bind(this,function(H){this.isHideCurrentMenuEvent(H)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=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(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",+mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;EditorUi.parsePng=function(a,b,f){function e(m,p){var k=d;d+=p;return m.substring(k,d)}function g(m){m=e(m,4);return m.charCodeAt(3)+(m.charCodeAt(2)<<8)+(m.charCodeAt(1)<<16)+(m.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var h=e(a,4);if(null!=b&&b(d-8,h,f))break;value=e(a,f);e(a,4);if("IEND"==h)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);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;@@ -2165,9 +2165,9 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipbnull;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=f.apply(this,arguments);a.updatePasteActionStates();return h};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var aa=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+aa.x*P.width),this.scale*(this.translate.y+aa.y*P.height),this.scale*aa.width*-P.width,this.scale*aa.height*P.height)};a.getPreferredPageSize=function(aa,P,ba){aa=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,aa.width*P.width,aa.height*P.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(aa,P,ba,ma){if(null!=a.container&&!a.isViewer()){ba=null!=ba?ba:0;ma=null!=ma?ma:0;var Ja=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),na=mxUtils.hasScrollbars(a.container),ya=a.view.translate,-za=a.view.scale,Ka=mxRectangle.fromRectangle(Ja);Ka.x=Ka.x/za-ya.x;Ka.y=Ka.y/za-ya.y;Ka.width/=za;Ka.height/=za;ya=a.container.scrollTop;var Qa=a.container.scrollLeft,Ia=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ia+=3;var Ha=a.container.offsetWidth-Ia;Ia=a.container.offsetHeight-Ia;aa=aa?Math.max(.3,Math.min(P||1,Ha/Ka.width)):za;P=(Ha-aa*Ka.width)/2/aa;var ra=0==this.lightboxVerticalDivider?0:(Ia-aa*Ka.height)/this.lightboxVerticalDivider/aa;na&&(P=Math.max(P,-0),ra=Math.max(ra,0));if(na||Ja.width<Ha||Ja.height<Ia)a.view.scaleAndTranslate(aa,Math.floor(P-Ka.x),Math.floor(ra-Ka.y)),a.container.scrollTop=ya*aa/za,a.container.scrollLeft=Qa*aa/za;else if(0!=ba||0!=ma)Ja=a.view.translate,a.view.setTranslate(Math.floor(Ja.x+ba/za),Math.floor(Ja.y+ma/za))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+P.width,this.scale*aa.height*P.height)};a.getPreferredPageSize=function(aa,P,ba){aa=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,aa.width*P.width,aa.height*P.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(aa,P,ba,ma){if(null!=a.container&&!a.isViewer()){ba=null!=ba?ba:0;ma=null!=ma?ma:0;var La=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),na=mxUtils.hasScrollbars(a.container),za=a.view.translate,+Aa=a.view.scale,Ma=mxRectangle.fromRectangle(La);Ma.x=Ma.x/Aa-za.x;Ma.y=Ma.y/Aa-za.y;Ma.width/=Aa;Ma.height/=Aa;za=a.container.scrollTop;var Qa=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Ia=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;aa=aa?Math.max(.3,Math.min(P||1,Ia/Ma.width)):Aa;P=(Ia-aa*Ma.width)/2/aa;var ra=0==this.lightboxVerticalDivider?0:(Ja-aa*Ma.height)/this.lightboxVerticalDivider/aa;na&&(P=Math.max(P,+0),ra=Math.max(ra,0));if(na||La.width<Ia||La.height<Ja)a.view.scaleAndTranslate(aa,Math.floor(P-Ma.x),Math.floor(ra-Ma.y)),a.container.scrollTop=za*aa/Aa,a.container.scrollLeft=Qa*aa/Aa;else if(0!=ba||0!=ma)La=a.view.translate,a.view.setTranslate(Math.floor(La.x+ba/Aa),Math.floor(La.y+ma/Aa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(aa){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(aa){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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=a.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 d=mxUtils.bind(this,function(){var aa=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=aa?parseInt(aa["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0;d=mxUtils.bind(this,function(aa,P,ba){h++;@@ -2189,17 +2189,17 @@ a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.biG():J(100);mxEvent.consume(aa)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||J(30)}));var X=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(aa,P){},mouseUp:function(aa,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<X&&Math.abs(this.scrollTop-a.container.scrollTop)<X&&Math.abs(this.startX-P.getGraphX())<X&&Math.abs(this.startY-P.getGraphY())<X&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var T=a.view.validate,N=new mxPoint,ca=!1,H=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=f.currentPage&&H!=f.currentPage){H=f.currentPage;ca=!0;var aa=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==aa&&(aa=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));aa=a.getPageLayout(aa,N,1);var P=a.getDefaultTranslate(aa);this.x0=aa.x;this.y0=aa.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();aa=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=aa||this.translate.y!=-P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=ma||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);-this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*this.view.scale),this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ea=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||-ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ea.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ea.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";-ea.style.transform=""},0)):(la.style.transform="",ea.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=V&&(Ja=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(Ja+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,-null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft++P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,La=this.view.translate.y;if(ba.x!=ma||ba.y!=La){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);+this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*this.view.scale),this.container.scrollTop+=Math.round((ba.y-La)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var fa=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||+ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",fa.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",fa.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";+fa.style.transform=""},0)):(la.style.transform="",fa.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,La=0,na=0;null!=V&&(La=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(La+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,+null,La*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==La&&0==na||(a.container.scrollLeft-=La*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));aa?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,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(a.isFastZoomEnabled()){null==ia&&""!=la.getAttribute("filter")&&(ia=la.getAttribute("filter"),la.removeAttribute("filter"));Y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);aa=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=P||null==V?a.container.scrollLeft+a.container.clientWidth/-2:V.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+aa+")";ea.style.transformOrigin=ma+"px "+Ja+"px";ea.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/-2+a.container.scrollLeft-ma.offsetLeft+"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",-"factor",aa))}ta(a.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(a.container,function(aa){null!=O&&window.clearTimeout(O)},null,function(aa){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(aa){null==O||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(aa,P,ba,ma,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(aa))ba=-a.view.getTranslate(),ma=40/a.view.scale,mxEvent.isShiftDown(aa)?a.view.setTranslate(ba.x+(P?-ma:ma),ba.y):a.view.setTranslate(ba.x,ba.y+(P?ma:-ma));else if(ba||a.isZoomWheelEvent(aa))for(var na=mxEvent.getSource(aa);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),V=null!=ma&&null!=Ja?new mxPoint(ma,Ja):new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ha=ba,ba=a.zoomFactor,ma=null,aa.ctrlKey&&null!=aa.deltaY&&40>Math.abs(aa.deltaY)&&Math.round(aa.deltaY)!=aa.deltaY?ba=+2:V.x+a.container.scrollLeft-a.container.offsetLeft;var La=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+La+"px";la.style.transform="scale("+aa+")";fa.style.transformOrigin=ma+"px "+La+"px";fa.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/+2+a.container.scrollLeft-ma.offsetLeft+"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,La);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",+"factor",aa))}ta(a.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(a.container,function(aa){null!=O&&window.clearTimeout(O)},null,function(aa){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(aa){null==O||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(aa,P,ba,ma,La){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(aa))ba=+a.view.getTranslate(),ma=40/a.view.scale,mxEvent.isShiftDown(aa)?a.view.setTranslate(ba.x+(P?-ma:ma),ba.y):a.view.setTranslate(ba.x,ba.y+(P?ma:-ma));else if(ba||a.isZoomWheelEvent(aa))for(var na=mxEvent.getSource(aa);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),V=null!=ma&&null!=La?new mxPoint(ma,La):new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ha=ba,ba=a.zoomFactor,ma=null,aa.ctrlKey&&null!=aa.deltaY&&40>Math.abs(aa.deltaY)&&Math.round(aa.deltaY)!=aa.deltaY?ba=1+Math.abs(aa.deltaY)/20*(ba-1):null!=aa.movementY&&"pointermove"==aa.type&&(ba=1+Math.max(1,Math.abs(aa.movementY))/20*(ba-1),ma=-1),a.lazyZoom(P,null,ma,ba),mxEvent.consume(aa),!1;na=na.parentNode}}),a.container);a.panningHandler.zoomGraph=function(aa){a.cumulativeZoomFactor=aa.scale;a.lazyZoom(0<aa.scale,!0);mxEvent.consume(aa)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;if(null!=this.format){var b=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+b+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=a?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,@@ -2208,11 +2208,11 @@ EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();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(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(a,b){this.showDialog((new PrintDialog(this,a,b)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};-EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;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 a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};-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(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};-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(a,b){this.replaceDiagramData(xUtils.getXml(b))};EditorUi.prototype.replaceDiagramData=function(a){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(a).documentElement)}finally{this.editor.graph.model.endUpdate()}};-EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};-EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};+EditorUi.prototype.isHideCurrentMenuEvent=function(a){a=mxEvent.getSource(a);if(null!=this.currentMenu){if(a==this.currentMenu.div)return!1;for(var b=this.currentMenu.activeRow;null!=b;){if(a==b.div)return!1;b=b.activeRow}return!0}return!1};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;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 a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};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(a){}};+EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};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(a,b){this.replaceDiagramData(xUtils.getXml(b))};EditorUi.prototype.replaceDiagramData=function(a){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(a).documentElement)}finally{this.editor.graph.model.endUpdate()}};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};+EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.fitDiagramToWindow=function(){var a=this.editor.graph,b=a.isSelectionEmpty()?mxRectangle.fromRectangle(a.getGraphBounds()):a.getBoundingBox(a.getSelectionCells()),f=a.view.translate,e=a.view.scale;b.x=b.x/e-f.x;b.y=b.y/e-f.y;b.width/=e;b.height/=e;null!=a.backgroundImage&&b.add(new mxRectangle(0,0,a.backgroundImage.width,a.backgroundImage.height));0==b.width||0==b.height?(a.zoomTo(1),this.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(b.x-=f.x,b.y-=f.y,b.width+=f.width+f.x,b.height+=f.height+f.y),a.fitWindow(b))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph,b=a.container;if(!this.editor.extendCanvas)b.scrollTop=0,b.scrollLeft=0,mxUtils.hasScrollbars(b)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b))if(a.pageVisible){var f=a.getPagePadding();b.scrollTop=Math.floor(f.y);b.scrollLeft=Math.floor(Math.min(f.x,(b.scrollWidth-b.clientWidth)/2));f=a.getGraphBounds();0<f.width&&0<f.height&&(f.x>b.scrollLeft+.9*b.clientWidth&&(b.scrollLeft=Math.min(f.x+@@ -2340,16 +2340,16 @@ d)&&(m.push(C),k==h.length-1&&m.length==g))){e(m.slice(f*b,g),g,!0,h);return}}}eSidebar.prototype.addSearchPalette=function(a){function b(H,S){E=S;H=H.firstChild.nextSibling.nextSibling;S=document.createElement("span");S.style.color="gray";S.innerHTML="Enter";H.appendChild(S)}function f(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));G.style.display="none";M=p.value="";N()}var e=this.editorUi,g=e.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");h.className="geSidebar geSearchSidebar";a||(h.style.display="none");var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var p=document.createElement("input");p.setAttribute("id","geOmniSearch");p.setAttribute("placeholder",mxResources.get("typeSlashToSearch"));p.setAttribute("type","text");m.appendChild(p);var k=document.createElement("img");k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));k.className="geAdaptiveAsset";m.appendChild(k);h.appendChild(m);var u=!1;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(H){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(H)!=p||document.activeElement==p||(p.focus(),mxClient.IS_GC||mxClient.IS_FF?p.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(H){mxEvent.getSource(H)==p&&u&&mxEvent.consume(H)}),mxUtils.bind(this,function(H){u&&(mxEvent.consume(H),u=!1)}));var w=[],y=mxUtils.bind(this,function(H,S){e.hideCurrentMenu();-mxUtils.remove(H,w);w.unshift(H);5<w.length&&w.pop();H.funct.apply(this,S);p.value=null}),C="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(H){var S=null,ea;for(ea in e.actions.actions){var la=0>C.indexOf(ea)&&"test"!=ea.substring(0,4)?e.actions.get(ea):null;if(null!=la&&la.isEnabled()&&la.visible){if(ea.toLowerCase()==H)return la;for(var O=H.toLowerCase().split(" "),V=0,Y=0;Y<O.length;Y++)0==O[Y].length?V++:(0<=ea.toLowerCase().indexOf(O[Y])||-0<=la.getTitle().toLowerCase().indexOf(O[Y]))&&V++;V==O.length&&(0>w.indexOf(S)||null!=S&&!S.isEnabled())&&(S=la)}}return S}),E=null;e.addMenuHandler(p,mxUtils.bind(this,function(H,S){function ea(ia){if(null!=ia&&ia.visible){var ta=H.addItem(ia.getTitle(),null,function(){y(ia,arguments)},S,null,ia.isEnabled());ia.toggleAction&&ia.isSelected()&&H.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ia.isEnabled()||0!=p.value.length&&V!=ia||b(ta,function(){y(ia,arguments);g.container.focus()})}}var la=+mxUtils.remove(H,w);w.unshift(H);5<w.length&&w.pop();H.funct.apply(this,S);p.value=null}),C="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(H){var S=null,fa;for(fa in e.actions.actions){var la=0>C.indexOf(fa)&&"test"!=fa.substring(0,4)?e.actions.get(fa):null;if(null!=la&&la.isEnabled()&&la.visible){if(fa.toLowerCase()==H)return la;for(var O=H.toLowerCase().split(" "),V=0,Y=0;Y<O.length;Y++)0==O[Y].length?V++:(0<=fa.toLowerCase().indexOf(O[Y])||+0<=la.getTitle().toLowerCase().indexOf(O[Y]))&&V++;V==O.length&&(0>w.indexOf(S)||null!=S&&!S.isEnabled())&&(S=la)}}return S}),E=null;e.addMenuHandler(p,mxUtils.bind(this,function(H,S){function fa(ia){if(null!=ia&&ia.visible){var ta=H.addItem(ia.getTitle(),null,function(){y(ia,arguments)},S,null,ia.isEnabled());ia.toggleAction&&ia.isSelected()&&H.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ia.isEnabled()||0!=p.value.length&&V!=ia||b(ta,function(){y(ia,arguments);g.container.focus()})}}var la=p.value.toLowerCase();E=null;var O=H.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){ca()}),S);b(O,function(){ca()});H.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){e.hideCurrentMenu();e.showSearchWindow(!0,p.value);p.value=""}),S);Editor.enableChatGpt&&!e.isOffline()&&e.isOwnGDriveDomain()&&e.isExternalDataComms()&&"draw.io"==e.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&H.addItem(mxResources.get("generate"),-null,mxUtils.bind(this,function(){e.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),S);!e.isOffline()&&e.isOwnGDriveDomain()&&e.isExternalDataComms()&&H.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){e.searchHelp(p.value);p.value=""}),S);H.addSeparator();var V=0<p.value.length?D(la):null;ea(V);for(O=0;O<w.length;O++)w[O]!=V&&ea(w[O]);if(0<la.length&&null!=e.pages)for(H.addSeparator(),O=0;O<e.pages.length&&!function(ia){if(null!=ia.getName()&&0<=ia.getName().toLowerCase().indexOf(la)){var ta=+null,mxUtils.bind(this,function(){e.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),S);!e.isOffline()&&e.isOwnGDriveDomain()&&e.isExternalDataComms()&&H.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){e.searchHelp(p.value);p.value=""}),S);H.addSeparator();var V=0<p.value.length?D(la):null;fa(V);for(O=0;O<w.length;O++)w[O]!=V&&fa(w[O]);if(0<la.length&&null!=e.pages)for(H.addSeparator(),O=0;O<e.pages.length&&!function(ia){if(null!=ia.getName()&&0<=ia.getName().toLowerCase().indexOf(la)){var ta=function(){e.selectPage(ia);g.container.focus();p.value=""},aa=H.addItem(ia.getName()+" ("+mxResources.get("page")+")",null,ta,S);null==E&&b(aa,ta);return!0}return!1}(e.pages[O]);O++);if(0<la.length&&null!=e.sidebar&&null!=e.sidebar.entries)for(H.addSeparator(),O=0;O<e.sidebar.entries.length;O++)for(var Y=e.sidebar.entries[O].entries,ha=0;ha<Y.length;ha++)(function(ia){var ta=e.sidebar.getConfigurationById(ia.id),aa=ia.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(aa,la)&&(aa=function(){var P=e.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ia=H.addItem(ia.title+" ("+mxResources.get("openLibrary")+")",null,aa,S),null==E&&b(ia,aa));return!0})(Y[ha])}),null,!0);var G=document.createElement("div");G.style.display="none";G.style.paddingTop="8px";G.style.alignItems="center";G.style.justifyContent="center";var J=mxUtils.button(mxResources.get("moreResults"),function(){ca()});J.setAttribute("title",mxResources.get("moreResults"));J.className="geBtn gePrimaryBtn";J.style.borderRadius="16px";J.style.padding="8px 12px";G.appendChild(J);h.appendChild(G);var M="",Q=!1,K=!1,W=0,X={},T=12,N=mxUtils.bind(this,function(){Q=!1;this.currentSearch=null;for(var H=h.firstChild;null!=H;){var S=H.nextSibling;H!=m&&H!=G&&H.parentNode.removeChild(H);H=S}});mxEvent.addListener(k,"click",function(){k.getAttribute("src")!=Editor.magnifyImage&&f();p.focus()});var ca=mxUtils.bind(this,function(){e.hideCurrentMenu();T=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=p.value){if(null!=G.parentNode&&(M!=p.value&&(N(),M=p.value,X={},K=!1,W=0),!Q&&!K)){J.setAttribute("disabled","true");G.style.display="flex";J.style.cursor="wait";J.innerHTML="";mxUtils.write(J,mxResources.get("loading")+"...");Q=!0;var H={};this.currentSearch=H;try{this.searchEntries(M,T,W,mxUtils.bind(this,-function(S,ea,la,O){if(this.currentSearch==H){S=null!=S?S:[];Q=!1;W++;this.insertSearchHint(h,M,T,W,S,ea,la,O);0==S.length&&1==W&&(M="");null!=G.parentNode&&G.parentNode.removeChild(G);for(ea=0;ea<S.length;ea++)mxUtils.bind(this,function(V){try{var Y=V();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(V,!1)&&(Y.style.opacity=this.closedLibraryOpacity);null==X[Y.innerHTML]?(X[Y.innerHTML]=null!=V.parentLibraries?V.parentLibraries.slice():[],h.appendChild(Y)):null!=-V.parentLibraries&&(X[Y.innerHTML]=X[Y.innerHTML].concat(V.parentLibraries));mxEvent.addGestureListeners(Y,null,null,mxUtils.bind(this,function(ha){var ia=X[Y.innerHTML];mxEvent.isPopupTrigger(ha)&&this.showPopupMenuForEntry(Y,ia,ha)}));mxEvent.disableContextMenu(Y)}catch(ha){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ha.stack)):console.error(ha))}})(S[ea]);la?(J.removeAttribute("disabled"),J.innerHTML="",mxUtils.write(J,mxResources.get("moreResults"))):+function(S,fa,la,O){if(this.currentSearch==H){S=null!=S?S:[];Q=!1;W++;this.insertSearchHint(h,M,T,W,S,fa,la,O);0==S.length&&1==W&&(M="");null!=G.parentNode&&G.parentNode.removeChild(G);for(fa=0;fa<S.length;fa++)mxUtils.bind(this,function(V){try{var Y=V();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(V,!1)&&(Y.style.opacity=this.closedLibraryOpacity);null==X[Y.innerHTML]?(X[Y.innerHTML]=null!=V.parentLibraries?V.parentLibraries.slice():[],h.appendChild(Y)):null!=+V.parentLibraries&&(X[Y.innerHTML]=X[Y.innerHTML].concat(V.parentLibraries));mxEvent.addGestureListeners(Y,null,null,mxUtils.bind(this,function(ha){var ia=X[Y.innerHTML];mxEvent.isPopupTrigger(ha)&&this.showPopupMenuForEntry(Y,ia,ha)}));mxEvent.disableContextMenu(Y)}catch(ha){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ha.stack)):console.error(ha))}})(S[fa]);la?(J.removeAttribute("disabled"),J.innerHTML="",mxUtils.write(J,mxResources.get("moreResults"))):(J.innerHTML=mxResources.get("reset"),G.style.display="none",K=!0);J.style.cursor="";h.appendChild(G)}}),mxUtils.bind(this,function(){J.style.cursor=""}),this.searchClosedLibraries)}catch(S){e.handleError(S)}}}else N(),M=p.value="",X={},G.style.display="none",K=!1,p.focus()});this.searchShapes=function(H){p.value=H;ca()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(H){13==H.keyCode&&null!=E?(E(H,H),mxEvent.consume(H)):9==H.keyCode?(g.container.focus(),mxEvent.consume(H)):27==H.keyCode&&(f(),mxEvent.consume(H))}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==p.value?(k.setAttribute("src",Editor.magnifyImage),k.setAttribute("title",mxResources.get("search"))):(k.setAttribute("src",Editor.crossImage),k.setAttribute("title",mxResources.get("reset")));""==p.value?(K=!0,G.style.display="none"):p.value!=M?(G.style.display="none",K=!1):Q||(G.style.display=K?"none":"flex")}),0)});mxEvent.addListener(p,"keyup",a);mxEvent.addListener(p,"paste",a);mxEvent.addListener(p,"cut",a);mxEvent.addListener(p,"mousedown",function(H){H.stopPropagation&&H.stopPropagation();H.cancelBubble=!0});mxEvent.addListener(p,"selectstart",function(H){H.stopPropagation&&H.stopPropagation();H.cancelBubble=!0});a=document.createElement("div");a.appendChild(h);this.appendChild(a);this.palettes.search=[d,a]};@@ -2481,30 +2481,30 @@ e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=p.y+p.height,e.e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+p.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-p.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(p=g.getCellGeometry(b.getTerminal(!1)),null!=p&&(f==mxConstants.DIRECTION_NORTH?(e.x-=p.getCenterX(),e.y-=p.getCenterY()+p.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=p.getCenterX()-p.width/2,e.y-=p.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=p.getCenterX(),e.y-=p.getCenterY()-p.height/2):f==mxConstants.DIRECTION_WEST&&(e.x-=p.getCenterX()+p.width/2,e.y-=p.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};-Sidebar.prototype.createDragSource=function(a,b,f,e,g,d){function h(na,ya){var za=mxUtils.createImage(na.src);za.style.width=na.width+"px";za.style.height=na.height+"px";null!=ya&&za.setAttribute("title",ya);mxUtils.setOpacity(za,na==this.refreshTarget?30:20);za.style.position="absolute";za.style.cursor="crosshair";return za}function m(na,ya,za,Ka){null!=Ka.parentNode&&(mxUtils.contains(za,na,ya)?(mxUtils.setOpacity(Ka,100),V=Ka):mxUtils.setOpacity(Ka,Ka==H?30:20));return za}var p=this.editorUi,k=-p.editor.graph,u=null,w=null,y=this;d=0;for(var C=this.livePreview,D=0;D<e.length&&C;D++)d+=k.model.getDescendants(e[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<e.length&&(null==w&&k.model.isVertex(e[D])?w=D:null==u&&k.model.isEdge(e[D])&&null==k.model.getTerminal(e[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(e,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(na,ya,za,Ka,Qa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=-K&&V==H){var Ia=na.isCellSelected(K.cell)?na.getSelectionCells():[K.cell];na.updateShapes(na.model.isEdge(K.cell)?e[0]:e[w],Ia,!0);na.setSelectionCells(Ia)}else null!=e&&null!=V&&null!=M&&V!=H?(Ia=na.model.isEdge(M.cell)||null==u?w:u,na.setSelectionCells(this.dropAndConnect(M.cell,e,O,Ia,ya,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(na.view.getState(na.getSelectionCell()))}),f,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),-G.createPreviewElement=mxUtils.bind(this,function(na){var ya=document.createElement("a");ya.className="geItem";ya.style.overflow="visible";na=na.view.scale;ya.style.width=na*Math.max(1,g.width)+"px";ya.style.height=na*Math.max(1,g.height)+"px";mxUtils.setOpacity(ya,50);var za=k.cloneCells(e);this.graph.pasteCellStyles(k.includeDescendants(za),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(za,na*Math.max(1,g.width),na*Math.max(1,g.height),ya,null,null,null,null,null,k.shapeBackgroundColor,-0,na);return ya}));var J=G.mouseDown;G.mouseDown=function(na){mxEvent.isPopupTrigger(na)||mxEvent.isMultiTouchEvent(na)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),J.apply(this,arguments))};var M=null,Q=null,K=null,W=!1,X=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),N=h(this.triangleDown,mxResources.get("connect")),ca=h(this.triangleLeft,mxResources.get("connect")),H=h(this.refreshTarget,mxResources.get("replace")),S=null,ea=h(this.roundDrop),-la=h(this.roundDrop),O=mxConstants.DIRECTION_NORTH,V=null,Y=G.createPreviewElement;G.createPreviewElement=function(na){var ya=Y.apply(this,arguments);this.previewElementWidth=ya.style.width;this.previewElementHeight=ya.style.height;ya.style.pointerEvents="none";return ya};var ha=G.dragEnter;G.dragEnter=function(na,ya){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ha.apply(this,arguments)};var ia=G.dragExit;G.dragExit=function(na,ya){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");ia.apply(this,-arguments)};G.dragOver=function(na,ya){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var za=na.view;if(null!=K&&V==H)this.previewElement.style.display="none";else if(null!=M&&null!=V){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=na.model.isEdge(M.cell)||null!=w?w:u,Qa=y.getDropAndConnectGeometry(M.cell,e[Ka],O,e),Ia=na.model.isEdge(M.cell)?-null:na.getCellGeometry(M.cell),Ha=na.getCellGeometry(e[Ka]),ra=na.model.getParent(M.cell),Da=za.translate.x*za.scale,Va=za.translate.y*za.scale;null!=Ia&&!Ia.relative&&na.model.isVertex(ra)&&ra!=za.currentRoot&&(Va=za.getState(ra),Da=Va.x,Va=Va.y);Ia=Ha.x;Ha=Ha.y;na.model.isEdge(e[Ka])&&(Ha=Ia=0);this.previewElement.style.left=(Qa.x-Ia)*za.scale+Da+"px";this.previewElement.style.top=(Qa.y-Ha)*za.scale+Va+"px";1==e.length&&(this.previewElement.style.width=Qa.width*za.scale+"px",this.previewElement.style.height=-Qa.height*za.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&na.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*za.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)--g.height*za.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),aa=0,P=null,ba=this.editorUi.editor.graph.getCellStyle(e[0]);G.getDropTarget=mxUtils.bind(this,function(na,ya,za,Ka){var Qa=mxEvent.isAltDown(Ka)||-null==e?null:na.getCellAt(ya,za,null,null,null,function(Va,Wa,$a){return na.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Qa&&!this.graph.isCellConnectable(Qa)&&!this.graph.model.isEdge(Qa)){var Ia=this.graph.getModel().getParent(Qa);this.graph.getModel().isVertex(Ia)&&this.graph.isCellConnectable(Ia)&&(Qa=Ia)}na.isCellLocked(Qa)&&(Qa=null);var Ha=na.view.getState(Qa);Ia=V=null;P!=Ha?(ta=(new Date).getTime(),aa=0,P=Ha,null!=this.updateThread&&window.clearTimeout(this.updateThread),-null!=Ha&&(this.updateThread=window.setTimeout(function(){null==V&&(P=Ha,G.getDropTarget(na,ya,za,Ka))},this.dropTargetDelay+10))):aa=(new Date).getTime()-ta;if(E&&2500>aa&&null!=Ha&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,-mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<aa||na.model.isEdge(Ha.cell))&&aa>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ha)&&(na.model.isVertex(Ha.cell)&&null!=w||na.model.isEdge(Ha.cell)&&na.model.isEdge(e[0]))){if(na.isCellEditable(Ha.cell)){K=Ha;var ra=na.model.isEdge(Ha.cell)?na.view.getPoint(Ha):new mxPoint(Ha.getCenterX(),Ha.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/-2,this.refreshTarget.width,this.refreshTarget.height);H.style.left=Math.floor(ra.x)+"px";H.style.top=Math.floor(ra.y)+"px";null==S&&(na.container.appendChild(H),S=H.parentNode);m(ya,za,ra,H)}}else null==K||!mxUtils.contains(K,ya,za)||1500<aa&&!mxEvent.isShiftDown(Ka)?(K=null,null!=S&&(H.parentNode.removeChild(H),S=null)):null!=K&&null!=S&&(ra=na.model.isEdge(K.cell)?na.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/-2,this.refreshTarget.width,this.refreshTarget.height),m(ya,za,ra,H));if(W&&null!=M&&!mxEvent.isAltDown(Ka)&&null==V){Ia=mxRectangle.fromRectangle(M);if(na.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=ea.parentNode&&(ra=Da[0],Ia.add(m(ya,za,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ea)));null!=la.parentNode&&(Da=Da[Da.length-1],Ia.add(m(ya,za,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,+Sidebar.prototype.createDragSource=function(a,b,f,e,g,d){function h(na,za){var Aa=mxUtils.createImage(na.src);Aa.style.width=na.width+"px";Aa.style.height=na.height+"px";null!=za&&Aa.setAttribute("title",za);mxUtils.setOpacity(Aa,na==this.refreshTarget?30:20);Aa.style.position="absolute";Aa.style.cursor="crosshair";return Aa}function m(na,za,Aa,Ma){null!=Ma.parentNode&&(mxUtils.contains(Aa,na,za)?(mxUtils.setOpacity(Ma,100),V=Ma):mxUtils.setOpacity(Ma,Ma==H?30:20));return Aa}var p=this.editorUi,k=+p.editor.graph,u=null,w=null,y=this;d=0;for(var C=this.livePreview,D=0;D<e.length&&C;D++)d+=k.model.getDescendants(e[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<e.length&&(null==w&&k.model.isVertex(e[D])?w=D:null==u&&k.model.isEdge(e[D])&&null==k.model.getTerminal(e[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(e,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(na,za,Aa,Ma,Qa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=+K&&V==H){var Ja=na.isCellSelected(K.cell)?na.getSelectionCells():[K.cell];na.updateShapes(na.model.isEdge(K.cell)?e[0]:e[w],Ja,!0);na.setSelectionCells(Ja)}else null!=e&&null!=V&&null!=M&&V!=H?(Ja=na.model.isEdge(M.cell)||null==u?w:u,na.setSelectionCells(this.dropAndConnect(M.cell,e,O,Ja,za,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(na.view.getState(na.getSelectionCell()))}),f,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),+G.createPreviewElement=mxUtils.bind(this,function(na){var za=document.createElement("a");za.className="geItem";za.style.overflow="visible";na=na.view.scale;za.style.width=na*Math.max(1,g.width)+"px";za.style.height=na*Math.max(1,g.height)+"px";mxUtils.setOpacity(za,50);var Aa=k.cloneCells(e);this.graph.pasteCellStyles(k.includeDescendants(Aa),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(Aa,na*Math.max(1,g.width),na*Math.max(1,g.height),za,null,null,null,null,null,k.shapeBackgroundColor,+0,na);return za}));var J=G.mouseDown;G.mouseDown=function(na){mxEvent.isPopupTrigger(na)||mxEvent.isMultiTouchEvent(na)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),J.apply(this,arguments))};var M=null,Q=null,K=null,W=!1,X=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),N=h(this.triangleDown,mxResources.get("connect")),ca=h(this.triangleLeft,mxResources.get("connect")),H=h(this.refreshTarget,mxResources.get("replace")),S=null,fa=h(this.roundDrop),+la=h(this.roundDrop),O=mxConstants.DIRECTION_NORTH,V=null,Y=G.createPreviewElement;G.createPreviewElement=function(na){var za=Y.apply(this,arguments);this.previewElementWidth=za.style.width;this.previewElementHeight=za.style.height;za.style.pointerEvents="none";return za};var ha=G.dragEnter;G.dragEnter=function(na,za){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ha.apply(this,arguments)};var ia=G.dragExit;G.dragExit=function(na,za){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");ia.apply(this,+arguments)};G.dragOver=function(na,za){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Aa=na.view;if(null!=K&&V==H)this.previewElement.style.display="none";else if(null!=M&&null!=V){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ma=na.model.isEdge(M.cell)||null!=w?w:u,Qa=y.getDropAndConnectGeometry(M.cell,e[Ma],O,e),Ja=na.model.isEdge(M.cell)?+null:na.getCellGeometry(M.cell),Ia=na.getCellGeometry(e[Ma]),ra=na.model.getParent(M.cell),Da=Aa.translate.x*Aa.scale,Va=Aa.translate.y*Aa.scale;null!=Ja&&!Ja.relative&&na.model.isVertex(ra)&&ra!=Aa.currentRoot&&(Va=Aa.getState(ra),Da=Va.x,Va=Va.y);Ja=Ia.x;Ia=Ia.y;na.model.isEdge(e[Ma])&&(Ia=Ja=0);this.previewElement.style.left=(Qa.x-Ja)*Aa.scale+Da+"px";this.previewElement.style.top=(Qa.y-Ia)*Aa.scale+Va+"px";1==e.length&&(this.previewElement.style.width=Qa.width*Aa.scale+"px",this.previewElement.style.height=+Qa.height*Aa.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&na.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*Aa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-+g.height*Aa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),aa=0,P=null,ba=this.editorUi.editor.graph.getCellStyle(e[0]);G.getDropTarget=mxUtils.bind(this,function(na,za,Aa,Ma){var Qa=mxEvent.isAltDown(Ma)||+null==e?null:na.getCellAt(za,Aa,null,null,null,function(Va,Wa,$a){return na.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Qa&&!this.graph.isCellConnectable(Qa)&&!this.graph.model.isEdge(Qa)){var Ja=this.graph.getModel().getParent(Qa);this.graph.getModel().isVertex(Ja)&&this.graph.isCellConnectable(Ja)&&(Qa=Ja)}na.isCellLocked(Qa)&&(Qa=null);var Ia=na.view.getState(Qa);Ja=V=null;P!=Ia?(ta=(new Date).getTime(),aa=0,P=Ia,null!=this.updateThread&&window.clearTimeout(this.updateThread),+null!=Ia&&(this.updateThread=window.setTimeout(function(){null==V&&(P=Ia,G.getDropTarget(na,za,Aa,Ma))},this.dropTargetDelay+10))):aa=(new Date).getTime()-ta;if(E&&2500>aa&&null!=Ia&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ia.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ia.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ia.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ia.style,+mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<aa||na.model.isEdge(Ia.cell))&&aa>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ia)&&(na.model.isVertex(Ia.cell)&&null!=w||na.model.isEdge(Ia.cell)&&na.model.isEdge(e[0]))){if(na.isCellEditable(Ia.cell)){K=Ia;var ra=na.model.isEdge(Ia.cell)?na.view.getPoint(Ia):new mxPoint(Ia.getCenterX(),Ia.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/+2,this.refreshTarget.width,this.refreshTarget.height);H.style.left=Math.floor(ra.x)+"px";H.style.top=Math.floor(ra.y)+"px";null==S&&(na.container.appendChild(H),S=H.parentNode);m(za,Aa,ra,H)}}else null==K||!mxUtils.contains(K,za,Aa)||1500<aa&&!mxEvent.isShiftDown(Ma)?(K=null,null!=S&&(H.parentNode.removeChild(H),S=null)):null!=K&&null!=S&&(ra=na.model.isEdge(K.cell)?na.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/+2,this.refreshTarget.width,this.refreshTarget.height),m(za,Aa,ra,H));if(W&&null!=M&&!mxEvent.isAltDown(Ma)&&null==V){Ja=mxRectangle.fromRectangle(M);if(na.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=fa.parentNode&&(ra=Da[0],Ja.add(m(za,Aa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),fa)));null!=la.parentNode&&(Da=Da[Da.length-1],Ja.add(m(za,Aa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),la)))}else ra=mxRectangle.fromRectangle(M),null!=M.shape&&null!=M.shape.boundingBox&&(ra=mxRectangle.fromRectangle(M.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(M.cell),null!=Da&&(ra.x-=Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&-"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),Ia.add(m(ya,za,new mxRectangle(M.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),X)),Ia.add(m(ya,za,new mxRectangle(ra.x+ra.width,M.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),T)),Ia.add(m(ya,za,new mxRectangle(M.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,-this.triangleDown.height),N)),Ia.add(m(ya,za,new mxRectangle(ra.x-this.triangleLeft.width,M.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),ca));null!=Ia&&Ia.grow(10)}O=mxConstants.DIRECTION_NORTH;V==T?O=mxConstants.DIRECTION_EAST:V==N||V==la?O=mxConstants.DIRECTION_SOUTH:V==ca&&(O=mxConstants.DIRECTION_WEST);null!=K&&V==H&&(Ha=K);ra=(null==w||na.isCellConnectable(e[w]))&&(na.model.isEdge(Qa)&&null!=w||na.model.isVertex(Qa)&&na.isCellConnectable(Qa));if(null!=-M&&5E3<=aa||M!=Ha&&(null==Ia||!mxUtils.contains(Ia,ya,za)||500<aa&&null==V&&ra))if(W=!1,M=5E3>aa&&aa>this.dropTargetDelay||na.model.isEdge(Qa)?Ha:null,null!=M&&ra){Ia=[ea,la,X,T,N,ca];for(ra=0;ra<Ia.length;ra++)null!=Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);na.model.isEdge(Qa)?(Da=Ha.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],ea.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ea.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",la.style.left=Math.floor(Da.x--this.roundDrop.width/2)+"px",la.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==na.model.getTerminal(Qa,!0)&&na.container.appendChild(ea),null==na.model.getTerminal(Qa,!1)&&na.container.appendChild(la))):(ra=mxRectangle.fromRectangle(Ha),null!=Ha.shape&&null!=Ha.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ha.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ha.cell),null!=Da&&(ra.x-=Da.horizontalOffset/-2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),X.style.left=Math.floor(Ha.getCenterX()-this.triangleUp.width/2)+"px",X.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",T.style.left=Math.floor(ra.x+ra.width)+"px",T.style.top=Math.floor(Ha.getCenterY()--this.triangleRight.height/2)+"px",N.style.left=X.style.left,N.style.top=Math.floor(ra.y+ra.height)+"px",ca.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",ca.style.top=T.style.top,"eastwest"!=Ha.style.portConstraint&&(na.container.appendChild(X),na.container.appendChild(N)),na.container.appendChild(T),na.container.appendChild(ca));null!=Ha&&(Q=na.selectionCellsHandler.getHandler(Ha.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));W=!0}else for(Ia=[ea,la,X,T,N,ca],ra=0;ra<-Ia.length;ra++)null!=Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);W||null==Q||Q.setHandlesVisible(!0);Qa=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=K&&V==H?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Qa||null==V&&na.isSplitTarget(Qa,e,Ka)||(Qa=na.getDropTarget(e,Ka,Qa,!0));return Qa});var ma=G.startDrag;G.startDrag=function(na){y.activeDragSource=this;ma.apply(this,arguments)};var Ja=G.stopDrag;G.stopDrag=function(){Ja.apply(this,arguments);for(var na=-[ea,la,H,X,T,N,ca],ya=0;ya<na.length;ya++)null!=na[ya].parentNode&&na[ya].parentNode.removeChild(na[ya]);null!=M&&null!=Q&&Q.reset();V=S=K=M=Q=y.activeDragSource=null};return G};+"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),Ja.add(m(za,Aa,new mxRectangle(M.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),X)),Ja.add(m(za,Aa,new mxRectangle(ra.x+ra.width,M.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),T)),Ja.add(m(za,Aa,new mxRectangle(M.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,+this.triangleDown.height),N)),Ja.add(m(za,Aa,new mxRectangle(ra.x-this.triangleLeft.width,M.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),ca));null!=Ja&&Ja.grow(10)}O=mxConstants.DIRECTION_NORTH;V==T?O=mxConstants.DIRECTION_EAST:V==N||V==la?O=mxConstants.DIRECTION_SOUTH:V==ca&&(O=mxConstants.DIRECTION_WEST);null!=K&&V==H&&(Ia=K);ra=(null==w||na.isCellConnectable(e[w]))&&(na.model.isEdge(Qa)&&null!=w||na.model.isVertex(Qa)&&na.isCellConnectable(Qa));if(null!=+M&&5E3<=aa||M!=Ia&&(null==Ja||!mxUtils.contains(Ja,za,Aa)||500<aa&&null==V&&ra))if(W=!1,M=5E3>aa&&aa>this.dropTargetDelay||na.model.isEdge(Qa)?Ia:null,null!=M&&ra){Ja=[fa,la,X,T,N,ca];for(ra=0;ra<Ja.length;ra++)null!=Ja[ra].parentNode&&Ja[ra].parentNode.removeChild(Ja[ra]);na.model.isEdge(Qa)?(Da=Ia.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],fa.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",la.style.left=Math.floor(Da.x-+this.roundDrop.width/2)+"px",la.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==na.model.getTerminal(Qa,!0)&&na.container.appendChild(fa),null==na.model.getTerminal(Qa,!1)&&na.container.appendChild(la))):(ra=mxRectangle.fromRectangle(Ia),null!=Ia.shape&&null!=Ia.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ia.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ia.cell),null!=Da&&(ra.x-=Da.horizontalOffset/+2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),X.style.left=Math.floor(Ia.getCenterX()-this.triangleUp.width/2)+"px",X.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",T.style.left=Math.floor(ra.x+ra.width)+"px",T.style.top=Math.floor(Ia.getCenterY()-+this.triangleRight.height/2)+"px",N.style.left=X.style.left,N.style.top=Math.floor(ra.y+ra.height)+"px",ca.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",ca.style.top=T.style.top,"eastwest"!=Ia.style.portConstraint&&(na.container.appendChild(X),na.container.appendChild(N)),na.container.appendChild(T),na.container.appendChild(ca));null!=Ia&&(Q=na.selectionCellsHandler.getHandler(Ia.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));W=!0}else for(Ja=[fa,la,X,T,N,ca],ra=0;ra<+Ja.length;ra++)null!=Ja[ra].parentNode&&Ja[ra].parentNode.removeChild(Ja[ra]);W||null==Q||Q.setHandlesVisible(!0);Qa=mxEvent.isAltDown(Ma)&&!mxEvent.isShiftDown(Ma)||null!=K&&V==H?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Qa||null==V&&na.isSplitTarget(Qa,e,Ma)||(Qa=na.getDropTarget(e,Ma,Qa,!0));return Qa});var ma=G.startDrag;G.startDrag=function(na){y.activeDragSource=this;ma.apply(this,arguments)};var La=G.stopDrag;G.stopDrag=function(){La.apply(this,arguments);for(var na=+[fa,la,H,X,T,N,ca],za=0;za<na.length;za++)null!=na[za].parentNode&&na[za].parentNode.removeChild(na[za]);null!=M&&null!=Q&&Q.reset();V=S=K=M=Q=y.activeDragSource=null};return G};Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()){for(var g=b=null,d=0;d<a.length&&(null==g&&e.model.isVertex(a[d])?g=d:null==b&&e.model.isEdge(a[d])&&null==e.model.getTerminal(a[d],!0)&&(b=d),null==g||null==b);d++);d=null==b?g:b;e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,d,f,g,b));e.scrollCellToVisible(e.getSelectionCell())}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),e.updateShapes(a[0],f,!0),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))};Sidebar.prototype.addClickHandler=function(a,b,f,e){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,y=null;b.getGraphForEvent=function(C){return k?g.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));y=a.style.opacity;k=!1;""==y&&(y="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(C){(k=null!=u&&(Math.abs(u.x-@@ -2561,7 +2561,7 @@ this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.Pvar Y=V?O.sourceState.cell:O.getCell();if(null!=Y){var ha=this.getClickableLinkForCell(Y);null!=ha?this.isCustomLink(ha)?this.customLinkClicked(ha,Y):this.openLink(ha):V&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var N=this.tooltipHandler.show;this.tooltipHandler.show=function(){N.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),V=0;V<O.length;V++)null!=O[V].getAttribute("href")&&null==O[V].getAttribute("target")&&O[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var V=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(V?O.sourceState.cell:O.getCell())};var ca=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return ca.apply(this,arguments)};this.selectRegion=function(O,V){var Y=mxEvent.isAltDown(V)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,Y,null,!0);if(this.isToggleEvent(V))for(Y=0;Y<O.length;Y++)this.selectCellForEvent(O[Y],V);else this.selectCellsForEvent(O,V);return O};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,V,Y){return this.graph.isCellSelected(O)?!1:H.apply(this,arguments)};var S=this.updateMouseEvent;this.updateMouseEvent=function(O){O=-S.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(V,Y,ha){return O.state==V||this.isCellLocked(this.getLayerForCell(V.cell))&&null==this.getLinkForCell(V.cell)}))):O.state=null);return O};var ea=this.isCellSelectable;this.isCellSelectable=function(O){return ea.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};+S.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(V,Y,ha){return O.state==V||this.isCellLocked(this.getLayerForCell(V.cell))&&null==this.getLinkForCell(V.cell)}))):O.state=null);return O};var fa=this.isCellSelectable;this.isCellSelectable=function(O){return fa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,V){"mouseDown"==V.getProperty("eventName")&&(O=V.getProperty("event").getState(),la=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,V){if(!mxEvent.isMultiTouchEvent(V)){O=V.getProperty("event");var Y=V.getProperty("cell");null==Y?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),G.start(O.x,O.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(Y)&&this.removeSelectionCell(Y);la=null;V.consume()}}));this.connectionHandler.selectCells=function(O,V){this.graph.setSelectionCell(V||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,V){var Y=O.view.graph;return V&&(Y.isCellSelected(O.cell)||Y.isTableRow(O.cell)&&Y.selectionCellsHandler.isHandled(Y.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};@@ -2595,8 +2595,8 @@ y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=f&&null!=f.pageM.push(J[Q]);M=J=M;if(null!=y.startIndex||0<pageSize&&J.length>pageSize){var K=y.startIndex||0;M=J.slice(Math.max(0,K),Math.min(J.length,K+pageSize))}M=e.getOpposites(M,G).concat(M);var W=w.cloneCells(M);for(Q=0;Q<M.length;Q++)if(W[Q].sourceCellId=M[Q].id,w.model.isEdge(W[Q]))for(W[Q].geometry.x=0,W[Q].geometry.y=0,W[Q].geometry.points=null,W[Q].setStyle(W[Q].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),W[Q].setTerminal(E,null==W[Q].getTerminal(!0)),G=0;G<W[Q].getChildCount();G++){var X=W[Q].getChildAt(G);null!=X.geometry&&X.geometry.relative&&(X.setStyle(X.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),X.geometry.offset=new mxPoint(0,0),X.geometry.y=0,X.geometry.x=.5>X.geometry.x?-.8:.5<X.geometry.x?.8:0)}if(0<y.startIndex){var T=w.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((y.startIndex||0)/pageSize)+"/"+Math.ceil(J.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");T.referenceCell=E;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);W.splice(0,0,T)}if(J.length>(y.startIndex||0)+pageSize){var N=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(J.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");N.referenceCell=E;N.startIndex=(y.startIndex||0)+pageSize;W.splice(0,0,N)}for(var ca in w.getModel().cells){var H=w.getModel().getCell(ca);H!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,-H)&&w.getModel().isVertex(H)&&w.removeCells([H])}w.addCells(W);var S=w.getModel().getGeometry(w.rootCell);null!=S&&(S=S.clone(),S.x=C-S.width/2,S.y=D-S.height/3,w.getModel().setGeometry(w.rootCell,S));y=[];for(ca in w.getModel().cells)H=w.getModel().getCell(ca),H!=w.rootCell&&w.getModel().isVertex(H)&&w.getModel().getParent(H)==w.getDefaultParent()&&(y.push(H),S=w.getModel().getGeometry(H),null!=S&&(S.x=C-S.width/2,S.y=D-S.height/2));var ea=y.length,la=2*Math.PI/ea,O=Math.max(minSize,Math.min(w.container.offsetWidth/-2-40,w.container.offsetHeight/2-80));for(C=0;C<ea;C++)S=w.getModel().getGeometry(y[C]),null!=S&&(S=S.clone(),S.x+=O*Math.sin(C*la),S.y+=O*Math.cos(C*la),w.getModel().setGeometry(y[C],S))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=e.background==mxConstants.NONE||null==e.background?+H)&&w.getModel().isVertex(H)&&w.removeCells([H])}w.addCells(W);var S=w.getModel().getGeometry(w.rootCell);null!=S&&(S=S.clone(),S.x=C-S.width/2,S.y=D-S.height/3,w.getModel().setGeometry(w.rootCell,S));y=[];for(ca in w.getModel().cells)H=w.getModel().getCell(ca),H!=w.rootCell&&w.getModel().isVertex(H)&&w.getModel().getParent(H)==w.getDefaultParent()&&(y.push(H),S=w.getModel().getGeometry(H),null!=S&&(S.x=C-S.width/2,S.y=D-S.height/2));var fa=y.length,la=2*Math.PI/fa,O=Math.max(minSize,Math.min(w.container.offsetWidth/+2-40,w.container.offsetHeight/2-80));for(C=0;C<fa;C++)S=w.getModel().getGeometry(y[C]),null!=S&&(S=S.clone(),S.x+=O*Math.sin(C*la),S.y+=O*Math.cos(C*la),w.getModel().setGeometry(y[C],S))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=e.background==mxConstants.NONE||null==e.background?"light-dark(#ffffff,"+Editor.darkColor+")":e.background;var p=document.createElement("img");p.setAttribute("src",Editor.closeBlackImage);p.style.position="absolute";p.style.cursor="pointer";p.style.right="10px";p.style.top="10px";m.appendChild(p);var k=document.createElement("div");k.style.position="absolute";k.style.cursor="pointer";k.style.right="38px";k.style.top="14px";k.style.textAlign="right";k.style.verticalAlign="top";mxUtils.write(k,mxResources.get("close"));m.appendChild(k);document.body.appendChild(m);var u=function(w){27==w.keyCode&&p.click()};mxEvent.addListener(document,"keydown",u);(function(w){var y=new Graph(w);y.keepEdgesInBackground=!0;y.isCellResizable=function(){return!1};y.isCellRotatable=function(){return!1};y.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};y.getFoldingImage=function(){return null};var C=function(){mxEvent.removeListener(document,"keydown",u);w.parentNode.removeChild(w);e.scrollCellToVisible(g)};mxEvent.addListener(p,"click",C);mxEvent.addListener(k,"click",C);y.setEnabled(!1);var D=y.click;y.click=function(M){var Q=M.getCell(),K=null!=Q?null!=Q.referenceCell?Q.referenceCell:Q:null;null!=Q&&0<y.getEdges(K).length?h(y,Q):D.apply(this,arguments)};C=y.container.offsetWidth/2;var E=y.container.offsetHeight/3;y.model.beginUpdate();var G=y.importCells([g])[0];G.sourceCellId=g.id;G.geometry.x=C-G.geometry.width/2;G.geometry.y=E-G.geometry.height/2;y.model.endUpdate();var J=!1;y.getModel().addListener(mxEvent.CHANGE,function(M,Q){J||(M=Q.getProperty("edit").changes,@@ -2790,8 +2790,8 @@ y)for(var C=null,D=0;D<y.length;D++)if("hidden"!=y[D].getAttribute("visibility")arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var e=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=e.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,y){return g.apply(this,arguments)||null!=w.routedPoints&&null!=y.routedPoints&&!mxUtils.equalPoints(y.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,D=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(la,O,V){var Y=new mxPoint(O,V);Y.type=la;D.push(Y);Y=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==Y||Y.type!=la||Y.x!=O||Y.y!=V},G=.5*this.scale;C=!1;D=[];for(var J=0;J<y.length-1;J++){for(var M=y[J+1],Q=y[J],K=[],W=y[J+2];J<y.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,W.x,W.y,M.x,M.y)<1*this.scale*this.scale;)M=W,J++,W=y[J+2];C=E(0,Q.x,Q.y)||C;for(var X=0;X<this.validEdges.length;X++){var T=this.validEdges[X],N=T.absolutePoints;if(null!=N&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var ca=null;for(T=0;T<N.length-1;T++){var H=N[T+-1],S=N[T];for(W=N[T+2];T<N.length-2&&mxUtils.ptSegDistSq(S.x,S.y,W.x,W.y,H.x,H.y)<1*this.scale*this.scale;)H=W,T++,W=N[T+2];var ea=mxUtils.intersection(Q.x,Q.y,M.x,M.y,S.x,S.y,H.x,H.y);if(null!=ea&&(Math.abs(ea.x-Q.x)>G||Math.abs(ea.y-Q.y)>G)&&(Math.abs(ea.x-M.x)>G||Math.abs(ea.y-M.y)>G)&&(null==ca||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,ca.x,ca.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,S.x,S.y)>G)&&(null==W||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,W.x,W.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,H.x,H.y)>G)){W=-ea.x-Q.x;ca=ea.y-Q.y;ea={distSq:W*W+ca*ca,x:ea.x,y:ea.y};for(W=0;W<K.length;W++)if(K[W].distSq>ea.distSq){K.splice(W,0,ea);ea=null;break}null==ea||0!=K.length&&K[K.length-1].x===ea.x&&K[K.length-1].y===ea.y||K.push(ea)}ca=S}}}for(T=0;T<K.length;T++)C=E(1,K[T].x,K[T].y)||C}ea=y[y.length-1];C=E(0,ea.x,ea.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,C){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||+1],S=N[T];for(W=N[T+2];T<N.length-2&&mxUtils.ptSegDistSq(S.x,S.y,W.x,W.y,H.x,H.y)<1*this.scale*this.scale;)H=W,T++,W=N[T+2];var fa=mxUtils.intersection(Q.x,Q.y,M.x,M.y,S.x,S.y,H.x,H.y);if(null!=fa&&(Math.abs(fa.x-Q.x)>G||Math.abs(fa.y-Q.y)>G)&&(Math.abs(fa.x-M.x)>G||Math.abs(fa.y-M.y)>G)&&(null==ca||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,ca.x,ca.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,S.x,S.y)>G)&&(null==W||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,W.x,W.y)>G||mxUtils.ptLineDist(Q.x,Q.y,M.x,M.y,H.x,H.y)>G)){W=+fa.x-Q.x;ca=fa.y-Q.y;fa={distSq:W*W+ca*ca,x:fa.x,y:fa.y};for(W=0;W<K.length;W++)if(K[W].distSq>fa.distSq){K.splice(W,0,fa);fa=null;break}null==fa||0!=K.length&&K[K.length-1].x===fa.x&&K[K.length-1].y===fa.y||K.push(fa)}ca=S}}}for(T=0;T<K.length;T++)C=E(1,K[T].x,K[T].y)||C}fa=y[y.length-1];C=E(0,fa.x,fa.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,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)h.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,M=null,Q=null,K=[],W=null;w.begin();for(var X=0;X<this.state.routedPoints.length;X++){var T=this.state.routedPoints[X],N=new mxPoint(T.x/this.scale,T.y/this.scale);0==X?N=y[0]:X==this.state.routedPoints.length-1&&(N=y[y.length-1]);var ca=!1;if(null!=M&&1==T.type){var H=this.state.routedPoints[X+1];T=H.x/this.scale-N.x;H=H.y/this.scale-N.y;T=T*T+H*H;null==W&&(W=new mxPoint(N.x-M.x,N.y-M.y),Q=Math.sqrt(W.x*W.x+W.y*W.y),0<Q?(W.x=W.x*E/Q,W.y=W.y*E/Q):W=null);T>E*E&&0<Q&&(T=M.x-N.x,H=M.y-N.y,T=T*T+H*H,T>E*E&&(ca=new mxPoint(N.x-W.x,N.y-W.y),T=new mxPoint(N.x+W.x,N.y+W.y),K.push(ca),this.addPoints(w,K,C,D,!1,null,J),K=0>Math.round(W.x)||0==Math.round(W.x)&&0>=Math.round(W.y)?1:-1,J=!1,"sharp"==G?(w.lineTo(ca.x-W.y*K,ca.y+W.x*K),w.lineTo(T.x-W.y*K,T.y+W.x*K),w.lineTo(T.x,T.y)):"line"==G?(w.moveTo(ca.x+W.y*K,ca.y-W.x*K),w.lineTo(ca.x-W.y*K,ca.y+W.x*K),w.moveTo(T.x-W.y*K,T.y+W.x*K),w.lineTo(T.x+W.y*K,T.y-W.x*K),w.moveTo(T.x,T.y)):"arc"==G?(K*=1.3,w.curveTo(ca.x-W.y*K,ca.y+W.x*K,T.x-W.y*K,T.y+W.x*K,T.x,T.y)):(w.moveTo(T.x,T.y),J=!0),K=[T],ca=!0))}else W=null;ca||(K.push(N),M=N)}this.addPoints(w,K,C,D,!1,null,J);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;@@ -2818,85 +2818,86 @@ return q};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStylethis.currentEdgeStyle[A[B]]&&(q+=A[B]+"="+this.currentEdgeStyle[A[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?q+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(q+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?q+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(q+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(q+="elbow="+this.currentEdgeStyle.elbow+";");return q=null!=this.currentEdgeStyle.html?q+("html="+this.currentEdgeStyle.html+";"):q+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var q=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=q&&(new mxCodec(q.ownerDocument)).decode(q,this.getStylesheet())};Graph.prototype.createCellLookup=function(q,A){A=null!=A?A:{};for(var B=0;B<q.length;B++){var F=q[B];A[mxObjectIdentity.get(F)]=F.getId();for(var L=this.model.getChildCount(F),R=0;R<L;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(q,A,B){B=null!=B?B:{};for(var F in q){var L=A[F];null==B[L]&&(B[L]=q[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(q,A,-B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(q.ownerDocument),R=new mxGraphModel;L.decode(q,R);q=[];L={};var Z={},ja=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),L));if(null!=ja){var fa=this.createCellLookup([R.root]);ja=ja.slice();this.model.beginUpdate();try{if(1!=ja.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ja.length;R++)ka=this.model.getChildren(this.moveCells([ja[R]],A,B,!1,this.model.getRoot())[0]),null!=ka&&(q=q.concat(ka));else{var ka=R.getChildren(ja[0]);-null!=ka&&(q=this.moveCells(ka,A,B,!1,this.getDefaultParent()),Z[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(L,fa,Z),this.updateCustomLinks(Z,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(q,!0);null!=va&&this.moveCells(q,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,L=0;L<q.length;L++)F.put(q[L],-!0);var R=new mxCodec,Z=new mxGraphModel,ja=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ja,B[L]);var fa=this.view.getState(q[L]);if(null!=fa){var ka=this.getCellGeometry(B[L]);null!=ka&&ka.relative&&!this.model.isEdge(q[L])&&null==F.get(this.model.getParent(q[L]))&&(ka.offset=null,ka.relative=!1,ka.x=fa.x/fa.view.scale-fa.view.translate.x,ka.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(Z)};Graph.prototype.isSwimlane=+B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(q.ownerDocument),R=new mxGraphModel;L.decode(q,R);q=[];L={};var Z={},ja=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),L));if(null!=ja){var ea=this.createCellLookup([R.root]);ja=ja.slice();this.model.beginUpdate();try{if(1!=ja.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ja.length;R++)ka=this.model.getChildren(this.moveCells([ja[R]],A,B,!1,this.model.getRoot())[0]),null!=ka&&(q=q.concat(ka));else{var ka=R.getChildren(ja[0]);+null!=ka&&(q=this.moveCells(ka,A,B,!1,this.getDefaultParent()),Z[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(L,ea,Z),this.updateCustomLinks(Z,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var xa=this.getBoundingBoxFromGeometry(q,!0);null!=xa&&this.moveCells(q,A-xa.x,B-xa.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,L=0;L<q.length;L++)F.put(q[L],+!0);var R=new mxCodec,Z=new mxGraphModel,ja=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ja,B[L]);var ea=this.view.getState(q[L]);if(null!=ea){var ka=this.getCellGeometry(B[L]);null!=ka&&ka.relative&&!this.model.isEdge(q[L])&&null==F.get(this.model.getParent(q[L]))&&(ka.offset=null,ka.relative=!1,ka.x=ea.x/ea.view.scale-ea.view.translate.x,ka.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(Z)};Graph.prototype.isSwimlane=function(q,A){var B=null;null==q||this.model.isEdge(q)||this.model.getParent(q)==this.model.getRoot()||(B=this.getCurrentCellStyle(q,A)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==B};var m=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(q){return null!=q&&m.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellEditable(this.model.getParent(q)):!0:!1};var p=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(q){return null!=q&&p.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellMovable(this.model.getParent(q)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(q){var A=this.model.getParent(q);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(q,A,B,F,L,R,Z,ja){null==ja&&(ja=this.model.getParent(q),-this.isTable(ja)||this.isTableRow(ja))&&(ja=this.getCellAt(R,Z,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[q,A,B,F,L,R,Z,ja]);this.model.setValue(B,"");var fa=this.getChildCells(B,!0);for(A=0;A<fa.length;A++){var ka=this.getCellGeometry(fa[A]);null!=ka&&ka.relative&&0<ka.x&&this.model.remove(fa[A])}var va=this.getChildCells(q,!0);for(A=0;A<va.length;A++)ka=this.getCellGeometry(va[A]),null!=ka&&ka.relative&&0>=ka.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);-if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,R=[],Z=mxUtils.bind(this,-function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||this.model.isEdge(ja)))if(R.push(ja),ja==F)L=R.length-1;else if(q&&null==F&&0<R.length||null!=L&&q&&R.length>L||!q&&0<L)return;for(var fa=0;fa<this.model.getChildCount(ja);fa++)Z(this.model.getChildAt(ja,fa))});Z(this.model.root);0<R.length&&(L=null!=L?mxUtils.mod(L+(q?1:-1),R.length):0,this.setSelectionCell(R[L]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,-A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);if(null!=B&&null!=F){var L=B.clone(),R=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,L),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var y=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,L,R,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ja=[],fa=0;fa<q.length;fa++)this.isTable(q[fa])?-ja=ja.concat(this.model.getChildCells(q[fa],!0).reverse()):ja.push(q[fa]);q=ja}this.model.beginUpdate();try{ja=[];for(fa=0;fa<q.length;fa++)if(null!=L&&this.isTableRow(q[fa])){var ka=this.model.getParent(q[fa]),va=this.getCellGeometry(q[fa]);this.isTable(ka)&&ja.push(ka);if(null!=ka&&null!=va&&this.isTable(ka)&&this.isTable(L)&&(F||ka!=L)){if(!F){var Ma=this.getCellGeometry(ka);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ka,Ma))}Ma=this.getCellGeometry(L);null!=Ma&&(Ma=Ma.clone(),-Ma.height+=va.height,this.model.setGeometry(L,Ma));var Na=this.model.getChildCells(L,!0);if(0<Na.length){q[fa]=F?this.cloneCell(q[fa]):q[fa];var Aa=this.model.getChildCells(q[fa],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-Aa.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Ta=this.cloneCell(Aa[Aa.length-1]);null!=Ta&&(Ta.value="",this.model.add(q[fa],Ta))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(Aa[Aa.length+ua-1]);Aa=this.model.getChildCells(q[fa],!0);for(ua=0;ua<Ga.length;ua++){var Ra=-this.getCellGeometry(Ga[ua]),Oa=this.getCellGeometry(Aa[ua]);null!=Ra&&null!=Oa&&(Oa=Oa.clone(),Oa.width=Ra.width,this.model.setGeometry(Aa[ua],Oa))}}}}var Sa=y.apply(this,arguments);for(fa=0;fa<ja.length;fa++)!F&&this.model.contains(ja[fa])&&0==this.model.getChildCount(ja[fa])&&this.model.remove(ja[fa]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(q)),Sa)}finally{this.model.endUpdate()}return Sa};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,-A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var L=this.model.getParent(q[F]),R=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var Z=this.model.getChildCells(R,!0),ja=0,fa=0;fa<Z.length;fa++)0<=mxUtils.indexOf(q,-Z[fa])&&ja++;ja==Z.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=-function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var L=q.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||-F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=q.shape.getConstraints(q.style,B,A);if(null!=A)return A;if(null!=q.shape.stencil&&null!=q.shape.stencil.constraints)return q.shape.stencil.constraints;if(null!=q.shape.constraints)return q.shape.constraints}}return null};Graph.prototype.flipEdge=function(q){if(null!=q){var A=this.getCurrentCellStyle(q);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;-this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=this.model.getChildCount(q),B=0,F=0;F<A;F++){var L=this.model.getChildAt(q,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),L=!0,R=!0,Z=0;Z<A.length&&R;Z++)L=L&&this.isTable(A[Z]),R=R&&this.isTableRow(A[Z]);return!this.isCellLocked(q)&&(this.isTargetShape(q,-A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||L))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=-q&&null!=this.layoutManager){var B=this.model.getParent(q);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(q,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(q,A){var B=this.getModel(),F=[];B.beginUpdate();-try{for(var L=0;L<q.length;L++){var R=q[L];if(B.isEdge(R)){var Z=B.getTerminal(R,!0),ja=B.getTerminal(R,!1);B.setTerminal(R,ja,!0);B.setTerminal(R,Z,!1);var fa=B.getGeometry(R);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ka=fa.getTerminalPoint(!0),va=fa.getTerminalPoint(!1);fa.setTerminalPoint(ka,!1);fa.setTerminalPoint(va,!0);B.setGeometry(R,fa);var Ma=this.view.getState(R),Na=this.view.getState(Z),Aa=this.view.getState(ja);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,-Na,!0):null,wa=null!=Aa?this.getConnectionConstraint(Ma,Aa,!1):null;this.setConnectionConstraint(R,Z,!0,wa);this.setConnectionConstraint(R,ja,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(fa=this.getCellGeometry(R),null!=-fa)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Ta=fa.width;fa.width=fa.height;fa.height=Ta;B.setGeometry(R,fa)}var Ra=this.view.getState(R);if(null!=Ra){var Oa=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Sa=mxUtils.getValue(Ra.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,-Oa[mxUtils.mod(mxUtils.indexOf(Oa,Sa)+(A?-1:1),Oa.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=-q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var A=q.cell;this.isTableCell(A)&&(A=this.model.getParent(A));this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=-this.model.getDescendants(q);if(0<q.length)for(var A=0;A<q.length;A++){var B=this.view.getState(q[A]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(q[A]):this.isReplacePlaceholders(q[A])&&this.view.invalidate(q[A],!1,!1)}};Graph.prototype.replaceElement=function(q,A){A=q.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(q.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=-q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<q.length;L++){var R=this.getCurrentCellStyle(q[L]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[L]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var Z=F.getElementsByTagName(null!=-B?B:"*"),ja=0;ja<Z.length;ja++)A(Z[ja]);F.innerHTML!=R&&this.cellLabelChanged(q[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),L=q;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var R=-q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var L=this.model.getParent(q[B]);null==L||A.get(L)||(A.put(L,!0),-F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var R=!0,Z=0;Z<this.model.getChildCount(L.cell)&&R;Z++)A.get(this.model.getChildAt(L.cell,Z))||(R=!1);R&&q.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&-A.push(q[B]);q=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(q,A){this.setAttributeForCell(q,"link",A)};Graph.prototype.setTooltipForCell=function(q,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,B,A)};Graph.prototype.getAttributeForCell=function(q,A,B){q=null!=q.value&&-"object"===typeof q.value?q.value.getAttribute(A):null;return null!=q?q:B};Graph.prototype.setAttributeForCell=function(q,A,B){if(null!=q.value&&"object"==typeof q.value)var F=q.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",q.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(q,F)};Graph.prototype.isTargetShape=function(q,A,B){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(B=0;B<-A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<q.length;L++){var R=this.model.getParent(q[L]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=E.apply(this,arguments);var Z=!0;for(L=0;L<q.length&&Z;L++)Z=Z&&this.isTableRow(q[L]);Z&&(this.isTableCell(R)&&(R=-this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,A){this.isEnabled()&&(A=this.insertTextForEvent(q,A),mxGraph.prototype.dblClick.call(this,q,A))};Graph.prototype.insertTextForEvent=function(q,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));-if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,L=mxEvent.getSource(q);this.firstClickState!=F||this.firstClickSource!=L||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&L==this.view.getCanvas().ownerSVGElement)||-(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),L=this.getPageSize();A=Math.max(A,F.x*L.width);B=Math.max(B,F.y*L.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=-function(){var q=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/q.scale-q.translate.x+(0==A.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(F,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q: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-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,A){q=null!=q?q:"";null!=-A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var L=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*L.x)/1E4;F.geometry.y=Math.round(L.y);-F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-L.x)/R),Math.round((A-L.y)/R))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+=-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ka=0;ka<fa.length;ka++){var va=this.getAbsoluteUrl(fa[ka].getAttribute("href"));null!=va&&(fa[ka].setAttribute("rel",this.linkRelation),-fa[ka].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(fa[ka],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var L=this.container.style.cursor,R=this.getTolerance(),Z=this,ja={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(Z,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ka=fa.sourceState;if(null==ka||null==Z.getLinkForCell(ka.cell))fa=Z.getCellAt(fa.getGraphX(),-fa.getGraphY(),null,null,null,function(va,Ma,Na){return null==Z.getLinkForCell(va.cell)}),ka=null==ka||Z.model.isAncestor(fa,ka.cell)?Z.view.getState(fa):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&-(Z.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(fa,ka){if(Z.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(fa>R||ka>R)&&this.clear());else{for(fa=ka.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=-this.currentState&&null!=ka.sourceState||!Z.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},mouseUp:function(fa,ka){var va=ka.getSource();for(fa=ka.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&&((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&-!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(va=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(fa,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":va?Z.linkTarget:"_top",Z.openLink(this.currentLink,fa),ka.consume())):null!=B&&!ka.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<-R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&Math.abs(this.startX-ka.getGraphX())<R&&Math.abs(this.startY-ka.getGraphY())<R&&B(ka.getEvent()));this.clear()},activate:function(fa){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(fa.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(fa){};Z.addMouseListener(ja);mxEvent.addListener(document,"mouseleave",function(fa){ja.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),L=this.gridSize,R=[];F.beginUpdate();-try{var Z={},ja=this.createCellLookup(q),fa=this.cloneCells(q,!1,Z,!0);for(B=0;B<q.length;B++){var ka=F.getParent(q[B]);if(null!=ka){var va=this.moveCells([fa[B]],L,L,!1)[0];R.push(va);if(A)F.add(ka,fa[B]);else{var Ma=ka.getIndex(q[B]);F.add(ka,fa[B],Ma+1)}if(this.isTable(ka)){var Na=this.getCellGeometry(fa[B]),Aa=this.getCellGeometry(ka);null!=Na&&null!=Aa&&(Aa=Aa.clone(),Aa.height+=Na.height,F.setGeometry(ka,Aa))}}else R.push(fa[B])}this.updateCustomLinks(this.createCellMapping(Z,ja),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,-"cells",fa))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],R=0;R<F.length;R++)L.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==L.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=L[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=-this.cellEditor.textarea)if(0==q.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(q));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);-B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],L=-null,R=null,Z=0,ja=0;ja<A.length;ja++)if(this.getModel().isVertex(A[ja])){var fa=this.view.getState(A[ja]);if(null!=fa){var ka=q?fa.getCenterX():fa.getCenterY();L=null!=L?Math.max(L,ka):ka;R=null!=R?Math.min(R,ka):ka;B&&(Z+=q?fa.width:fa.height);F.push(fa)}}if(2<F.length){F.sort(function(Ga,wa){return q?Ga.x-wa.x:Ga.y-wa.y});B&&(Z-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);fa=this.view.translate;ka=this.view.scale;R=R/ka-(q?fa.x:fa.y);L=L/ka-(q?fa.x:fa.y);this.getModel().beginUpdate();-try{var va=(L-R-Z)/(F.length-1),Ma=R+(B?q?F[0].width/2:F[0].height/2:0);for(ja=1;ja<F.length-1;ja++){var Na=this.view.getState(this.model.getParent(F[ja].cell)),Aa=this.getCellGeometry(F[ja].cell);Ma+=va;null!=Aa&&null!=Na&&(Aa=Aa.clone(),q?Aa.x=Math.round(Ma-(B?0:Aa.width/2))-Na.origin.x:Aa.y=Math.round(Ma-(B?0:Aa.height/2))-Na.origin.y,this.getModel().setGeometry(F[ja].cell,Aa));B&&(Ma+=q?F[ja].width:F[ja].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&-mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=function(q){q=new mxImageExport;q.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var R=B.value.attributes[L];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;-q.visitStatesRecursive=function(B,F,L){if(null!=B){var R=F.root,Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});-return q};Graph.prototype.parseBackgroundImage=function(q){var A=null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,L,R,Z,ja,fa,ka,va,Ma,Na,Aa,Ga,wa){var ua=null;if(null!=Aa)for(ua=new mxDictionary,va=0;va<Aa.length;va++)ua.put(Aa[va],!0);Aa=this.useCssTransforms;var Ta=this.enableFlowAnimation;this.enableFlowAnimation=!1;Aa&&(this.useCssTransforms=!1,this.view.revalidate(),-this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;L=null!=L?L:!0;R=null!=R?R:!0;Z=null!=Z?Z:!0;ka=null!=ka?ka:!1;var Ra="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Oa=this.backgroundImage,Sa=this.view.translate,Xa=this.view.scale;"diagram"==Na&&null!=Oa&&null!=Oa.width&&null!=Oa.height&&(Ra=mxRectangle.fromRectangle(Ra),Ra.add(new mxRectangle((Sa.x+Oa.x)*Xa,(Sa.y+Oa.y)*Xa,Oa.width*Xa,Oa.height*-Xa)));if(null==Ra)throw Error(mxResources.get("drawingEmpty"));F=A/Xa;var kb=Math.max(1,Math.ceil(Ra.width*F)+2*B)+(ka&&0==B?5:0),tb=Math.max(1,Math.ceil(Ra.height*F)+2*B)+(ka&&0==B?5:0);L=L?-.5:0;var ub=mxUtils.getLightDarkColor(q),lb=Graph.createSvgNode(L,L,kb,tb,ub),mb=lb.ownerDocument;if(null!=q){var fb=mxUtils.createElementNs(mb,mxConstants.NS_SVG,"rect");fb.setAttribute("fill",ub.light);fb.style.fill=ub.cssText;fb.setAttribute("width","100%");fb.setAttribute("height","100%");fb.setAttribute("x",-"0");fb.setAttribute("y","0");lb.appendChild(fb)}var nb=mxUtils.createElementNs(mb,mxConstants.NS_SVG,"g");lb.appendChild(nb);var cb=this.createSvgCanvas(nb);cb.translate(Math.floor(B/A-Ra.x/Xa),Math.floor(B/A-Ra.y/Xa));cb.idPrefix="drawio-svg-"+Editor.guid();var vb=document.createElement("div"),wb=cb.getAlternateText;cb.getAlternateText=function(La,ob,ab,jb,hb,Ya,xb,Ab,c,l,t,n,r){if(null!=Ya&&0<this.state.fontSize)try{mxUtils.isNode(Ya)?Ya=Ya.innerText:(vb.innerHTML=Ya,Ya=mxUtils.extractTextWithWhitespace(vb.childNodes));-for(var v=Math.ceil(2*jb/this.state.fontSize),x=[],I=0,z=0;(0==v||I<v)&&z<Ya.length;){var da=Ya.charCodeAt(z);if(10==da||13==da){if(0<I)break}else x.push(Ya.charAt(z)),255>da&&I++;z++}x.length<Ya.length&&1<Ya.length-x.length&&(Ya=mxUtils.trim(x.join(""))+"...");return Ya}catch(U){return wb.apply(this,arguments)}else return wb.apply(this,arguments)};null!=Oa&&null!=Oa.width&&null!=Oa.height&&(q=Xa/A,L=new mxRectangle((Oa.x+Sa.x)*q,(Oa.y+Sa.y)*q,Oa.width*q,Oa.height*q),mxUtils.intersects(Ra,L)&&cb.image(Oa.x+-Sa.x,Oa.y+Sa.y,Oa.width,Oa.height,Oa.src,!0));cb.scale(F);cb.textEnabled=Z;ja=null!=ja?ja:this.createSvgImageExport();var yb=ja.getLinkForCellState;ja.getLinkForCellState=function(La,ob){var ab=La.view.graph.getAbsoluteUrl(yb.apply(this,arguments));return null==ab||La.view.graph.isCustomLink(ab)?null:ab};ja.getLinkTargetForCellState=function(La,ob){return La.view.graph.getLinkTargetForCell(La.cell)};var sb=ja.drawCellState,qb=null,rb=mxUtils.bind(this,function(){if(null==qb){qb="ge-flow-animation-"+-Editor.guid();var La=null!=mb.createElementNS?mb.createElementNS(mxConstants.NS_SVG,"style"):mb.createElement("style");La.innerHTML=this.createFlowAnimationCss(qb);mb.getElementsByTagName("defs")[0].appendChild(La)}return qb});ja.drawCellState=function(La,ob){for(var ab=La.view.graph,jb=null!=ua?ua.get(La.cell):ab.isCellSelected(La.cell),hb=ab.model.getParent(La.cell);!(R&&null==ua||jb)&&null!=hb;)jb=null!=ua?ua.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);if(null!=La.shape)try{var Ya=-La.shape.isFlowAnimationEnabled,xb=La.shape.addFlowAnimationToShape;La.shape.isFlowAnimationEnabled=function(){return Ta&&ab.model.isEdge(La.cell)&&"1"==mxUtils.getValue(La.style,"flowAnimation","0")};La.shape.addFlowAnimationToShape=function(){ab.addFlowAnimationToNode(this.getFlowAnimationPath(),La.style,A,rb())};if(R&&null==ua||jb)ab.view.redrawEnumerationState(La),sb.apply(this,arguments),this.doDrawShape(La.secondLabel,ob)}finally{La.shape.isFlowAnimationEnabled=Ya,La.shape.addFlowAnimationToShape=-xb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ja.drawState(this.getView().getState(ib),cb);this.addForeignObjectWarning(cb,lb);wa?this.disableSvgLinks(lb):this.updateSvgLinks(lb,fa,!0);return lb}finally{this.enableFlowAnimation=Ta,Aa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),-F=q.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var L=q.createElement("a");L.setAttribute("transform","translate(0,-5)");null==L.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(L.setAttribute("xlink:href",Graph.foreignObjectWarningLink),L.setAttribute("target","_blank")):(L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),L.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=-q.createElement("text");q.setAttribute("text-anchor","middle");q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);L.appendChild(q);B.appendChild(L);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",-""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var L=q[F].getAttribute("href");null==L&&(L=q[F].getAttribute("xlink:href"));null!=L&&(null!=A&&/^https?:\/\//.test(L)?q[F].setAttribute("target",A):B&&this.isCustomLink(L)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);q.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;-q.adaptiveColors=this.getAdaptiveColors();q.pointerEvents=!0;return q};Graph.prototype.getSelectedElement=function(){var q=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(q=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(q=document.selection.createRange().parentElement());return q};Graph.prototype.getSelectedEditingElement=function(){var q=null;if(null!=this.cellEditor.textarea)for(q=this.getSelectedElement();null!=q&&q.nodeType!=mxConstants.NODETYPE_ELEMENT;)q=-q.parentNode;return q};Graph.prototype.getParentByName=function(q,A,B){for(;null!=q&&q.nodeName!=A;){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.getParentByNames=function(q,A,B){for(;null!=q&&!(0<=mxUtils.indexOf(A,q.nodeName));){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.selectNode=function(q){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(q);A.removeAllRanges();A.addRange(B)}}else(A=-document.selection)&&"Control"!=A.type&&(q=A.createRange(),q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=-function(q,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(q),L=0;L<F;L++){var R=this.model.getChildAt(q,L);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var Z=this.getCellGeometry(R);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(R,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var L=-this.view.getState(q[F]);null!=L&&this.flipEdgePoints(q[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();-try{for(var F=0;F<q.length;F++){var L=this.model.getParent(q[F]);if(this.isTable(L)){var R=this.getCellGeometry(q[F]),Z=this.getCellGeometry(L);null!=R&&null!=Z&&(Z=Z.clone(),Z.height-=R.height,this.model.setGeometry(L,Z))}}var ja=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=ja)for(B=[],F=0;F<ja.length;F++)this.model.contains(ja[F])&&(this.model.isVertex(ja[F])||this.model.isEdge(ja[F]))&&B.push(ja[F])}return B};Graph.prototype.insertTableColumn=-function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);L=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(q,!0).length-1);var Z=B.getChildCells(F,!0),ja=Graph.minTableColumnWidth;for(q=0;q<Z.length;q++){var fa=B.getChildCells(Z[q],!0)[L],ka=B.cloneCell(fa,!1);null==ka&&(ka=this.createVertex());var va=this.getCellGeometry(ka);ka.value=null;ka.style=-mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);ja=va.width;var Ma=this.getCellGeometry(Z[q]);null!=Ma&&(va.height=Ma.height)}B.add(Z[q],ka,L+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=ja,B.setGeometry(F,Na))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();+this.isTable(ja)||this.isTableRow(ja))&&(ja=this.getCellAt(R,Z,null,!0,!1));B=null;this.model.beginUpdate();try{var ea=this.getCellGeometry(q);if(null!=ea&&null!=ea.points&&0<ea.points.length&&1==A.length&&this.model.isVertex(A[0])){var ka=this.getCellGeometry(A[0]);if(null!=ka&&!ka.relative){var xa=new mxRectangle(ka.x+F,ka.y+L,ka.width,ka.height),Ka=ea.points;ka=[];for(var Ha=0;Ha<Ka.length;Ha++)xa.intersectsPoint(Ka[Ha].x,Ka[Ha].y)||ka.push(Ka[Ha]);ka.length<Ka.length&&(ea=ea.clone(),ea.points=+ka,this.model.setGeometry(q,ea))}}B=u.apply(this,[q,A,B,F,L,R,Z,ja]);this.model.setValue(B,"");var ya=this.getChildCells(B,!0);for(Ha=0;Ha<ya.length;Ha++)ea=this.getCellGeometry(ya[Ha]),null!=ea&&ea.relative&&0<ea.x&&this.model.remove(ya[Ha]);var Fa=this.getChildCells(q,!0);for(Ha=0;Ha<Fa.length;Ha++)ea=this.getCellGeometry(Fa[Ha]),null!=ea&&ea.relative&&0>=ea.x&&this.model.remove(Fa[Ha]);var va=this.model.getTerminal(B,!1);if(null!=va){var ua=this.getCurrentCellStyle(va);null!=ua&&"1"==ua.snapToPoint&&+(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,R=[],Z=mxUtils.bind(this,function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||+this.model.isEdge(ja)))if(R.push(ja),ja==F)L=R.length-1;else if(q&&null==F&&0<R.length||null!=L&&q&&R.length>L||!q&&0<L)return;for(var ea=0;ea<this.model.getChildCount(ja);ea++)Z(this.model.getChildAt(ja,ea))});Z(this.model.root);0<R.length&&(L=null!=L?mxUtils.mod(L+(q?1:-1),R.length):0,this.setSelectionCell(R[L]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);+if(null!=B&&null!=F){var L=B.clone(),R=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,L),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var y=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,L,R,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ja=[],ea=0;ea<q.length;ea++)this.isTable(q[ea])?ja=ja.concat(this.model.getChildCells(q[ea],+!0).reverse()):ja.push(q[ea]);q=ja}this.model.beginUpdate();try{ja=[];for(ea=0;ea<q.length;ea++)if(null!=L&&this.isTableRow(q[ea])){var ka=this.model.getParent(q[ea]),xa=this.getCellGeometry(q[ea]);this.isTable(ka)&&ja.push(ka);if(null!=ka&&null!=xa&&this.isTable(ka)&&this.isTable(L)&&(F||ka!=L)){if(!F){var Ka=this.getCellGeometry(ka);null!=Ka&&(Ka=Ka.clone(),Ka.height-=xa.height,this.model.setGeometry(ka,Ka))}Ka=this.getCellGeometry(L);null!=Ka&&(Ka=Ka.clone(),Ka.height+=xa.height,this.model.setGeometry(L,+Ka));var Ha=this.model.getChildCells(L,!0);if(0<Ha.length){q[ea]=F?this.cloneCell(q[ea]):q[ea];var ya=this.model.getChildCells(q[ea],!0),Fa=this.model.getChildCells(Ha[0],!0),va=Fa.length-ya.length;if(0<va)for(var ua=0;ua<va;ua++){var Ta=this.cloneCell(ya[ya.length-1]);null!=Ta&&(Ta.value="",this.model.add(q[ea],Ta))}else if(0>va)for(ua=0;ua>va;ua--)this.model.remove(ya[ya.length+ua-1]);ya=this.model.getChildCells(q[ea],!0);for(ua=0;ua<Fa.length;ua++){var Ra=this.getCellGeometry(Fa[ua]),Oa=this.getCellGeometry(ya[ua]);+null!=Ra&&null!=Oa&&(Oa=Oa.clone(),Oa.width=Ra.width,this.model.setGeometry(ya[ua],Oa))}}}}var Sa=y.apply(this,arguments);for(ea=0;ea<ja.length;ea++)!F&&this.model.contains(ja[ea])&&0==this.model.getChildCount(ja[ea])&&this.model.remove(ja[ea]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(q)),Sa)}finally{this.model.endUpdate()}return Sa};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var L=+this.model.getParent(q[F]),R=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var Z=this.model.getChildCells(R,!0),ja=0,ea=0;ea<Z.length;ea++)0<=mxUtils.indexOf(q,Z[ea])&&ja++;ja==Z.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};+Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,+"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var L=q.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=q.shape.getConstraints(q.style,B,A);if(null!=A)return A;if(null!=+q.shape.stencil&&null!=q.shape.stencil.constraints)return q.shape.stencil.constraints;if(null!=q.shape.constraints)return q.shape.constraints}}return null};Graph.prototype.flipEdge=function(q){if(null!=q){var A=this.getCurrentCellStyle(q);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=+this.model.getChildCount(q),B=0,F=0;F<A;F++){var L=this.model.getChildAt(q,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),L=!0,R=!0,Z=0;Z<A.length&&R;Z++)L=L&&this.isTable(A[Z]),R=R&&this.isTableRow(A[Z]);return!this.isCellLocked(q)&&(this.isTargetShape(q,A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget",+"1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||L))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=q&&null!=this.layoutManager){var B=this.model.getParent(q);null!=B&&(B=this.layoutManager.getLayout(B),+null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(q,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(q,A){var B=this.getModel(),F=[];B.beginUpdate();try{for(var L=0;L<q.length;L++){var R=q[L];if(B.isEdge(R)){var Z=B.getTerminal(R,!0),ja=B.getTerminal(R,+!1);B.setTerminal(R,ja,!0);B.setTerminal(R,Z,!1);var ea=B.getGeometry(R);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ka=ea.getTerminalPoint(!0),xa=ea.getTerminalPoint(!1);ea.setTerminalPoint(ka,!1);ea.setTerminalPoint(xa,!0);B.setGeometry(R,ea);var Ka=this.view.getState(R),Ha=this.view.getState(Z),ya=this.view.getState(ja);if(null!=Ka){var Fa=null!=Ha?this.getConnectionConstraint(Ka,Ha,!0):null,va=null!=ya?this.getConnectionConstraint(Ka,ya,!1):null;this.setConnectionConstraint(R,+Z,!0,va);this.setConnectionConstraint(R,ja,!1,Fa);var ua=mxUtils.getValue(Ka.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ka.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(ea=this.getCellGeometry(R),null!=ea)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){ea=ea.clone();+ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ta=ea.width;ea.width=ea.height;ea.height=Ta;B.setGeometry(R,ea)}var Ra=this.view.getState(R);if(null!=Ra){var Oa=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Sa=mxUtils.getValue(Ra.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Oa[mxUtils.mod(mxUtils.indexOf(Oa,Sa)+(A?-1:1),Oa.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};+Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var A=q.cell;this.isTableCell(A)&&(A=this.model.getParent(A));+this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var A=0;A<q.length;A++){var B=this.view.getState(q[A]);null!=B&&null!=B.shape&&+null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(q[A]):this.isReplacePlaceholders(q[A])&&this.view.invalidate(q[A],!1,!1)}};Graph.prototype.replaceElement=function(q,A){A=q.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(q.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");+for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<q.length;L++){var R=this.getCurrentCellStyle(q[L]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[L]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var Z=F.getElementsByTagName(null!=B?B:"*"),ja=0;ja<Z.length;ja++)A(Z[ja]);F.innerHTML!=R&&this.cellLabelChanged(q[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=+function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),L=q;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var R=q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?+R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var L=this.model.getParent(q[B]);null==L||A.get(L)||(A.put(L,!0),F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&+this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var R=!0,Z=0;Z<this.model.getChildCount(L.cell)&&R;Z++)A.get(this.model.getChildAt(L.cell,Z))||(R=!1);R&&q.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&A.push(q[B]);q=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=+function(q,A){this.setAttributeForCell(q,"link",A)};Graph.prototype.setTooltipForCell=function(q,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,B,A)};Graph.prototype.getAttributeForCell=function(q,A,B){q=null!=q.value&&"object"===typeof q.value?q.value.getAttribute(A):null;return null!=q?q:B};Graph.prototype.setAttributeForCell=function(q,+A,B){if(null!=q.value&&"object"==typeof q.value)var F=q.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",q.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(q,F)};Graph.prototype.isTargetShape=function(q,A,B){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(B=0;B<A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,+q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<q.length;L++){var R=this.model.getParent(q[L]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=E.apply(this,arguments);var Z=!0;for(L=0;L<q.length&&Z;L++)Z=Z&&this.isTableRow(q[L]);Z&&(this.isTableCell(R)&&(R=this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=+function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,A){this.isEnabled()&&(A=this.insertTextForEvent(q,A),mxGraph.prototype.dblClick.call(this,q,A))};Graph.prototype.insertTextForEvent=function(q,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,L=mxEvent.getSource(q);+this.firstClickState!=F||this.firstClickSource!=L||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&L==this.view.getCanvas().ownerSVGElement)||(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=+function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),L=this.getPageSize();A=Math.max(A,F.x*L.width);B=Math.max(B,F.y*L.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=function(){var q=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/q.scale-q.translate.x++(0==A.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(F,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q: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-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-+this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,A){q=null!=q?q:"";null!=A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=+new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var L=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*L.x)/1E4;F.geometry.y=Math.round(L.y);F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-+L.x)/R),Math.round((A-L.y)/R))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted",+"cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ka=0;ka<ea.length;ka++){var xa=this.getAbsoluteUrl(ea[ka].getAttribute("href"));null!=xa&&(ea[ka].setAttribute("rel",this.linkRelation),ea[ka].setAttribute("href",xa),null!=A&&mxEvent.addGestureListeners(ea[ka],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);+F();var L=this.container.style.cursor,R=this.getTolerance(),Z=this,ja={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(Z,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ka=ea.sourceState;if(null==ka||null==Z.getLinkForCell(ka.cell))ea=Z.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(xa,Ka,Ha){return null==Z.getLinkForCell(xa.cell)}),ka=null==ka||Z.model.isAncestor(ea,ka.cell)?+Z.view.getState(ea):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&(Z.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(ea,ka){if(Z.isMouseDown)null!=this.currentLink&&+(ea=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(ea>R||ka>R)&&this.clear());else{for(ea=ka.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=this.currentState&&null!=ka.sourceState||!Z.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},+mouseUp:function(ea,ka){var xa=ka.getSource();for(ea=ka.getEvent();null!=xa&&"a"!=xa.nodeName.toLowerCase();)xa=xa.parentNode;null==xa&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&&((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(xa=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,+5)&&xa||null==A||A(ea,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":xa?Z.linkTarget:"_top",Z.openLink(this.currentLink,ea),ka.consume())):null!=B&&!ka.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&Math.abs(this.startX-ka.getGraphX())<R&&Math.abs(this.startY-ka.getGraphY())<R&&B(ka.getEvent()));+this.clear()},activate:function(ea){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(ea.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(ea){};+Z.addMouseListener(ja);mxEvent.addListener(document,"mouseleave",function(ea){ja.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),L=this.gridSize,R=[];F.beginUpdate();try{var Z={},ja=this.createCellLookup(q),ea=this.cloneCells(q,!1,Z,!0);for(B=0;B<q.length;B++){var ka=F.getParent(q[B]);if(null!=ka){var xa=+this.moveCells([ea[B]],L,L,!1)[0];R.push(xa);if(A)F.add(ka,ea[B]);else{var Ka=ka.getIndex(q[B]);F.add(ka,ea[B],Ka+1)}if(this.isTable(ka)){var Ha=this.getCellGeometry(ea[B]),ya=this.getCellGeometry(ka);null!=Ha&&null!=ya&&(ya=ya.clone(),ya.height+=Ha.height,F.setGeometry(ka,ya))}}else R.push(ea[B])}this.updateCustomLinks(this.createCellMapping(Z,ja),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ea))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=+q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],R=0;R<F.length;R++)L.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==L.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=L[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=this.cellEditor.textarea)if(0==q.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=+this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(q));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=+function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],L=null,R=null,Z=0,ja=0;ja<A.length;ja++)if(this.getModel().isVertex(A[ja])){var ea=this.view.getState(A[ja]);if(null!=ea){var ka=+q?ea.getCenterX():ea.getCenterY();L=null!=L?Math.max(L,ka):ka;R=null!=R?Math.min(R,ka):ka;B&&(Z+=q?ea.width:ea.height);F.push(ea)}}if(2<F.length){F.sort(function(Fa,va){return q?Fa.x-va.x:Fa.y-va.y});B&&(Z-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);ea=this.view.translate;ka=this.view.scale;R=R/ka-(q?ea.x:ea.y);L=L/ka-(q?ea.x:ea.y);this.getModel().beginUpdate();try{var xa=(L-R-Z)/(F.length-1),Ka=R+(B?q?F[0].width/2:F[0].height/2:0);for(ja=1;ja<F.length-1;ja++){var Ha=+this.view.getState(this.model.getParent(F[ja].cell)),ya=this.getCellGeometry(F[ja].cell);Ka+=xa;null!=ya&&null!=Ha&&(ya=ya.clone(),q?ya.x=Math.round(Ka-(B?0:ya.width/2))-Ha.origin.x:ya.y=Math.round(Ka-(B?0:ya.height/2))-Ha.origin.y,this.getModel().setGeometry(F[ja].cell,ya));B&&(Ka+=q?F[ja].width:F[ja].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=+function(q){q=new mxImageExport;q.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var R=B.value.attributes[L];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;q.visitStatesRecursive=function(B,F,L){if(null!=B){var R=F.root,+Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});return q};Graph.prototype.parseBackgroundImage=function(q){var A=+null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,L,R,Z,ja,ea,ka,xa,Ka,Ha,ya,Fa,va){var ua=null;if(null!=ya)for(ua=new mxDictionary,xa=0;xa<ya.length;xa++)ua.put(ya[xa],!0);ya=this.useCssTransforms;var Ta=this.enableFlowAnimation;this.enableFlowAnimation=!1;ya&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{A=null!=A?A:1;B=null!=+B?B:0;L=null!=L?L:!0;R=null!=R?R:!0;Z=null!=Z?Z:!0;ka=null!=ka?ka:!1;var Ra="page"==Ha?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Ha?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Oa=this.backgroundImage,Sa=this.view.translate,Xa=this.view.scale;"diagram"==Ha&&null!=Oa&&null!=Oa.width&&null!=Oa.height&&(Ra=mxRectangle.fromRectangle(Ra),Ra.add(new mxRectangle((Sa.x+Oa.x)*Xa,(Sa.y+Oa.y)*Xa,Oa.width*Xa,Oa.height*Xa)));if(null==Ra)throw Error(mxResources.get("drawingEmpty"));+F=A/Xa;var kb=Math.max(1,Math.ceil(Ra.width*F)+2*B)+(ka&&0==B?5:0),tb=Math.max(1,Math.ceil(Ra.height*F)+2*B)+(ka&&0==B?5:0);L=L?-.5:0;var ub=mxUtils.getLightDarkColor(q),lb=Graph.createSvgNode(L,L,kb,tb,ub),mb=lb.ownerDocument;if(null!=q){var fb=mxUtils.createElementNs(mb,mxConstants.NS_SVG,"rect");fb.setAttribute("fill",ub.light);fb.style.fill=ub.cssText;fb.setAttribute("width","100%");fb.setAttribute("height","100%");fb.setAttribute("x","0");fb.setAttribute("y","0");lb.appendChild(fb)}var nb=mxUtils.createElementNs(mb,+mxConstants.NS_SVG,"g");lb.appendChild(nb);var cb=this.createSvgCanvas(nb);cb.translate(Math.floor(B/A-Ra.x/Xa),Math.floor(B/A-Ra.y/Xa));cb.idPrefix="drawio-svg-"+Editor.guid();var vb=document.createElement("div"),wb=cb.getAlternateText;cb.getAlternateText=function(Na,ob,ab,jb,hb,Ya,xb,Ab,c,l,t,n,r){if(null!=Ya&&0<this.state.fontSize)try{mxUtils.isNode(Ya)?Ya=Ya.innerText:(vb.innerHTML=Ya,Ya=mxUtils.extractTextWithWhitespace(vb.childNodes));for(var v=Math.ceil(2*jb/this.state.fontSize),x=[],I=0,z=+0;(0==v||I<v)&&z<Ya.length;){var da=Ya.charCodeAt(z);if(10==da||13==da){if(0<I)break}else x.push(Ya.charAt(z)),255>da&&I++;z++}x.length<Ya.length&&1<Ya.length-x.length&&(Ya=mxUtils.trim(x.join(""))+"...");return Ya}catch(U){return wb.apply(this,arguments)}else return wb.apply(this,arguments)};null!=Oa&&null!=Oa.width&&null!=Oa.height&&(q=Xa/A,L=new mxRectangle((Oa.x+Sa.x)*q,(Oa.y+Sa.y)*q,Oa.width*q,Oa.height*q),mxUtils.intersects(Ra,L)&&cb.image(Oa.x+Sa.x,Oa.y+Sa.y,Oa.width,Oa.height,Oa.src,!0));+cb.scale(F);cb.textEnabled=Z;ja=null!=ja?ja:this.createSvgImageExport();var yb=ja.getLinkForCellState;ja.getLinkForCellState=function(Na,ob){var ab=Na.view.graph.getAbsoluteUrl(yb.apply(this,arguments));return null==ab||Na.view.graph.isCustomLink(ab)?null:ab};ja.getLinkTargetForCellState=function(Na,ob){return Na.view.graph.getLinkTargetForCell(Na.cell)};var sb=ja.drawCellState,qb=null,rb=mxUtils.bind(this,function(){if(null==qb){qb="ge-flow-animation-"+Editor.guid();var Na=null!=mb.createElementNS?+mb.createElementNS(mxConstants.NS_SVG,"style"):mb.createElement("style");Na.innerHTML=this.createFlowAnimationCss(qb);mb.getElementsByTagName("defs")[0].appendChild(Na)}return qb});ja.drawCellState=function(Na,ob){for(var ab=Na.view.graph,jb=null!=ua?ua.get(Na.cell):ab.isCellSelected(Na.cell),hb=ab.model.getParent(Na.cell);!(R&&null==ua||jb)&&null!=hb;)jb=null!=ua?ua.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);if(null!=Na.shape)try{var Ya=Na.shape.isFlowAnimationEnabled,xb=Na.shape.addFlowAnimationToShape;+Na.shape.isFlowAnimationEnabled=function(){return Ta&&ab.model.isEdge(Na.cell)&&"1"==mxUtils.getValue(Na.style,"flowAnimation","0")};Na.shape.addFlowAnimationToShape=function(){ab.addFlowAnimationToNode(this.getFlowAnimationPath(),Na.style,A,rb())};if(R&&null==ua||jb)ab.view.redrawEnumerationState(Na),sb.apply(this,arguments),this.doDrawShape(Na.secondLabel,ob)}finally{Na.shape.isFlowAnimationEnabled=Ya,Na.shape.addFlowAnimationToShape=xb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:+this.model.root;ja.drawState(this.getView().getState(ib),cb);this.addForeignObjectWarning(cb,lb);va?this.disableSvgLinks(lb):this.updateSvgLinks(lb,ea,!0);return lb}finally{this.enableFlowAnimation=Ta,ya&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),F=q.createElement("g");F.setAttribute("requiredFeatures",+"http://www.w3.org/TR/SVG11/feature#Extensibility");var L=q.createElement("a");L.setAttribute("transform","translate(0,-5)");null==L.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(L.setAttribute("xlink:href",Graph.foreignObjectWarningLink),L.setAttribute("target","_blank")):(L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),L.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=q.createElement("text");q.setAttribute("text-anchor","middle");+q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);L.appendChild(q);B.appendChild(L);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=+function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var L=q[F].getAttribute("href");null==L&&(L=q[F].getAttribute("xlink:href"));null!=L&&(null!=A&&/^https?:\/\//.test(L)?q[F].setAttribute("target",A):B&&this.isCustomLink(L)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);q.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;q.adaptiveColors=this.getAdaptiveColors();q.pointerEvents=+!0;return q};Graph.prototype.getSelectedElement=function(){var q=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(q=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(q=document.selection.createRange().parentElement());return q};Graph.prototype.getSelectedEditingElement=function(){var q=null;if(null!=this.cellEditor.textarea)for(q=this.getSelectedElement();null!=q&&q.nodeType!=mxConstants.NODETYPE_ELEMENT;)q=q.parentNode;return q};Graph.prototype.getParentByName=+function(q,A,B){for(;null!=q&&q.nodeName!=A;){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.getParentByNames=function(q,A,B){for(;null!=q&&!(0<=mxUtils.indexOf(A,q.nodeName));){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.selectNode=function(q){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(q);A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(q=A.createRange(),+q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=function(q,A,B){this.model.beginUpdate();+try{for(var F=this.model.getChildCount(q),L=0;L<F;L++){var R=this.model.getChildAt(q,L);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var Z=this.getCellGeometry(R);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(R,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var L=this.view.getState(q[F]);null!=+L&&this.flipEdgePoints(q[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();try{for(var F=+0;F<q.length;F++){var L=this.model.getParent(q[F]);if(this.isTable(L)){var R=this.getCellGeometry(q[F]),Z=this.getCellGeometry(L);null!=R&&null!=Z&&(Z=Z.clone(),Z.height-=R.height,this.model.setGeometry(L,Z))}}var ja=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=ja)for(B=[],F=0;F<ja.length;F++)this.model.contains(ja[F])&&(this.model.isVertex(ja[F])||this.model.isEdge(ja[F]))&&B.push(ja[F])}return B};Graph.prototype.insertTableColumn=+function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);L=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(q,!0).length-1);var Z=B.getChildCells(F,!0),ja=Graph.minTableColumnWidth;for(q=0;q<Z.length;q++){var ea=B.getChildCells(Z[q],!0)[L],ka=B.cloneCell(ea,!1);null==ka&&(ka=this.createVertex());var xa=this.getCellGeometry(ka);ka.value=null;ka.style=+mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=xa){null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null);ja=xa.width;var Ka=this.getCellGeometry(Z[q]);null!=Ka&&(xa.height=Ka.height)}B.add(Z[q],ka,L+(A?0:1))}var Ha=this.getCellGeometry(F);null!=Ha&&(Ha=Ha.clone(),Ha.width+=ja,B.setGeometry(F,Ha))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(q).childLayout?q:A.getParent(q);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==q&&(q=F[F.length-1]),A.remove(q))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(q).childLayout){F=q;var L=B.getChildCells(F,!0);q=L[A?0:L.length-1]}else F=B.getParent(q);var R=F.getIndex(q);q=B.cloneCell(q,!1);q.value=null;B.add(F,q,R+(A?0:1))}finally{B.endUpdate()}};-Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=q;if(this.isTableCell(q))L=B.getParent(q),F=B.getParent(L);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);L=R[A?0:R.length-1]}var Z=B.getChildCells(L,!0),ja=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var fa=this.getCellGeometry(L);if(null!=fa){for(R=0;R<Z.length;R++){q=B.cloneCell(Z[R],!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),-"colspan",null);var ka=this.getCellGeometry(q);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height=fa.height);L.insert(q)}B.add(F,L,ja+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=fa.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&-(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var Z=R.length-1;this.isTableCell(q)&&(Z=mxUtils.indexOf(R,q));for(F=q=0;F<L.length;F++){var ja=A.getChildCells(L[F],!0)[Z];A.remove(ja);var fa=this.getCellGeometry(ja);null!=fa&&(q=Math.max(q,fa.width))}var ka=this.getCellGeometry(B);null!=ka&&(ka=ka.clone(),ka.width-=q,A.setGeometry(B,ka))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=+Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,L=q;if(this.isTableCell(q))L=B.getParent(q),F=B.getParent(L);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);L=R[A?0:R.length-1]}var Z=B.getChildCells(L,!0),ja=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var ea=this.getCellGeometry(L);if(null!=ea){for(R=0;R<Z.length;R++){q=B.cloneCell(Z[R],!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),+"colspan",null);var ka=this.getCellGeometry(q);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height=ea.height);L.insert(q)}B.add(F,L,ja+(A?0:1));var xa=this.getCellGeometry(F);null!=xa&&(xa=xa.clone(),xa.height+=ea.height,B.setGeometry(F,xa))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&+(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var Z=R.length-1;this.isTableCell(q)&&(Z=mxUtils.indexOf(R,q));for(F=q=0;F<L.length;F++){var ja=A.getChildCells(L[F],!0)[Z];A.remove(ja);var ea=this.getCellGeometry(ja);null!=ea&&(q=Math.max(q,ea.width))}var ka=this.getCellGeometry(B);null!=ka&&(ka=ka.clone(),ka.width-=q,A.setGeometry(B,ka))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(q=F=A.getParent(q));this.isTableRow(q)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(1>=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);q=0;var R=this.getCellGeometry(F);null!=R&&(q=R.height);var Z=this.getCellGeometry(B);null!=Z&&(Z=Z.clone(),Z.height-=q,A.setGeometry(B,Z))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(q,A){for(var B=q.tBodies[0],F=B.rows[0].cells,L=q=0;L<F.length;L++){var R=F[L].getAttribute("colspan");q+=null!=R?parseInt(R):1}A=B.insertRow(A);for(L=0;L<q;L++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(q,A){q.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(q,A){var B=q.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var L=document.createElement("th");B.rows[F].appendChild(L);mxUtils.br(L)}q=q.tBodies[0];for(B=0;B<q.rows.length;B++)F=q.rows[B].insertCell(A),mxUtils.br(F);return q.rows[0].cells[0<=A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=A){q=q.tBodies[0].rows;for(var B=0;B<q.length;B++)q[B].cells.length>A&&q[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(q){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=q;q=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=q.appendChild(F);A.insertNode(q)}}else(A=document.selection)&&@@ -2904,19 +2905,19 @@ A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=q,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(q)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(R){this.customLinkClicked(q,B);mxEvent.consume(R)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(R,Z){this.popupMenuHandler.hideMenu()});var q=this.updateMouseEvent;this.updateMouseEvent=function(R){R=q.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var Z=this.getCellAt(R.graphX,R.graphY);null!=Z&&this.isSwimlane(Z)&&this.hitsSwimlaneContent(Z,R.graphX,R.graphY)||(R.state=this.view.getState(Z),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(R,Z,ja){R==mxEvent.MOUSE_DOWN&&(Z=this.updateMouseEvent(Z),A=this.isCellSelected(Z.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,Z){if(null!=this.freehand&&!this.freehand.isDrawing()){var ja=mxEvent.isMouseEvent(Z.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==Z.getState()||!Z.isSource(Z.getState().control))&&(this.popupMenuHandler.popupTrigger||-!F&&!ja&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ka.x+1,Z.getY()+ka.y+1,fa,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[R,Z,ja])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};+!F&&!ja&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ka.x+1,Z.getY()+ka.y+1,ea,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[R,Z,ja])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};mxCellEditor.prototype.isContentEditing=function(){var q=this.graph.view.getState(this.editingCell);return null!=q&&1==q.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var q="";window.getSelection?q=window.getSelection():document.getSelection?q=document.getSelection():document.selection&&(q=document.selection.createRange().text);return""!=q};mxCellEditor.prototype.insertTab=function(q){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);q=Graph.createTabNode(q);B.insertNode(q);B.setStartAfter(q);B.setEndAfter(q);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(q,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(Z){L||F||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),Z.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=[],B=0,F=q.rangeCount;B<F;++B)A.push(q.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(q){try{if(q)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=q.length;A<B;++A)sel.addRange(q[A])}else document.selection&&q.select&&q.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(q,A){q=this.graph.getStartEditingCell(q,A);M.apply(this,arguments);var B=this.graph.view.getState(q);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(q)};mxCellEditor.prototype.toggleViewMode=function(){var q=this.graph.view.getState(this.editingCell);-if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ja=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ja.length&&"\n"==ja.charAt(ja.length-1)&&(ja=ja.substring(0,ja.length-1));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"<br/>"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);+if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ja=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ja.length&&"\n"==ja.charAt(ja.length-1)&&(ja=ja.substring(0,ja.length-1));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"<br/>"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,Z=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Z.push("underline");-(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=+(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,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 ja=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ja=mxUtils.replaceTrailingNewlines(ja,"<div><br></div>"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=-Math.round(fa)+"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!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=+Graph.backupStyleAttribute);var ja=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ja=mxUtils.replaceTrailingNewlines(ja,"<div><br></div>"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=+Math.round(ea)+"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!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(q,A){if(null!=this.textarea)if(q=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=q){var B=q.view.scale;this.bounds=mxRectangle.fromRectangle(q);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=q.text?q.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(q.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/B)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*B);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/B)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*B);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("+B+","+B+")")}else this.textarea.style.height=@@ -2931,18 +2932,18 @@ function(q,A){X.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==this.graph.model.setGeometry(F,L)}}};var T=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=T.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],R=0;R<A.length;R++){var Z=A[R];this.graph.isTableCell(Z)?q(F.getParent(F.getParent(Z))):this.graph.isTableRow(Z)&&q(F.getParent(Z));q(Z)}return L};var N=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(q){return N.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.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 H=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(q){var A=H.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var S=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=S.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+-q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ea=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ea.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&+q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var fa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var la=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var O=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(q){return q.tableHandle||O.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var q=0;this.graph.isTableRow(this.state.cell)?q=1:this.graph.isTableCell(this.state.cell)&&(q=2);return q};var V=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=-function(){return V.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Y=null,ha=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Y&&(Y=mxCellRenderer.defaultShapes.tableLine);var q=ha.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Ta=[],Ra=0;Ra<Ga.length;Ra++){var Oa=Ga[Ra];Ta.push(null==Oa?null:new mxPoint((fa+Oa.x+wa)*R,(ka+Oa.y+ua)*-R))}return Ta},B=this,F=this.graph,L=F.model,R=F.view.scale,Z=this.state,ja=this.selectionBorder,fa=this.state.origin.x+F.view.translate.x,ka=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var va=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=L.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),Aa=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<va.length;L++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=-Ga<va.length-1?va[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Ta=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Aa[Ga]?new Y(Aa[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Ra=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=-0==Ra?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(Aa[Ga],0,Ra),this.shape.updateBoundsFromLine();else{var Sa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ra*R;this.shape.bounds.x=Z.x+(Ga==va.length-1?0:Sa.x*R);this.shape.bounds.width=Z.width-(Ga==va.length-1?0:Sa.width+Sa.x+R)}this.shape.redraw()}};var Oa=!1;ua.setPosition=function(Sa,Xa,kb){Ra=Math.max(Graph.minTableRowHeight-Sa.height,Xa.y-Sa.y-Sa.height);-Oa=mxEvent.isShiftDown(kb.getEvent());null!=Ta&&Oa&&(Ra=Math.min(Ra,Ta.height-Graph.minTableRowHeight))};ua.execute=function(Sa){if(0!=Ra)F.setTableRowHeight(this.state.cell,Ra,!Oa);else if(!B.blockDelayedSelection){var Xa=F.getCellAt(Sa.getGraphX(),Sa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(Xa,Sa)}Ra=0};ua.reset=function(){Ra=0}}q.push(ua)})(L);for(L=0;L<Ma.length;L++)mxUtils.bind(this,function(Ga){var wa=F.view.getState(Ma[Ga]),ua=F.getCellGeometry(Ma[Ga]),Ta=null!=ua.alternateBounds?-ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=Z.x+ua.x*R,wa.y=Z.y+ua.y*R,wa.width=Ta.width*R,wa.height=Ta.height*R,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Ra=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new Y(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",-null,ua);wa.tableHandle=!0;var Oa=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(Na[Ga],Oa,0),this.shape.updateBoundsFromLine();else{var Xa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ta.width+Oa)*R;this.shape.bounds.y=Z.y+(Ga==Ma.length-1?0:Xa.y*R);this.shape.bounds.height=-Z.height-(Ga==Ma.length-1?0:(Xa.height+Xa.y)*R)}this.shape.redraw()}};var Sa=!1;wa.setPosition=function(Xa,kb,tb){Oa=Math.max(Graph.minTableColumnWidth-Ta.width,kb.x-Xa.x-Ta.width);Sa=mxEvent.isShiftDown(tb.getEvent());null==Ra||Sa||(Oa=Math.min(Oa,Ra.width-Graph.minTableColumnWidth))};wa.execute=function(Xa){if(0!=Oa)F.setTableColumnWidth(this.state.cell,Oa,Sa);else if(!B.blockDelayedSelection){var kb=F.getCellAt(Xa.getGraphX(),Xa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(kb,Xa)}Oa=-0};wa.positionChanged=function(){};wa.reset=function(){Oa=0};q.push(wa)})(L)}}return null!=q?q.reverse():null};var ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){ia.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=+function(){return V.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Y=null,ha=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Y&&(Y=mxCellRenderer.defaultShapes.tableLine);var q=ha.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Fa,va,ua){for(var Ta=[],Ra=0;Ra<Fa.length;Ra++){var Oa=Fa[Ra];Ta.push(null==Oa?null:new mxPoint((ea+Oa.x+va)*R,(ka+Oa.y+ua)*+R))}return Ta},B=this,F=this.graph,L=F.model,R=F.view.scale,Z=this.state,ja=this.selectionBorder,ea=this.state.origin.x+F.view.translate.x,ka=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var xa=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<xa.length){var Ka=L.getChildCells(xa[0].cell,!0),Ha=F.getTableLines(this.state.cell,!1,!0),ya=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<xa.length;L++)mxUtils.bind(this,function(Fa){var va=xa[Fa],ua=null;if(F.isCellMovable(va.cell)){ua=+Fa<xa.length-1?xa[Fa+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Ta=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=ya[Fa]?new Y(ya[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(va,"row-resize",null,ua);ua.tableHandle=!0;var Ra=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=+0==Ra?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(ya[Fa],0,Ra),this.shape.updateBoundsFromLine();else{var Sa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ra*R;this.shape.bounds.x=Z.x+(Fa==xa.length-1?0:Sa.x*R);this.shape.bounds.width=Z.width-(Fa==xa.length-1?0:Sa.width+Sa.x+R)}this.shape.redraw()}};var Oa=!1;ua.setPosition=function(Sa,Xa,kb){Ra=Math.max(Graph.minTableRowHeight-Sa.height,Xa.y-Sa.y-Sa.height);+Oa=mxEvent.isShiftDown(kb.getEvent());null!=Ta&&Oa&&(Ra=Math.min(Ra,Ta.height-Graph.minTableRowHeight))};ua.execute=function(Sa){if(0!=Ra)F.setTableRowHeight(this.state.cell,Ra,!Oa);else if(!B.blockDelayedSelection){var Xa=F.getCellAt(Sa.getGraphX(),Sa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(Xa,Sa)}Ra=0};ua.reset=function(){Ra=0}}q.push(ua)})(L);for(L=0;L<Ka.length;L++)mxUtils.bind(this,function(Fa){var va=F.view.getState(Ka[Fa]),ua=F.getCellGeometry(Ka[Fa]),Ta=null!=ua.alternateBounds?+ua.alternateBounds:ua;null==va&&(va=new mxCellState(F.view,Ka[Fa],F.getCellStyle(Ka[Fa])),va.x=Z.x+ua.x*R,va.y=Z.y+ua.y*R,va.width=Ta.width*R,va.height=Ta.height*R,va.updateCachedBounds());ua=Fa<Ka.length-1?Ka[Fa+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Ra=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Ha[Fa]?new Y(Ha[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ja.isDashed;ua.svgStrokeTolerance++;va=new mxHandle(va,"col-resize",+null,ua);va.tableHandle=!0;var Oa=0;va.shape.node.parentNode.insertBefore(va.shape.node,va.shape.node.parentNode.firstChild);va.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==Y)this.shape.line=A(Ha[Fa],Oa,0),this.shape.updateBoundsFromLine();else{var Xa=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ta.width+Oa)*R;this.shape.bounds.y=Z.y+(Fa==Ka.length-1?0:Xa.y*R);this.shape.bounds.height=+Z.height-(Fa==Ka.length-1?0:(Xa.height+Xa.y)*R)}this.shape.redraw()}};var Sa=!1;va.setPosition=function(Xa,kb,tb){Oa=Math.max(Graph.minTableColumnWidth-Ta.width,kb.x-Xa.x-Ta.width);Sa=mxEvent.isShiftDown(tb.getEvent());null==Ra||Sa||(Oa=Math.min(Oa,Ra.width-Graph.minTableColumnWidth))};va.execute=function(Xa){if(0!=Oa)F.setTableColumnWidth(this.state.cell,Oa,Sa);else if(!B.blockDelayedSelection){var kb=F.getCellAt(Xa.getGraphX(),Xa.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(kb,Xa)}Oa=+0};va.positionChanged=function(){};va.reset=function(){Oa=0};q.push(va)})(L)}}return null!=q?q.reverse():null};var ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){ia.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=q?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var q=this.isMoveHandlesVisible();q&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():q||null==this.moveHandles||this.destroyMoveHandles();if(q&&null==this.moveHandles){for(q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].parentNode.removeChild(this.moveHandles[q]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var q=this.graph,A=q.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(L){if(null!=L&&A.isVertex(L.cell)&&q.isCellMovable(L.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=L;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.cell,Z);mxEvent.isPopupTrigger(Z)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z),@@ -2970,16 +2971,16 @@ function(q){return!mxEvent.isShiftDown(q.getEvent())};mxEdgeHandler.prototype.is4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return null==q.getState()&&!mxEvent.isMouseEvent(A)||mxEvent.isPopupTrigger(A)&&(null==q.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))}}else mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return mxEvent.isLeftMouseButton(A)&&(this.useLeftButtonForPanning&&null==q.getState()||mxEvent.isControlDown(A)&&!mxEvent.isShiftDown(A))||this.usePopupTrigger&&mxEvent.isPopupTrigger(A)};mxRubberband.prototype.isSpaceEvent=function(q){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(q.getEvent())||mxEvent.isMetaDown(q.getEvent()))&&mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(q,A){if(this.cancelled)this.cancelled=!1,A.consume();else{var B=null!=this.div&&"none"!=this.div.style.display,F=null,L=null,R=q=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,L=this.first.y,q=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-L)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(q=this.graph.snap(q),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(q)<this.graph.tolerance&&(q=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();-try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ja=this.graph.view.getState(Z[B]),fa=this.graph.getCellGeometry(Z[B]);null!=ja&&null!=fa&&(fa=fa.clone(),fa.translate(q,R),this.graph.model.setGeometry(Z[B],fa))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&+try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ja=this.graph.view.getState(Z[B]),ea=this.graph.getCellGeometry(Z[B]);null!=ja&&null!=ea&&(ea=ea.clone(),ea.translate(q,R),this.graph.model.setGeometry(Z[B],ea))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);q=mxUtils.getOffset(this.graph.container);B.x-=q.x;B.y-=q.y;q=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-q,L=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(L)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(q,B),this.isSpaceEvent(A)?(q=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/F)*F,this.height=this.graph.snap(this.height/F)*F,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=q-this.width),this.y<this.first.y&&(this.y=B-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)),A.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 na=(new Date).getTime(),ya=0,za=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,-A,B,F){za.apply(this,arguments);B!=this.currentTerminalState?(na=(new Date).getTime(),ya=0):ya=(new Date).getTime()-na;this.currentTerminalState=B};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:+"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var La=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);La.apply(this,arguments)};var na=(new Date).getTime(),za=0,Aa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,+A,B,F){Aa.apply(this,arguments);B!=this.currentTerminalState?(na=(new Date).getTime(),za=0):za=(new Date).getTime()-na;this.currentTerminalState=B};var Ma=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<za||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&Ma.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:null!=q&&null!=F?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(q,A,B,F){F=A==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Qa.apply(this,arguments)};var Ia=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ia.apply(this,-arguments)};var Ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ha.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=+HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Qa.apply(this,arguments)};var Ja=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ja.apply(this,+arguments)};var Ia=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ia.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=q.text&&null!=q.text.boundingBox?(A=q.text.unrotatedBoundingBox||q.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ra.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(q,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var q=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&q==mxConstants.NONE&&A==mxConstants.NONE?(q=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,q,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Va=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(q,A){Va.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 Wa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=@@ -2987,9 +2988,9 @@ function(q,A){Wa.apply(this,arguments);null!=this.rotationShape&&null!=this.rotathis.linkHint=null);else if(null!=q||null!=A&&0<A.length){var B=document.createElement("img");B.className="geAdaptiveAsset";B.setAttribute("src",Editor.editImage);B.setAttribute("title",mxResources.get("editLink"));B.setAttribute("width","14");B.setAttribute("height","14");B.style.paddingLeft="8px";B.style.marginLeft="auto";B.style.marginBottom="-1px";B.style.cursor="pointer";var F=B.cloneNode(!0);F.setAttribute("src",Editor.trashImage);F.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),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!=q){var L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.appendChild(this.graph.createLinkForHint(q,null,this.state.cell));this.linkHint.appendChild(L);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);L.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(ja){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ja)}));var Z=F.cloneNode(!0);L.appendChild(Z);mxEvent.addListener(Z,-"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ja,fa){var ka=document.createElement("div");ka.style.display="flex";ka.style.alignItems="center";ka.style.marginTop=null!=q||0<fa?"6px":"0px";ka.appendChild(this.graph.createLinkForHint(ja.getAttribute("href"),mxUtils.getTextContent(ja),this.state.cell));var va=B.cloneNode(!0);ka.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var Aa=-document.createElement("div");Aa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=Aa.getElementsByTagName("a")[fa];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,Aa.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ja.getAttribute("href")||-"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ka.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ka)})(A[L],L)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var $a=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=$a.apply(this,+"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ja,ea){var ka=document.createElement("div");ka.style.display="flex";ka.style.alignItems="center";ka.style.marginTop=null!=q||0<ea?"6px":"0px";ka.appendChild(this.graph.createLinkForHint(ja.getAttribute("href"),mxUtils.getTextContent(ja),this.state.cell));var xa=B.cloneNode(!0);ka.appendChild(xa);var Ka=mxUtils.bind(this,function(Ha){var ya=+document.createElement("div");ya.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Fa=ya.getElementsByTagName("a")[ea];if(null!=Fa){if(null==Ha||""==Ha){for(Ha=Fa.cloneNode(!0).firstChild;null!=Ha;)Fa.parentNode.insertBefore(Ha.cloneNode(!0),Fa),Ha=Ha.nextSibling;Fa.parentNode.removeChild(Fa)}else Fa.setAttribute("href",Ha);this.graph.labelChanged(this.state.cell,ya.innerHTML)}});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(Ha){this.graph.showLinkDialog(ja.getAttribute("href")||+"",mxResources.get("ok"),Ka);mxEvent.consume(Ha)}));xa=F.cloneNode(!0);ka.appendChild(xa);mxEvent.addListener(xa,"click",mxUtils.bind(this,function(Ha){Ka();mxEvent.consume(Ha)}));this.linkHint.appendChild(ka)})(A[L],L)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var $a=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=$a.apply(this,arguments);q.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return q};var db=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){db.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&(this.moveHandles[q].bounds.x=Math.round(this.moveHandles[q].rowState.x+this.moveHandles[q].rowState.width-this.moveHandles[q].bounds.width/2),this.moveHandles[q].bounds.y=Math.round(this.moveHandles[q].rowState.y+(this.moveHandles[q].rowState.height-this.moveHandles[q].bounds.height)/2),this.moveHandles[q].redraw());if(null!=this.cornerHandles){q=this.getSelectionBorderInset();var A=this.cornerHandles,B=A[0].bounds.height/2;A[0].bounds.x=this.state.x-A[0].bounds.width/2+q;A[0].bounds.y=this.state.y-B+q;A[0].redraw();A[1].bounds.x=A[0].bounds.x+this.state.width-2*q;A[1].bounds.y=A[0].bounds.y;A[1].redraw();A[2].bounds.x=A[0].bounds.x;A[2].bounds.y=this.state.y+this.state.height-2*q;A[2].redraw();A[3].bounds.x=A[1].bounds.x;A[3].bounds.y=A[2].bounds.y;A[3].redraw();for(q=0;q<this.cornerHandles.length;q++)this.cornerHandles[q].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",@@ -3092,13 +3093,13 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var p=this.addUnitInput(h,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){f.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var y=w.getElementsByTagName("input")[0];-this.addKeyHandler(p,X);this.addKeyHandler(k,X);var C=this.addGeometryHandler(p,function(H,S,ea){S=Math.max(1,b.fromUnit(S));if(e.isTableCell(ea))return e.setTableColumnWidth(ea,S-H.width,!0),!0;0<H.width&&(y.checked&&(H.height=Math.round(H.height*S*100/H.width)/100),H.width=S)});var D=this.addGeometryHandler(k,function(H,S,ea){S=Math.max(1,b.fromUnit(S));e.isTableCell(ea)&&(ea=g.getParent(ea));if(e.isTableRow(ea))return e.setTableRowHeight(ea,S-H.height),!0;0<H.height&&(y.checked&&(H.width=Math.round(H.width*+this.addKeyHandler(p,X);this.addKeyHandler(k,X);var C=this.addGeometryHandler(p,function(H,S,fa){S=Math.max(1,b.fromUnit(S));if(e.isTableCell(fa))return e.setTableColumnWidth(fa,S-H.width,!0),!0;0<H.width&&(y.checked&&(H.height=Math.round(H.height*S*100/H.width)/100),H.width=S)});var D=this.addGeometryHandler(k,function(H,S,fa){S=Math.max(1,b.fromUnit(S));e.isTableCell(fa)&&(fa=g.getParent(fa));if(e.isTableRow(fa))return e.setTableRowHeight(fa,S-H.height),!0;0<H.height&&(y.checked&&(H.width=Math.round(H.width*S*100/H.height)/100),H.height=S)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var G=this.addUnitInput(E,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),J=this.addUnitInput(E,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var M=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=e.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);M=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*K.x)/10},function(H){H=parseFloat(H);if(!isNaN(H)){g.beginUpdate();try{K=K.clone(),K.x=parseFloat(H)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var W=null;Q=this.addUnitInput(E,this.getUnit(),16,52,function(){W.apply(this,arguments)});W=this.addGeometryHandler(Q,function(H,S){H.y=b.fromUnit(S)})}else Q=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*K.y)/10},function(H){H=parseFloat(H);if(!isNaN(H)){g.beginUpdate();try{K=-K.clone(),K.y=parseFloat(H)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var X=mxUtils.bind(this,function(H,S,ea){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(ea||document.activeElement!=p)p.value=this.inUnit(d.width)+-" "+this.getUnit();if(ea||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==e.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){H=e.getCellGeometry(d.vertices[0]);E.style.display="";if(ea||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(ea||document.activeElement!=J)J.value=this.inUnit(d.y)+" "+this.getUnit();null!=H&&H.relative&&(null==M||!ea&&document.activeElement==M||(M.value=Math.round(1E3*H.x)/10+" %"),null==-Q||!ea&&document.activeElement==Q||(g.isEdge(g.getParent(d.vertices[0]))?Q.value=this.inUnit(H.y)+" "+this.getUnit():Q.value=Math.round(1E3*H.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(X)}});g.addListener(mxEvent.CHANGE,X);this.addKeyHandler(G,X);this.addKeyHandler(J,X);X();var T=this.addGeometryHandler(G,function(H,S){S=b.fromUnit(S);H.relative?(H.offset=null!=H.offset?H.offset:new mxPoint,H.offset.x=S):H.x=S});var N=this.addGeometryHandler(J,+K.clone(),K.y=parseFloat(H)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var X=mxUtils.bind(this,function(H,S,fa){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(fa||document.activeElement!=p)p.value=this.inUnit(d.width)++" "+this.getUnit();if(fa||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==e.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){H=e.getCellGeometry(d.vertices[0]);E.style.display="";if(fa||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(fa||document.activeElement!=J)J.value=this.inUnit(d.y)+" "+this.getUnit();null!=H&&H.relative&&(null==M||!fa&&document.activeElement==M||(M.value=Math.round(1E3*H.x)/10+" %"),null==+Q||!fa&&document.activeElement==Q||(g.isEdge(g.getParent(d.vertices[0]))?Q.value=this.inUnit(H.y)+" "+this.getUnit():Q.value=Math.round(1E3*H.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(X)}});g.addListener(mxEvent.CHANGE,X);this.addKeyHandler(G,X);this.addKeyHandler(J,X);X();var T=this.addGeometryHandler(G,function(H,S){S=b.fromUnit(S);H.relative?(H.offset=null!=H.offset?H.offset:new mxPoint,H.offset.x=S):H.x=S});var N=this.addGeometryHandler(J,function(H,S){S=b.fromUnit(S);H.relative?(H.offset=null!=H.offset?H.offset:new mxPoint,H.offset.y=S):H.y=S});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(K=e.getCellGeometry(d.vertices[0]),null!=K&&K.relative)){var ca=document.createElement("select");ca.style.position="absolute";ca.style.width="134px";ca.style.left="77px";m=document.createElement("option");m.setAttribute("value","none");m.setAttribute("title",mxResources.get("move"));mxUtils.write(m,mxResources.get("move")+"...");ca.appendChild(m);m=document.createElement("option");m.setAttribute("value","start");m.setAttribute("title",mxResources.get("linestart"));mxUtils.write(m,mxResources.get("linestart"));ca.appendChild(m);m=document.createElement("option");m.setAttribute("value","center");m.setAttribute("title",mxResources.get("center"));mxUtils.write(m,mxResources.get("center"));ca.appendChild(m);m=document.createElement("option");m.setAttribute("value","end");m.setAttribute("title",mxResources.get("lineend"));mxUtils.write(m,mxResources.get("lineend"));ca.appendChild(m);mxEvent.addListener(ca,"change",function(H){if("none"!=ca.value){g.beginUpdate();try{K=K.clone(),K.x="start"==ca.value?-1:"end"==ca.value?1:0,K.y=0,K.offset=new mxPoint,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}ca.value="none"});mxUtils.br(E);mxUtils.br(E);E.appendChild(ca)}a.appendChild(E)}};@@ -3124,23 +3125,23 @@ C),J=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isC);a.appendChild(C);var W,X,T,N;if(d.cellEditor.isContentEditing()){M.style.display="none";Q.style.display="none";K.style.display="none";y.style.display="none";var ca=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){document.execCommand("justifyfull",!1,null)},C);ca.style.marginRight="9px";var H=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C);H.style.marginLeft="10px";var S=g.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C);H.style.marginLeft="10px";D=C.cloneNode(!1);D.style.paddingTop="4px";C=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];C[C.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",J.style.marginRight=-"12px";C=m.cloneNode(!1);mxUtils.write(C,mxResources.get("position"));var ea=document.createElement("select");ea.style.left="114px";ea.style.width="98px";var la="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,+"12px";C=m.cloneNode(!1);mxUtils.write(C,mxResources.get("position"));var fa=document.createElement("select");fa.style.left="114px";fa.style.width="98px";var la="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<la.length;D++){var V=document.createElement("option");V.setAttribute("value",la[D]);mxUtils.write(V,mxResources.get(la[D]));ea.appendChild(V)}C.appendChild(ea);la=C.cloneNode(!1);mxUtils.write(la,mxResources.get("writingDirection"));var Y=ea.cloneNode(!1);V=["automatic","leftToRight","rightToLeft"];h.html&&(V.push("vertical-leftToRight"),+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<la.length;D++){var V=document.createElement("option");V.setAttribute("value",la[D]);mxUtils.write(V,mxResources.get(la[D]));fa.appendChild(V)}C.appendChild(fa);la=C.cloneNode(!1);mxUtils.write(la,mxResources.get("writingDirection"));var Y=fa.cloneNode(!1);V=["automatic","leftToRight","rightToLeft"];h.html&&(V.push("vertical-leftToRight"),V.push("vertical-rightToLeft"));var ha={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<V.length;D++){var ia=document.createElement("option");ia.setAttribute("value",V[D]);"vertical-"==V[D].substring(0,9)?mxUtils.write(ia,mxResources.get("vertical")+" ("+mxResources.get(V[D].substring(9))+")"):mxUtils.write(ia,mxResources.get(V[D]));-Y.appendChild(ia)}la.appendChild(Y);d.isEditing()||(a.appendChild(C),mxEvent.addListener(ea,"change",function(q){d.getModel().beginUpdate();try{var A=O[ea.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(la),mxEvent.addListener(Y,+Y.appendChild(ia)}la.appendChild(Y);d.isEditing()||(a.appendChild(C),mxEvent.addListener(fa,"change",function(q){d.getModel().beginUpdate();try{var A=O[fa.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(la),mxEvent.addListener(Y,"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ha[Y.value],h.cells);mxEvent.consume(q)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);C=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ta.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);q!=b(F)?A[B].style.fontSize=q+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ta,C,1,!0,Menus.prototype.defaultFontSize);C.style.display=ta.style.display;C.style.left="198px";"inherit"==h.style[mxConstants.STYLE_FONTSIZE]&&(ta.style.display="none",C.style.display="none");k.appendChild(C);var aa=null,P=d.shapeBackgroundColor,-ba=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Ja="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",na=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P==d.shapeBackgroundColor||P==Ja?"default":P},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,q,!1),g.fireEvent(new mxEventObject("styleChanged","keys",-[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[q],"cells",h.cells)))},"default",{install:function(q){aa=q},destroy:function(){aa=null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(q){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);na.style.fontWeight="bold";var ya=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,-"default",null,null,d.shapeForegroundColor);ya.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ma},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",-h.cells)))},"default",{install:function(q){ba=q},destroy:function(){ba=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){na.style.display=q==mxConstants.NONE?"none":"";ya.style.display=na.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,+ba=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var La="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",na=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P==d.shapeBackgroundColor||P==La?"default":P},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,q,!1),g.fireEvent(new mxEventObject("styleChanged","keys",+[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[q],"cells",h.cells)))},"default",{install:function(q){aa=q},destroy:function(){aa=null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(q){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);na.style.fontWeight="bold";var za=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,+"default",null,null,d.shapeForegroundColor);za.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ma},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",+h.cells)))},"default",{install:function(q){ba=q},destroy:function(){ba=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){na.style.display=q==mxConstants.NONE?"none":"";za.style.display=na.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,h.cells);d.updateLabelElements(h.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);"inherit"==h.style[mxConstants.STYLE_FONTCOLOR]&&(k.style.display="none");k.style.fontWeight="bold";p.appendChild(k);p.appendChild(na);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled",-"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(ya),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";C=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==A||d.getModel().isEdge(q)||d.isAutoSizeState(A)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,C);k.style.fontWeight="bold";0<C.length&&p.appendChild(k);+"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(za),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";C=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==A||d.getModel().isEdge(q)||d.isAutoSizeState(A)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,C);k.style.fontWeight="bold";0<C.length&&p.appendChild(k);C=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));C.style.fontWeight="bold";p.appendChild(C);C=d.view.getState(d.getSelectionCell());if(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=C&&null!=C.text&&null!=C.text.node&&0==C.text.node.getElementsByTagName("foreignObject").length)k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled","disabled");k=this.createCellOption(mxResources.get("lblToSvg"),"convertToSvg","0");k.style.fontWeight="bold";p.appendChild(k);if(!g.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.getElementsByTagName("span")[0].style.maxWidth="172px",k.appendChild(g.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/5165"));k=this.createPanel();k.style.height="86px";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);-var za=this.addUnitInput(k,this.getUnit(),87,52,function(){db.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),16,52,function(){$a.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Qa=this.addUnitInput(k,this.getUnit(),158,52,function(){Za.apply(this,arguments)},this.getUnitStep(),-null,null,this.isFloatUnit()),Ia=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ha=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ra=null,Da=null;+var Aa=this.addUnitInput(k,this.getUnit(),87,52,function(){db.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ma=this.addUnitInput(k,this.getUnit(),16,52,function(){$a.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Qa=this.addUnitInput(k,this.getUnit(),158,52,function(){Za.apply(this,arguments)},this.getUnitStep(),+null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ia=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ra=null,Da=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ra&&(d.cellEditor.restoreSelection(ra),ra=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&B==d.cellEditor.textarea){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var L=F.getRangeAt(0);B=document.createElement("div");B.appendChild(L.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();L=new Range;L.selectNodeContents(B);F.addRange(L)}}if(null!=B)for(B!=d.cellEditor.textarea&&f(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),L=0;L<B.length;L++)F.containsNode(B[L],!0)&&f(B[L],A)}q.value=A+" %"},function(q){Da=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);g.toolbar.addItems(["link","image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[g.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},p),g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(q){g.menus.addInsertTableItem(q,null,null,!1)})),null,Editor.tableImage,p)];k=this.createPanel();k.appendChild(this.createTitle(mxResources.get("insert")));@@ -3153,16 +3154,16 @@ mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=X){varmxResources.get("center"),function(){null!=X&&X.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=X&&X.setAttribute("align","right")},m)];C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Va=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(q){mxEvent.addListener(w[q],"click",function(){e(w[q],""==w[q].style.backgroundImage)})})(D);var Wa=mxUtils.bind(this,function(q,A,B){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);e(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);e(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);e(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));e(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);e(E,q==mxConstants.ALIGN_LEFT);e(G,q==mxConstants.ALIGN_CENTER);e(J,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);e(M,q==mxConstants.ALIGN_TOP);e(Q,q==mxConstants.ALIGN_MIDDLE);e(K,q==mxConstants.ALIGN_BOTTOM);-q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ea.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?+q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?Y.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?Y.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?Y.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&-(Y.value="vertical-rightToLeft"):Y.value="automatic";if(B||document.activeElement!=Ka)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ka.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=za)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),za.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ha)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ha.value=isNaN(q)?"":this.inUnit(q)+-" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Qa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var $a=this.installInputHandler(Ka,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var db=this.installInputHandler(za,mxConstants.STYLE_SPACING_TOP,-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var eb=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Za=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ta,Wa);this.addKeyHandler(Ka,Wa);this.addKeyHandler(za,-Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Qa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var gb=null,bb=!1;m=mxUtils.bind(this,function(){bb||(bb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=function(Aa,Ga){if(null!=Aa&&null!=Ga){if(Aa==Ga)return!0;if(Aa.length>-Ga.length+1)return Aa.substring(Aa.length-Ga.length-1,Aa.length)=="-"+Ga}return!1},B=function(Aa){if(null!=d.getParentByName(q,Aa,d.cellEditor.textarea))return!0;for(var Ga=q;null!=Ga&&1==Ga.childNodes.length;)if(Ga=Ga.childNodes[0],Ga.nodeName==Aa)return!0;return!1},F=function(Aa){for(;null!=Aa&&Aa!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(Aa).display)return Aa;Aa=Aa.parentNode}return null},L=mxUtils.getCurrentStyle(q),R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,-Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(L);if(window.getSelection)for(var ja=q.getElementsByTagName("*"),fa=window.getSelection(),ka=0;ka<ja.length&&(!fa.containsNode(ja[ka],!0)||null==ja[ka].style||(null==Z&&""!=ja[ka].style.fontSize&&(Z=parseFloat(ja[ka].style.fontSize)),null==R&&""!=ja[ka].style.lineHeight&&(R=ja[ka].style.lineHeight),null==Z||null==R));ka++);null==Z&&(Z=b(L));if(null==R)for(ja=q;null!=ja&&ja!=d.cellEditor.textarea.parentNode;){if(null!=ja.style&&""!=ja.style.lineHeight){R=-ja.style.lineHeight;break}ja=ja.parentNode}if(null!=L){e(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));e(w[1],"italic"==L.fontStyle||B("I")||B("EM"));e(w[2],"underline"==L.textDecorationLine||B("U"));e(W,"line-through"==L.textDecorationLine||B("STRIKE"));e(S,B("SUP"));e(H,B("SUB"));var va=F(q);if(null!=va){B=function(Aa,Ga){Na.push({name:Aa,dispName:Ga,type:"string",getValue:function(){return Ma[Aa]},valueChanged:function(wa,ua){var Ta=va.style,Ra=wa;parseInt(Ra)==Ra&&(Ra+="px",-null!=ua&&(ua.value=Ra));Ta[Aa]=Ra;""==wa&&null!=ua&&(ua.value=Ma[Aa])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,h,!0);null!=gb?gb.parentNode.replaceChild(B,gb):a.appendChild(B);gb=B}d.cellEditor.isTableSelected()?+(Y.value="vertical-rightToLeft"):Y.value="automatic";if(B||document.activeElement!=Ma)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ma.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Aa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),Aa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)++" "+this.getUnit();if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Qa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var $a=this.installInputHandler(Ma,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var db=this.installInputHandler(Aa,mxConstants.STYLE_SPACING_TOP,+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var eb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Za=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ta,Wa);this.addKeyHandler(Ma,Wa);this.addKeyHandler(Aa,+Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Ja,Wa);this.addKeyHandler(Qa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var gb=null,bb=!1;m=mxUtils.bind(this,function(){bb||(bb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=function(ya,Fa){if(null!=ya&&null!=Fa){if(ya==Fa)return!0;if(ya.length>+Fa.length+1)return ya.substring(ya.length-Fa.length-1,ya.length)=="-"+Fa}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Fa=q;null!=Fa&&1==Fa.childNodes.length;)if(Fa=Fa.childNodes[0],Fa.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},L=mxUtils.getCurrentStyle(q),R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,+Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(L);if(window.getSelection)for(var ja=q.getElementsByTagName("*"),ea=window.getSelection(),ka=0;ka<ja.length&&(!ea.containsNode(ja[ka],!0)||null==ja[ka].style||(null==Z&&""!=ja[ka].style.fontSize&&(Z=parseFloat(ja[ka].style.fontSize)),null==R&&""!=ja[ka].style.lineHeight&&(R=ja[ka].style.lineHeight),null==Z||null==R));ka++);null==Z&&(Z=b(L));if(null==R)for(ja=q;null!=ja&&ja!=d.cellEditor.textarea.parentNode;){if(null!=ja.style&&""!=ja.style.lineHeight){R=+ja.style.lineHeight;break}ja=ja.parentNode}if(null!=L){e(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));e(w[1],"italic"==L.fontStyle||B("I")||B("EM"));e(w[2],"underline"==L.textDecorationLine||B("U"));e(W,"line-through"==L.textDecorationLine||B("STRIKE"));e(S,B("SUP"));e(H,B("SUB"));var xa=F(q);if(null!=xa){B=function(ya,Fa){Ha.push({name:ya,dispName:Fa,type:"string",getValue:function(){return Ka[ya]},valueChanged:function(va,ua){var Ta=xa.style,Ra=va;parseInt(Ra)==Ra&&(Ra+="px",+null!=ua&&(ua.value=Ra));Ta[ya]=Ra;""==va&&null!=ua&&(ua.value=Ka[ya])}})};var Ka=mxUtils.getCurrentStyle(xa),Ha=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Ha,h,!0);null!=gb?gb.parentNode.replaceChild(B,gb):a.appendChild(B);gb=B}d.cellEditor.isTableSelected()?(e(ca,A(L.textAlign,"justify")),e(E,A(L.textAlign,"left")),e(G,A(L.textAlign,"center")),e(J,A(L.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(L.textAlign,"justify")?(e(ca,A(L.textAlign,"justify")),e(E,!1),e(G,!1),e(J,!1)):(e(ca,!1),e(E,B==mxConstants.ALIGN_LEFT),e(G,B==mxConstants.ALIGN_CENTER),e(J,B==mxConstants.ALIGN_RIGHT)));X=d.getParentByName(q,"TABLE",d.cellEditor.textarea);N=null==X?null:d.getParentByName(q,"TR",X);T=null==X?null:d.getParentByNames(q,["TD","TH"],X);Va.style.display=null!=X?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?Da.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?Da.value="120 %":Da.value=Math.round(100*A)+" %"));null!=ba&&(ma=d.getTextColor(q,!0),ba(ma,!0));null!=aa&&(P=d.getTextColor(q,!1),aa(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(L.fontFamily))}}bb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);@@ -3189,10 +3190,10 @@ G=null!=G?G.split(","):null;for(var M=0;M<E.length;M++){var Q=E[M].replace(/([a-StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi.getSelectionState(),b=[];if(null!=a.customProperties)for(var f in a.customProperties){var e=a.customProperties[f];null!=e&&"color"==e.type&&e.primary&&b.push({title:e.dispName,defaultValue:null==e.defVal?"#000000":e.defVal,key:e.name})}a.swimlane&&(a=this.editorUi.editor.graph,b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default",defaultColorValue:a.shapeBackgroundColor}));return b};StyleFormatPanel.prototype.addStroke=function(a){function b(P){var ba=e.fromUnit(parseFloat(M.value));ba=Math.min(999,Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));M.value=e.inUnit(ba)+" "+e.getUnit();mxEvent.consume(P)}function f(P){var ba=e.fromUnit(parseFloat(Q.value));ba=Math.min(999,Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));Q.value=e.inUnit(ba)+" "+e.getUnit();mxEvent.consume(P)}var e=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var p=document.createElement("select");-p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var ba=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var Ja=0;Ja<ba.length;Ja++)d.setCellStyles(ba[Ja],-ma[Ja],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||-P==mxConstants.NONE){P=[];for(var ba=0;ba<h.cells.length;ba++)(d.isTableCell(h.cells[ba])||d.isTableRow(h.cells[ba]))&&P.push(h.cells[ba]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(P,ba,ma,Ja,na){P=this.editorUi.menus.styleChange(P,"",Ja,na,"",null);Ja=document.createElement("div");na=ma.split(" ");2==na.length?(ma=parseInt(na[0])+parseInt(na[1]),-na=parseInt(na[0])/ma*100,Ja.style.borderBottomStyle="none",Ja.style.backgroundImage="linear-gradient(to right, black "+na+"%, transparent 0%)",Ja.style.backgroundSize=ma+"px 1px"):Ja.style.borderBottomStyle=ma;P.firstChild.firstChild.className="geStyleMenuItem";P.firstChild.firstChild.style.width=ba+"px";P.firstChild.firstChild.appendChild(Ja);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",+p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var ba=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var La=0;La<ba.length;La++)d.setCellStyles(ba[La],+ma[La],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||+P==mxConstants.NONE){P=[];for(var ba=0;ba<h.cells.length;ba++)(d.isTableCell(h.cells[ba])||d.isTableRow(h.cells[ba]))&&P.push(h.cells[ba]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(P,ba,ma,La,na){P=this.editorUi.menus.styleChange(P,"",La,na,"",null);La=document.createElement("div");na=ma.split(" ");2==na.length?(ma=parseInt(na[0])+parseInt(na[1]),+na=parseInt(na[0])/ma*100,La.style.borderBottomStyle="none",La.style.backgroundImage="linear-gradient(to right, black "+na+"%, transparent 0%)",La.style.backgroundSize=ma+"px 1px"):La.style.borderBottomStyle=ma;P.firstChild.firstChild.className="geStyleMenuItem";P.firstChild.firstChild.style.width=ba+"px";P.firstChild.firstChild.appendChild(La);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,C),G=C.cloneNode(!1),J=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var ba=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",ba,[null,null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",ba,["link",null,null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",ba,["flexArrow",null,null,null,null],@@ -3235,20 +3236,20 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STY"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),P.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)})),"",null,k);J.style.width="67px";J.style.marginRight="2px";w.style.width="67px";w.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";X.style.width="67px";X.style.marginRight="2px";T.style.width="67px";T.style.marginRight="2px";this.addArrow(J).appendChild(document.createElement("div"));this.addArrow(W).appendChild(document.createElement("div"));this.addArrow(X);this.addArrow(T);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var N=document.createElement("div");N.className="gePatternPreview";N.style.width="100px";N.style.borderBottomStyle="solid";E.appendChild(N);var ca=document.createElement("div");ca.className="gePatternPreview";ca.style.width="36px";ca.style.borderBottomStyle="solid";w.appendChild(ca);a.appendChild(u);a.appendChild(G);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop="2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";-mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var H=this.addUnitInput(u,this.getUnit(),82,52,function(){Y.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),S=this.addUnitInput(u,this.getUnit(),16,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var ea=this.addUnitInput(u,+mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var H=this.addUnitInput(u,this.getUnit(),82,52,function(){Y.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),S=this.addUnitInput(u,this.getUnit(),16,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var fa=this.addUnitInput(u,this.getUnit(),82,52,function(){ha.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),la=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize="10px";this.addLabel(u,mxResources.get("lineend"),16,62).style.fontSize="10px";mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,-mxResources.get("perimeter"));m.appendChild(w);var O=this.addUnitInput(m,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var V=mxUtils.bind(this,function(P,ba,ma){function Ja(na,ya,za,Ka){za=za.getElementsByTagName("div")[0];null!=za&&g.updateCssForMarker(za,Ka,h.style.shape,na,ya);return za}h=g.getSelectionState();if(ma||+mxResources.get("perimeter"));m.appendChild(w);var O=this.addUnitInput(m,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var V=mxUtils.bind(this,function(P,ba,ma){function La(na,za,Aa,Ma){Aa=Aa.getElementsByTagName("div")[0];null!=Aa&&g.updateCssForMarker(Aa,Ma,h.style.shape,na,za);return Aa}h=g.getSelectionState();if(ma||document.activeElement!=M)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),M.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=Q)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),Q.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();p.style.visibility="connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape||"pipe"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");N.style.borderBottom="1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),ba=String(P).split(" "),2<=ba.length?(P=parseInt(ba[0])+parseInt(ba[1]),ba=parseInt(ba[0])/P*100,N.style.borderBottom="1px solid transparent",N.style.backgroundImage="linear-gradient(to right, black "+ba+"%, transparent 0%)",N.style.backgroundPosition="bottom left",N.style.backgroundSize=P+"px 1px",N.style.backgroundRepeat="repeat-x"):N.style.borderBottom="1px dashed black");ca.style.backgroundImage=N.style.backgroundImage;ca.style.backgroundPosition=N.style.backgroundPosition;ca.style.backgroundSize=N.style.backgroundSize;ca.style.backgroundRepeat=N.style.backgroundRepeat;ca.style.borderBottom=N.style.borderBottom;P=W.getElementsByTagName("div")[1];null!=P&&(ba=mxUtils.getValue(h.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(h.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ba=null),"orthogonalEdgeStyle"==ba&&"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?P.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ba||"none"==ba||null==ba?P.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ba?P.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ba?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalElbowImage.src+")":P.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ba?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":P.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":P.style.backgroundImage="url("+Format.orthogonalImage.src+")");P=J.getElementsByTagName("div")[1];null!=P&&(P.style.backgroundImage="link"==h.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.style.shape?"url("+Format.arrowImage.src+")":"arrow"==h.style.shape?"url("+Format.simpleArrowImage.src+")":"filledEdge"==h.style.shape?"url("+Format.filledEdgeImage.src+")":"pipe"==h.style.shape?"url("+Format.pipeEdgeImage.src+")":"wire"==h.style.shape?"url("+Format.wireEdgeImage.src+")":"url("+Format.connectionImage.src+")");h.edges.length==h.cells.length?(G.style.display="",C.style.display="none"):(G.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<h.edges.length&&0==h.vertices.length&&-h.lineJumps&&(a.style.borderBottomStyle="none");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),X,"start");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),T,"end");mxUtils.setOpacity(W,"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&"pipe"!=h.style.shape&&(mxUtils.setOpacity(X,30),mxUtils.setOpacity(T,-30));if(ma||document.activeElement!=H)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),H.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=ea)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ea.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=S)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),S.value=isNaN(P)?-"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=ea)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),la.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=O)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,0)),O.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit()});var Y=this.installInputHandler(H,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),-!0);var ha=this.installInputHandler(ea,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ia=this.installInputHandler(S,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ta=this.installInputHandler(la,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var aa=this.installInputHandler(O,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),-null,this.isFloatUnit(),!0);this.addKeyHandler(M,V);this.addKeyHandler(H,V);this.addKeyHandler(ea,V);this.addKeyHandler(S,V);this.addKeyHandler(la,V);this.addKeyHandler(O,V);d.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){d.getModel().removeListener(V)}});V();return a};+h.lineJumps&&(a.style.borderBottomStyle="none");La(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),X,"start");La(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),T,"end");mxUtils.setOpacity(W,"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&"pipe"!=h.style.shape&&(mxUtils.setOpacity(X,30),mxUtils.setOpacity(T,+30));if(ma||document.activeElement!=H)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),H.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=fa)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),fa.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=S)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),S.value=isNaN(P)?+"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=fa)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),la.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=O)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,0)),O.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit()});var Y=this.installInputHandler(H,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),+!0);var ha=this.installInputHandler(fa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ia=this.installInputHandler(S,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ta=this.installInputHandler(la,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var aa=this.installInputHandler(O,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),+null,this.isFloatUnit(),!0);this.addKeyHandler(M,V);this.addKeyHandler(H,V);this.addKeyHandler(fa,V);this.addKeyHandler(S,V);this.addKeyHandler(la,V);this.addKeyHandler(O,V);d.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){d.getModel().removeListener(V)}});V();return a};StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.height="22px";if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.display="flex";a.style.alignItems="center";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="72px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];for(var h=0;h<g.length;h++){var m=document.createElement("option");m.setAttribute("value",g[h]);mxUtils.write(m,mxResources.get(g[h]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(w)});mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});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=mxUtils.bind(this,function(w,y,C){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,"jumpStyle","none");if(C||document.activeElement!=p)w=parseInt(mxUtils.getValue(e.style,@@ -3268,15 +3269,15 @@ k.style.width="100%";var w=document.createElement("select");w.style.width="82px"function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;C.ignoreImage=!0;C.adaptiveColors=w.value;f.model.execute(C)});p.appendChild(w);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&p.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"));h.appendChild(m);h.appendChild(p);d.appendChild(h);k=this.getGlobalStyleButtons();for(u=0;u<k.length;u+=2){m=m.cloneNode(!1);p=p.cloneNode(!1);h=h.cloneNode(!1);var y=k[u];y.style.width="100%";m.appendChild(y);h.appendChild(m);y=k[u+1];null!=y&&(y.style.width="100%",p.appendChild(y));h.appendChild(p);d.appendChild(h)}g.appendChild(d);e.appendChild(g);a.appendChild(e);f.isEnabled()&&null!=Editor.styles&&this.addGraphStyles(a)}return a};DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";var h=mxUtils.bind(this,function(W,X){var T=f.getVerticesAndEdges();e.beginUpdate();try{for(var N=0;N<T.length;N++){var ca=f.getCellStyle(T[N]);p||null==ca.labelBackgroundColor?p&&f.updateCellStyles({labelBackgroundColor:mxConstants.NONE},[T[N]]):f.updateCellStyles({labelBackgroundColor:null!=-X?X.background:null},[T[N]]);for(var H=e.isEdge(T[N]),S=e.getStyle(T[N]),ea=H?f.currentEdgeStyle:f.currentVertexStyle,la=0;la<W.length;la++)if(null!=ca[W[la]]&&ca[W[la]]!=mxConstants.NONE||W[la]!=mxConstants.STYLE_FILLCOLOR&&W[la]!=mxConstants.STYLE_STROKECOLOR)S=p&&H&&W[la]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(S,W[la],"default"):mxUtils.setStyle(S,W[la],ea[W[la]]);e.setStyle(T[N],S)}}finally{e.endUpdate()}}),m=mxUtils.bind(this,function(W,X,T){if(null!=W)for(var N=0;N<X.length;N++)if(null!=+X?X.background:null},[T[N]]);for(var H=e.isEdge(T[N]),S=e.getStyle(T[N]),fa=H?f.currentEdgeStyle:f.currentVertexStyle,la=0;la<W.length;la++)if(null!=ca[W[la]]&&ca[W[la]]!=mxConstants.NONE||W[la]!=mxConstants.STYLE_FILLCOLOR&&W[la]!=mxConstants.STYLE_STROKECOLOR)S=p&&H&&W[la]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(S,W[la],"default"):mxUtils.setStyle(S,W[la],fa[W[la]]);e.setStyle(T[N],S)}}finally{e.endUpdate()}}),m=mxUtils.bind(this,function(W,X,T){if(null!=W)for(var N=0;N<X.length;N++)if(null!=W[X[N]]&&W[X[N]]!=mxConstants.NONE||X[N]!=mxConstants.STYLE_FILLCOLOR&&X[N]!=mxConstants.STYLE_STROKECOLOR)W[X[N]]=T[X[N]]}),p=!0,k=mxUtils.bind(this,function(W,X,T,N,ca){if(null!=W){null!=T&&(p||null==X.labelBackgroundColor?p&&(X.labelBackgroundColor=mxConstants.NONE):(N=null!=N?N.background:null,ca=null!=ca?ca:f,null==N&&(N=ca.background),null==N&&(N=ca.defaultPageBackgroundColor),X.labelBackgroundColor=N));for(var H in W)if(null==T||null!=X[H]&&X[H]!=mxConstants.NONE||H!=mxConstants.STYLE_FILLCOLOR&&H!=mxConstants.STYLE_STROKECOLOR)p&&e.isEdge(T)&&H==mxConstants.STYLE_FONTCOLOR?X[H]="default":X[H]=W[H]}}),u=mxUtils.bind(this,function(W,X,T,N,ca){var H=document.createElement("div");H.style.position="relative";H.style.pointerEvents="none";H.style.width="60px";H.style.height="60px";ca.appendChild(H);var S=new Graph(H,null,null,f.getStylesheet());S.shapeForegroundColor="light-dark(#000000, #c0c0c0)";S.shapeBackgroundColor="light-dark(var(--ge-panel-color), var(--ge-dark-panel-color))";S.resetViewOnRootChange=-!1;S.foldingEnabled=!1;S.gridEnabled=!1;S.autoScroll=!1;S.setTooltips(!1);S.setConnectable(!1);S.setPanning(!1);S.setEnabled(!1);S.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(f.getCellStyle.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N,S);k(ia,Y,O,N,S);V&&(Y=f.postProcessCellStyle(O,Y));return Y};S.model.beginUpdate();try{var ea=S.insertVertex(S.getDefaultParent(),null,"Shape",2,2,-56,30,"strokeWidth=2;"),la=S.insertEdge(S.getDefaultParent(),null,"Connector",ea,ea,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");la.geometry.points=[new mxPoint(28,46)];la.geometry.offset=new mxPoint(0,8)}finally{S.model.endUpdate()}ca=S.view.getDrawPane().ownerSVGElement;null!=ca&&(H=ca.cloneNode(!0),H.style.position="absolute",H.style.clipPath="rect(0 52% 100% 0)",ca.style.clipPath="rect(0 100% 100% 51%)",ca.style.colorScheme="light",ca.parentNode.appendChild(H))}),+!1;S.foldingEnabled=!1;S.gridEnabled=!1;S.autoScroll=!1;S.setTooltips(!1);S.setConnectable(!1);S.setPanning(!1);S.setEnabled(!1);S.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(f.getCellStyle.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N,S);k(ia,Y,O,N,S);V&&(Y=f.postProcessCellStyle(O,Y));return Y};S.model.beginUpdate();try{var fa=S.insertVertex(S.getDefaultParent(),null,"Shape",2,2,+56,30,"strokeWidth=2;"),la=S.insertEdge(S.getDefaultParent(),null,"Connector",fa,fa,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");la.geometry.points=[new mxPoint(28,46)];la.geometry.offset=new mxPoint(0,8)}finally{S.model.endUpdate()}ca=S.view.getDrawPane().ownerSVGElement;null!=ca&&(H=ca.cloneNode(!0),H.style.position="absolute",H.style.clipPath="rect(0 52% 100% 0)",ca.style.clipPath="rect(0 100% 100% 51%)",ca.style.colorScheme="light",ca.parentNode.appendChild(H))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var y=mxUtils.bind(this,function(W,X,T,N,ca){var H=this.format.cachedStyleEntries[ca];null==H&&(H=document.createElement("div"),H.className="geGraphStylePreview",p||null==N||null==N.background||(H.style.backgroundColor=N.background),u(W,X,T,N,H),mxEvent.addGestureListeners(H,mxUtils.bind(this,function(S){H.style.opacity=.6}),null,mxUtils.bind(this,-function(S){H.style.opacity="";f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);k(W,f.currentVertexStyle);k(W,f.currentEdgeStyle);k(X,f.currentVertexStyle);k(T,f.currentEdgeStyle);e.beginUpdate();try{var ea=d.slice(),la;for(la in W)ea.push(la);h(ea,N);if(!p){var O=new ChangePageSetup(b,null!=N?N.background:null);O.ignoreImage=!0;e.execute(O);e.execute(new ChangeGridColor(b,null!=N&&null!=N.gridColor?N.gridColor:g))}}finally{e.endUpdate()}})),-mxClient.IS_TOUCH||(mxEvent.addListener(H,"mouseenter",mxUtils.bind(this,function(S){var ea=f.getCellStyle;S=f.background;var la=f.view.gridColor;p||(f.background=null!=N?N.background:null,f.view.gridColor=null!=N&&null!=N.gridColor?N.gridColor:g);f.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(ea.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N);k(ia,Y,O,N);V&&(Y=this.postProcessCellStyle(O,-Y));return Y};f.refresh();f.getCellStyle=ea;f.background=S;f.view.gridColor=la})),mxEvent.addListener(H,"mouseleave",mxUtils.bind(this,function(S){f.refresh()}))),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ca]=H));w.appendChild(H)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");+function(S){H.style.opacity="";f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);k(W,f.currentVertexStyle);k(W,f.currentEdgeStyle);k(X,f.currentVertexStyle);k(T,f.currentEdgeStyle);e.beginUpdate();try{var fa=d.slice(),la;for(la in W)fa.push(la);h(fa,N);if(!p){var O=new ChangePageSetup(b,null!=N?N.background:null);O.ignoreImage=!0;e.execute(O);e.execute(new ChangeGridColor(b,null!=N&&null!=N.gridColor?N.gridColor:g))}}finally{e.endUpdate()}})),+mxClient.IS_TOUCH||(mxEvent.addListener(H,"mouseenter",mxUtils.bind(this,function(S){var fa=f.getCellStyle;S=f.background;var la=f.view.gridColor;p||(f.background=null!=N?N.background:null,f.view.gridColor=null!=N&&null!=N.gridColor?N.gridColor:g);f.getCellStyle=function(O,V){V=null!=V?V:!0;var Y=mxUtils.clone(fa.apply(this,arguments)),ha=f.stylesheet.getDefaultVertexStyle(),ia=X;e.isEdge(O)&&(ha=f.stylesheet.getDefaultEdgeStyle(),ia=T);m(Y,d,ha);k(W,Y,O,N);k(ia,Y,O,N);V&&(Y=this.postProcessCellStyle(O,+Y));return Y};f.refresh();f.getCellStyle=fa;f.background=S;f.view.gridColor=la})),mxEvent.addListener(H,"mouseleave",mxUtils.bind(this,function(S){f.refresh()}))),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ca]=H));w.appendChild(H)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");for(var W=10*this.format.currentStylePage;W<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);W++){var X=Editor.styles[W];y(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,W)}}),G=mxUtils.bind(this,function(W){0<=W&&W<C&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=W,E())});if(1<C){var J=document.createElement("div");J.className="geSwitcher";J.style.width="200px";for(var M=0;M<C;M++){var Q=document.createElement("div");Q.className="geSwitcherDot";mxUtils.bind(this,function(W,X){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(W)}))})(M,Q);J.appendChild(Q);D.push(Q)}a.appendChild(J);E();if(15>C&&0<D.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var K=M.cloneNode(!1);K.style.backgroundImage="url("+Editor.chevronRightImage+")";J.insertBefore(M,D[0]);J.appendChild(K);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}))}}else E();return a};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;@@ -3299,14 +3300,14 @@ function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListDiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}function y(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function J(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function K(){mxActor.call(this)}function W(){mxActor.call(this)}function X(){mxActor.call(this)}function T(){mxActor.call(this)}function N(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,N.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,N.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,N.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,N.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,-N.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,N.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function ea(){mxActor.call(this)}function la(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function ia(){mxShape.call(this)}function ta(){mxEllipse.call(this)}-function aa(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ja(){mxShape.call(this)}function na(){mxShape.call(this)}function ya(){mxShape.call(this)}function za(){mxShape.call(this)}function Ka(){mxCylinder.call(this)}function Qa(){mxCylinder.call(this)}function Ia(){mxRectangleShape.call(this)}function Ha(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);+N.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,N.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function ia(){mxShape.call(this)}function ta(){mxEllipse.call(this)}+function aa(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function La(){mxShape.call(this)}function na(){mxShape.call(this)}function za(){mxShape.call(this)}function Aa(){mxShape.call(this)}function Ma(){mxCylinder.call(this)}function Qa(){mxCylinder.call(this)}function Ja(){mxRectangleShape.call(this)}function Ia(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);this.spacing=0}function Wa(){mxActor.call(this)}function $a(){mxRectangleShape.call(this)}function db(){mxActor.call(this)}function pb(){mxActor.call(this)}function eb(){mxActor.call(this)}function Za(){mxActor.call(this)}function gb(){mxActor.call(this)}function bb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function L(){mxEllipse.call(this)}-function R(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ja(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+function R(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ja(){mxRhombus.call(this)}function ea(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function ya(){mxActor.call(this)}function Fa(){mxActor.call(this)}function va(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Ta(){mxConnector.call(this)}function Ra(c,l,t,n,r,v,x,I,z,da){x+=z;var U=n.clone();n.x-=r*(2*x+z);n.y-=v*(2*x+z);r*=x+z;v*=x+z;return function(){c.ellipse(U.x-r-x,U.y-v-x,2*x,2*x);da?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var x=l[v];null!=x&&(null==r?c.moveTo(x.x+t,x.y+n):null!=r&&c.lineTo(x.x+t,x.y+n));r=x}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=0;n<this.line.length&&!l;n++){var r=this.line[n];null!=r&&null!=t&&(l=mxUtils.rectangleIntersectsSegment(c,t,r));t=r}return l};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,l,t,n,r){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,x=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&I<r||!x&&I<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=x;x=I}c.rotate(-this.getShapeRotation(),+!1,x=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?xa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&I<r||!x&&I<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=x;x=I}c.rotate(-this.getShapeRotation(),v,x,l+n/2,t+r/2);s=this.scale;l=this.bounds.x/s;t=this.bounds.y/s;n=this.bounds.width/s;r=this.bounds.height/s;this.paintTableForeground(c,l,t,n,r)}};b.prototype.paintTableForeground=function(c,l,t,n,r){n=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(r=0;r<n.length;r++)a.prototype.paintTableLine(c,n[r],l,t)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(v,r);c.lineTo(0,r-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-v,0),c.lineTo(n,v),c.lineTo(v,@@ -3352,14 +3353,14 @@ function(){return!1};ca.prototype.getLabelBounds=function(c){if(mxUtils.getValue100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};ca.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",ca);mxCellRenderer.registerShape("process2",ca);mxUtils.extend(H,mxRectangleShape);H.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};H.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",H);mxUtils.extend(S,mxHexagon);S.prototype.size=30;S.prototype.position=.5;S.prototype.position2=.5;S.prototype.base=20;S.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",S);mxUtils.extend(ea,-mxActor);ea.prototype.size=.2;ea.prototype.fixedSize=20;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n--l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",ea);mxUtils.extend(la,mxHexagon);la.prototype.size=.25;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",S);mxUtils.extend(fa,+mxActor);fa.prototype.size=.2;fa.prototype.fixedSize=20;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-+l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",fa);mxUtils.extend(la,mxHexagon);la.prototype.size=.25;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,.5*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",la);mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",O);var mb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,t,n,r){mb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),mb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var I=this.style["symbol"+v+"Align"],-z=this.style["symbol"+v+"VerticalAlign"],da=this.style["symbol"+v+"Width"],U=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ua=this.style["symbol"+v+"VSpacing"]||Fa,Pa=this.style["symbol"+v+"ArcSpacing"];null!=Pa&&(Pa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Pa,Ua+=Pa);Pa=l;var oa=t;Pa=I==mxConstants.ALIGN_CENTER?Pa+(n-da)/2:I==mxConstants.ALIGN_RIGHT?Pa+(n-da-Fa):Pa+Fa;oa=z==mxConstants.ALIGN_MIDDLE?oa+(r-U)/2:z==mxConstants.ALIGN_BOTTOM?oa+(r-U-Ua):oa++z=this.style["symbol"+v+"VerticalAlign"],da=this.style["symbol"+v+"Width"],U=this.style["symbol"+v+"Height"],Ga=this.style["symbol"+v+"Spacing"]||0,Ua=this.style["symbol"+v+"VSpacing"]||Ga,Pa=this.style["symbol"+v+"ArcSpacing"];null!=Pa&&(Pa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Ga+=Pa,Ua+=Pa);Pa=l;var oa=t;Pa=I==mxConstants.ALIGN_CENTER?Pa+(n-da)/2:I==mxConstants.ALIGN_RIGHT?Pa+(n-da-Ga):Pa+Ga;oa=z==mxConstants.ALIGN_MIDDLE?oa+(r-U)/2:z==mxConstants.ALIGN_BOTTOM?oa+(r-U-Ua):oa+Ua;c.save();I=new x;I.style=this.style;x.prototype.paintVertexShape.call(I,c,Pa,oa,da,U);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",V);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ha);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",ia);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ta);mxUtils.extend(aa,mxShape);aa.prototype.paintVertexShape=@@ -3377,19 +3378,19 @@ l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixez,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I)]):(r=r?Math.max(0,Math.min(.5*z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z,I),new mxPoint(x+z-r,I+da),new mxPoint(x,I+da),new mxPoint(x+r,I)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+z?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?W.prototype.fixedSize:W.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z-r,I),new mxPoint(x+z,I+da),new mxPoint(x,I+da),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+z,I),new mxPoint(x+z-r,I+da),new mxPoint(x+r,I+da),new mxPoint(x,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(x+z,I),new mxPoint(x+z,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+z,I+r),new mxPoint(x+z,I+da-r),new mxPoint(x,-I+da),new mxPoint(x,I)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+z?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ea.prototype.fixedSize:ea.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height,U=c.getCenterX();+I+da),new mxPoint(x,I)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+z?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?fa.prototype.fixedSize:fa.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height,U=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+z-r,I),new mxPoint(x+z,c),new mxPoint(x+z-r,I+da),new mxPoint(x,I+da),new mxPoint(x+r,c),new mxPoint(x,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z,I),new mxPoint(x+z-r,c),new mxPoint(x+z,I+da),new mxPoint(x+r,I+da),new mxPoint(x,c),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(U,I),new mxPoint(x+z,I+r),new mxPoint(x+z,I+da),new mxPoint(U,I+da-r),new mxPoint(x,I+da),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(U,I+r),new mxPoint(x+z,I),new mxPoint(x+z,I+da-r),new mxPoint(U,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I)]);U=new mxPoint(U,c);n&&(t.x<x||t.x>x+z?U.y=t.y:U.x=t.x);return mxUtils.getPerimeterPoint(I,U,t)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?la.prototype.fixedSize:la.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,z=c.width,da=c.height,U=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),I=[new mxPoint(U,I),new mxPoint(x+z,I+r),new mxPoint(x+z,I+da-r),new mxPoint(U,I+da),new mxPoint(x,I+da-r),new mxPoint(x,I+r),new mxPoint(U,I)]):(r=r?Math.max(0,Math.min(z,v)):z*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+z-r,I),new mxPoint(x+z,c),new mxPoint(x+z-r,I+da),new mxPoint(x+-r,I+da),new mxPoint(x,c),new mxPoint(x+r,I)]);U=new mxPoint(U,c);n&&(t.x<x||t.x>x+z?U.y=t.y:U.x=t.x);return mxUtils.getPerimeterPoint(I,U,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Ja,mxShape);Ja.prototype.size=10;Ja.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};-mxCellRenderer.registerShape("lollipop",Ja);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.inset=2;na.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};-mxCellRenderer.registerShape("requires",na);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(za,mxShape);za.prototype.inset=2;za.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();-c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",za);mxUtils.extend(Ka,mxCylinder);Ka.prototype.jettyWidth=20;Ka.prototype.jettyHeight=10;Ka.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=Math.min(l,r-l),z=Math.min(I+2*l,r-l);v?(c.moveTo(t,I),-c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,z),c.lineTo(x,z),c.lineTo(x,z+l),c.lineTo(t,z+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,z+l),c.lineTo(0,z+l),c.lineTo(0,z),c.lineTo(t,z),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ka);mxUtils.extend(Qa,mxCylinder);Qa.prototype.jettyWidth=32;Qa.prototype.jettyHeight=12;Qa.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,+r,I+da),new mxPoint(x,c),new mxPoint(x+r,I)]);U=new mxPoint(U,c);n&&(t.x<x||t.x>x+z?U.y=t.y:U.x=t.x);return mxUtils.getPerimeterPoint(I,U,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(La,mxShape);La.prototype.size=10;La.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};+mxCellRenderer.registerShape("lollipop",La);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.inset=2;na.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};+mxCellRenderer.registerShape("requires",na);mxUtils.extend(za,mxShape);za.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",za);mxUtils.extend(Aa,mxShape);Aa.prototype.inset=2;Aa.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();+c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Aa);mxUtils.extend(Ma,mxCylinder);Ma.prototype.jettyWidth=20;Ma.prototype.jettyHeight=10;Ma.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=Math.min(l,r-l),z=Math.min(I+2*l,r-l);v?(c.moveTo(t,I),+c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,z),c.lineTo(x,z),c.lineTo(x,z+l),c.lineTo(t,z+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,z+l),c.lineTo(0,z+l),c.lineTo(0,z),c.lineTo(t,z),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ma);mxUtils.extend(Qa,mxCylinder);Qa.prototype.jettyWidth=32;Qa.prototype.jettyHeight=12;Qa.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=.3*r-l/2,z=.7*r-l/2;v?(c.moveTo(t,I),c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,z),c.lineTo(x,z),c.lineTo(x,z+l),c.lineTo(t,z+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,z+l),c.lineTo(0,z+l),c.lineTo(0,z),c.lineTo(t,z),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("component",-Qa);mxUtils.extend(Ia,mxRectangleShape);Ia.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ia);mxUtils.extend(Ha,mxDoubleEllipse);Ha.prototype.outerStroke=-!0;Ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ha);mxUtils.extend(ra,Ha);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,+Qa);mxUtils.extend(Ja,mxRectangleShape);Ja.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ja);mxUtils.extend(Ia,mxDoubleEllipse);Ia.prototype.outerStroke=+!0;Ia.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ia);mxUtils.extend(ra,Ia);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Da.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Da);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Wa,mxActor);Wa.prototype.size=30;Wa.prototype.isRoundable=function(){return!0};Wa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("manualInput",Wa);mxUtils.extend($a,mxRectangleShape);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.isHtmlAllowed=function(){return!1};$a.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/@@ -3405,80 +3406,80 @@ l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.quadTo(n/2,r/2,0,.8*l),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,.8*l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("loopLimit",B);mxUtils.extend(F,mxActor);F.prototype.size=.375;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",L);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();-c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();-c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",fa);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,I=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,I);c.lineTo(l+v+x,I-x/2);c.moveTo(l+v,I);c.lineTo(l+v+x,I+x/2);c.moveTo(l+v,I);c.lineTo(l+n-v,I);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I-x/2);c.moveTo(l+n-v,I);c.lineTo(l+-n-x-v,I+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ka);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),z="1"==mxUtils.getValue(this.style,"left","1"),+c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();+c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,I=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,I);c.lineTo(l+v+x,I-x/2);c.moveTo(l+v,I);c.lineTo(l+v+x,I+x/2);c.moveTo(l+v,I);c.lineTo(l+n-v,I);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I-x/2);c.moveTo(l+n-v,I);c.lineTo(l++n-x-v,I+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.drawHidden=!0;xa.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),z="1"==mxUtils.getValue(this.style,"left","1"),da="1"==mxUtils.getValue(this.style,"right","1"),U="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||I||da||U||z?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,t),this.outline||I?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||da?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||U?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||z)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};-mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Na,mxActor);Na.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,-0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Na);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.2;Aa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,-r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",Aa);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.25;Ga.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ga);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};-wa.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",+mxCellRenderer.registerShape("partialRectangle",xa);mxUtils.extend(Ka,mxEllipse);Ka.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ka);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,+0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Ha);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,+r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(va,mxActor);va.prototype.cst={RECT2:"mxgraph.basic.rect"};+va.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"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=+{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"}]}];va.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};va.prototype.strictDrawShape=function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),z=v&&v.size?v.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),da=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),U=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,-"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ua=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Pa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,U)),oa=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),sa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),qa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),pa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:+"indent",this.indent)))),Ga=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ua=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Pa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,U)),oa=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),sa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),qa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),pa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),wa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ba=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ca=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ea=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Cb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Db=-v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Bb=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Eb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Fb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Gb=Math.max(0,Math.min(50,z));v=wa.prototype;c.setDashed(Fa);Ua&&""!=Ua&&-c.setDashPattern(Ua);c.setStrokeWidth(Db);z=Math.min(.5*r,.5*n,z);I||(z=Gb*Math.min(n,r)/100);z=Math.min(z,.5*Math.min(n,r));I||(U=Math.min(Pa*Math.min(n,r)/100));U=Math.min(U,.5*Math.min(n,r)-z);(oa||sa||qa||pa)&&"frame"!=da&&(c.begin(),oa?v.moveNW(c,l,t,n,r,x,xa,z,pa):c.moveTo(0,0),oa&&v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),sa&&v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),qa&&v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),pa&&v.paintSW(c,-l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=I=Fb,"none"==zb&&(I=0),"none"==Bb&&(Fa=0),c.setGradient(zb,Bb,0,0,n,r,Eb,I,Fa),c.begin(),oa?v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa):c.moveTo(U,0),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),pa&&qa&&v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),qa&&sa&&v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),sa&&oa&&v.paintNEInner(c,-l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),oa&&pa&&v.paintNWInner(c,l,t,n,r,x,xa,z,U),c.fill(),"none"==Cb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,z,oa,sa,qa,pa),c.stroke()));oa||sa||qa||!pa?oa||sa||!qa||pa?!oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,-l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa||!sa||qa||pa?!oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,-l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke(),c.begin(),+v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Bb=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Eb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Fb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Gb=Math.max(0,Math.min(50,z));v=va.prototype;c.setDashed(Ga);Ua&&""!=Ua&&+c.setDashPattern(Ua);c.setStrokeWidth(Db);z=Math.min(.5*r,.5*n,z);I||(z=Gb*Math.min(n,r)/100);z=Math.min(z,.5*Math.min(n,r));I||(U=Math.min(Pa*Math.min(n,r)/100));U=Math.min(U,.5*Math.min(n,r)-z);(oa||sa||qa||pa)&&"frame"!=da&&(c.begin(),oa?v.moveNW(c,l,t,n,r,x,wa,z,pa):c.moveTo(0,0),oa&&v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),sa&&v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),qa&&v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),pa&&v.paintSW(c,+l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Ga=I=Fb,"none"==zb&&(I=0),"none"==Bb&&(Ga=0),c.setGradient(zb,Bb,0,0,n,r,Eb,I,Ga),c.begin(),oa?v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa):c.moveTo(U,0),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),pa&&qa&&v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),qa&&sa&&v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),sa&&oa&&v.paintNEInner(c,+l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),oa&&pa&&v.paintNWInner(c,l,t,n,r,x,wa,z,U),c.fill(),"none"==Cb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,wa,Ba,Ca,Ea,z,oa,sa,qa,pa),c.stroke()));oa||sa||qa||!pa?oa||sa||!qa||pa?!oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,+l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa||!sa||qa||pa?!oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,+l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,-l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,-l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa||sa||qa||pa?oa&&!sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,-z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):-oa&&!sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),-v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&-(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,-l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,-x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,-l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,-n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,-Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,-Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&pa&&("frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,-z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),c.close(),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,-Ea,z,U,qa,pa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),-v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke())):"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,-l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,xa,z,U,pa,oa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSE(c,-l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,-l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,z,qa),v.paintLeft(c,l,t,n,r,x,xa,z,oa),v.lineNWInner(c,l,t,n,r,x,xa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,z,oa,sa,qa,pa);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,0):c.moveTo(0,I)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==-v||!z?c.moveTo(n,0):c.moveTo(n-I,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(n,r):c.moveTo(n,r-I)};wa.prototype.moveSW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,r):c.moveTo(I,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,I,0)}else("snip"==-x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,0):c.lineTo(n-I,0)};wa.prototype.paintNE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n,I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==-x&&"fold"==v)&&c.lineTo(n,I);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,r):c.lineTo(n,r-I)};wa.prototype.paintLeft=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,0):c.lineTo(0,I)};wa.prototype.paintSE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,-I,0,0,l,n-I,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-I,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,r):c.lineTo(I,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,0,r-I)}else("snip"==x||"default"==-x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-I);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,z,.5*z+I);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,z,z+I);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(z,.5*z+I);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,z+I),c.lineTo(z,z+I)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,I,z,da,U){da||-U?!da&&U?c.lineTo(0,z):da&&!U?c.lineTo(z,0):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(I+.5*z,z):c.lineTo(I+z,z):c.lineTo(0,z):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-I-.5*z,z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-I-z,z);else if("snip"==x||"default"==x&&"snip"==-v)c.lineTo(n-I-.5*z,z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,I+z),c.lineTo(n-I-z,z)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n-z,0):da&&!U?c.lineTo(n,z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):c.lineTo(n-z,I+z):c.lineTo(n-z,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,-r):da&&!U?c.lineTo(0,r-z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):c.lineTo(z,r-I-z):c.lineTo(z,r):c.lineTo(0,r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-z,r-I-.5*z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-z,r-I-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n--z,r-I-.5*z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,r-I-z),c.lineTo(n-z,r-I-z)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n,r-z):da&&!U?c.lineTo(n-z,r):"square"==x||"default"==x&&"square"==v||!da?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-I-.5*z,r-z):c.lineTo(n-I-z,r-z):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,I,z,da){if(!da)c.lineTo(z,r);else if("square"==-x||"default"==x&&"square"==v)c.lineTo(z,r-z);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,I+.5*z,r-z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,I+z,r-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(I+.5*z,r-z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,r-I-z),c.lineTo(z+I,r-z)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(z,r-z):"rounded"==x||"default"==-x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,r-I-z):c.moveTo(0,r-z)};wa.prototype.lineSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(z,r-I-z):-c.lineTo(0,r-z)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,r-I-z):c.moveTo(n-z,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==-v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,r-I-z):c.lineTo(n-z,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.moveTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,I+z):c.moveTo(n,-z)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,I+z):c.lineTo(n,z)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.moveTo(z,0):da&&!U?c.moveTo(0,z):"square"==x||"default"==x&&"square"==v?c.moveTo(z,z):"rounded"==-x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,I+z):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,0):da&&!U?c.lineTo(0,z):"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==-x||"default"==x&&"fold"==v)&&c.lineTo(z,I+z):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,I,z,da,U,Fa,Ua,Pa,oa){if("fold"==v||"fold"==x||"fold"==I||"fold"==z||"fold"==da)("fold"==x||"default"==x&&"fold"==v)&&Fa&&oa&&(c.moveTo(0,U),c.lineTo(U,U),c.lineTo(U,0)),("fold"==I||"default"==I&&"fold"==v)&&Fa&&Ua&&(c.moveTo(n-U,0),c.lineTo(n-U,U),c.lineTo(n,U)),("fold"==z||"default"==z&&"fold"==v)&&Pa&&Ua&&(c.moveTo(n-U,r),c.lineTo(n-U,r-U),c.lineTo(n,r-U)),("fold"==da||"default"==da&&"fold"==-v)&&Pa&&oa&&(c.moveTo(0,r-U),c.lineTo(U,r-U),c.lineTo(U,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l){for(var t=[],n=0;n<l.length;n++)t.push(mxUtils.clone(l[n]));n=c.state.dashed;var r=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,t]);3<=c.state.strokeWidth&&(t=mxUtils.getValue(this.style,"fillColor",null),+l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,+l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):!oa||sa||qa||pa?oa&&!sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,+z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):+oa&&!sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),+v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&+(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,+l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,+x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,+l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,+n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,+Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,+Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&pa&&("frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,+z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),c.close(),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,+Ea,z,U,qa,pa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.paintNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.paintSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.paintSW(c,l,t,n,r,x,Ea,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintSWInner(c,l,t,n,r,x,Ea,z,U,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,z,U),+v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,z,U),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),v.paintNWInner(c,l,t,n,r,x,wa,z,U),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke())):"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,wa,z,pa),v.paintTop(c,l,t,n,r,x,Ba,z,sa),v.lineNEInner(c,+l,t,n,r,x,Ba,z,U,sa),v.paintTopInner(c,l,t,n,r,x,wa,z,U,pa,oa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,z,oa),v.paintRight(c,l,t,n,r,x,Ca,z,qa),v.lineSEInner(c,l,t,n,r,x,Ca,z,U,qa),v.paintRightInner(c,l,t,n,r,x,Ba,z,U,oa,sa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSE(c,+l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,z,sa),v.paintBottom(c,l,t,n,r,x,Ea,z,pa),v.lineSWInner(c,l,t,n,r,x,Ea,z,U,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,z,U,sa,qa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,+l,t,n,r,x,Ea,z,U,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,wa,z,qa),v.paintLeft(c,l,t,n,r,x,wa,z,oa),v.lineNWInner(c,l,t,n,r,x,wa,z,U,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,z,U,qa,pa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,wa,Ba,Ca,Ea,z,oa,sa,qa,pa);c.stroke()};va.prototype.moveNW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,0):c.moveTo(0,I)};va.prototype.moveNE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==+v||!z?c.moveTo(n,0):c.moveTo(n-I,0)};va.prototype.moveSE=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(n,r):c.moveTo(n,r-I)};va.prototype.moveSW=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.moveTo(0,r):c.moveTo(I,r)};va.prototype.paintNW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,I,0)}else("snip"==+x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};va.prototype.paintTop=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,0):c.lineTo(n-I,0)};va.prototype.paintNE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n,I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==+x&&"fold"==v)&&c.lineTo(n,I);else c.lineTo(n,0)};va.prototype.paintRight=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(n,r):c.lineTo(n,r-I)};va.prototype.paintLeft=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,0):c.lineTo(0,I)};va.prototype.paintSE=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,+I,0,0,l,n-I,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-I,r);else c.lineTo(n,r)};va.prototype.paintBottom=function(c,l,t,n,r,v,x,I,z){"square"==x||"default"==x&&"square"==v||!z?c.lineTo(0,r):c.lineTo(I,r)};va.prototype.paintSW=function(c,l,t,n,r,v,x,I,z){if(z)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,0,r-I)}else("snip"==x||"default"==+x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-I);else c.lineTo(0,r)};va.prototype.paintNWInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,z,.5*z+I);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,z,z+I);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(z,.5*z+I);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,z+I),c.lineTo(z,z+I)};va.prototype.paintTopInner=function(c,l,t,n,r,v,x,I,z,da,U){da||+U?!da&&U?c.lineTo(0,z):da&&!U?c.lineTo(z,0):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(I+.5*z,z):c.lineTo(I+z,z):c.lineTo(0,z):c.lineTo(0,0)};va.prototype.paintNEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-I-.5*z,z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-I-z,z);else if("snip"==x||"default"==x&&"snip"==+v)c.lineTo(n-I-.5*z,z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,I+z),c.lineTo(n-I-z,z)};va.prototype.paintRightInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n-z,0):da&&!U?c.lineTo(n,z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):c.lineTo(n-z,I+z):c.lineTo(n-z,0):c.lineTo(n,0)};va.prototype.paintLeftInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,+r):da&&!U?c.lineTo(0,r-z):da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):c.lineTo(z,r-I-z):c.lineTo(z,r):c.lineTo(0,r)};va.prototype.paintSEInner=function(c,l,t,n,r,v,x,I,z){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,n-z,r-I-.5*z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,n-z,r-I-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-+z,r-I-.5*z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-z,r-I-z),c.lineTo(n-z,r-I-z)};va.prototype.paintBottomInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(n,r-z):da&&!U?c.lineTo(n-z,r):"square"==x||"default"==x&&"square"==v||!da?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-I-.5*z,r-z):c.lineTo(n-I-z,r-z):c.lineTo(n,r)};va.prototype.paintSWInner=function(c,l,t,n,r,v,x,I,z,da){if(!da)c.lineTo(z,r);else if("square"==+x||"default"==x&&"square"==v)c.lineTo(z,r-z);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*z,I-.5*z,0,0,0,I+.5*z,r-z);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+z,I+z,0,0,1,I+z,r-z);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(I+.5*z,r-z);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(z+I,r-I-z),c.lineTo(z+I,r-z)};va.prototype.moveSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(z,r-z):"rounded"==x||"default"==+x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,r-I-z):c.moveTo(0,r-z)};va.prototype.lineSWInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(z,r-I-z):+c.lineTo(0,r-z)};va.prototype.moveSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,r-I-z):c.moveTo(n-z,r)};va.prototype.lineSEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-z,r-z):"rounded"==x||"default"==x&&"rounded"==+v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,r-I-.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,r-I-z):c.lineTo(n-z,r)};va.prototype.moveNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.moveTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-z,I+z):c.moveTo(n,+z)};va.prototype.lineNEInner=function(c,l,t,n,r,v,x,I,z,da){da?"square"==x||"default"==x&&"square"==v||da?c.lineTo(n-z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-z,I+z):c.lineTo(n,z)};va.prototype.moveNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.moveTo(z,0):da&&!U?c.moveTo(0,z):"square"==x||"default"==x&&"square"==v?c.moveTo(z,z):"rounded"==+x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(z,I+z):c.moveTo(0,0)};va.prototype.lineNWInner=function(c,l,t,n,r,v,x,I,z,da,U){da||U?!da&&U?c.lineTo(z,0):da&&!U?c.lineTo(0,z):"square"==x||"default"==x&&"square"==v?c.lineTo(z,z):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(z,I+.5*z):("invRound"==x||"default"==x&&"invRound"==v||"fold"==+x||"default"==x&&"fold"==v)&&c.lineTo(z,I+z):c.lineTo(0,0)};va.prototype.paintFolds=function(c,l,t,n,r,v,x,I,z,da,U,Ga,Ua,Pa,oa){if("fold"==v||"fold"==x||"fold"==I||"fold"==z||"fold"==da)("fold"==x||"default"==x&&"fold"==v)&&Ga&&oa&&(c.moveTo(0,U),c.lineTo(U,U),c.lineTo(U,0)),("fold"==I||"default"==I&&"fold"==v)&&Ga&&Ua&&(c.moveTo(n-U,0),c.lineTo(n-U,U),c.lineTo(n,U)),("fold"==z||"default"==z&&"fold"==v)&&Pa&&Ua&&(c.moveTo(n-U,r),c.lineTo(n-U,r-U),c.lineTo(n,r-U)),("fold"==da||"default"==da&&"fold"==+v)&&Pa&&oa&&(c.moveTo(0,r-U),c.lineTo(U,r-U),c.lineTo(U,r))};mxCellRenderer.registerShape(va.prototype.cst.RECT2,va);va.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l){for(var t=[],n=0;n<l.length;n++)t.push(mxUtils.clone(l[n]));n=c.state.dashed;var r=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,t]);3<=c.state.strokeWidth&&(t=mxUtils.getValue(this.style,"fillColor",null),null!=t&&(c.setStrokeColor(t),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(n,r),ua.prototype.origPaintEdgeShape.apply(this,[c,l])))};mxCellRenderer.registerShape("filledEdge",ua);mxUtils.extend(Ta,mxConnector);Ta.prototype.defaultWidth=4;Ta.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};Ta.prototype.getFlowAnimationPath=function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};Ta.prototype.origPaintEdgeShape=Ta.prototype.paintEdgeShape;Ta.prototype.paintEdgeShape=function(c,l){for(var t=[],n=0;n<l.length;n++)t.push(mxUtils.clone(l[n]));n=c.state.dashed;var r=c.state.fixDash,v=this.getEdgeWidth();c.setStrokeWidth(v+2*this.strokewidth);c.setDashed(!1);Ta.prototype.origPaintEdgeShape.apply(this,[c,t]);t=mxUtils.getValue(this.style,"fillColor",null);null!=t&&(c.setStrokeWidth(v),c.setStrokeColor(t),c.setDashed(n,r),Ta.prototype.origPaintEdgeShape.apply(this,[c,l]))};mxCellRenderer.registerShape("pipe",Ta);"undefined"!==typeof StyleFormatPanel&&-function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Fa/2,n.y-Fa/2+U/2);c.lineTo(n.x+Fa/2-3*U/2,n.y-3*Fa/2-U/2);-c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1),Ua=n.x+U/2,Pa=n.y+Fa/2;n.x-=U;n.y-=Fa;return function(){c.begin();c.moveTo(Ua-U/2-Fa/2,Pa-Fa/2+U/2);c.lineTo(Ua-U/2+Fa/2,Pa-Fa/2-U/2);c.lineTo(Ua+Fa/2-3*U/2,Pa-3*Fa/2-U/2);c.lineTo(Ua-Fa/2-3*U/2,Pa-3*Fa/2+U/2);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Fa/2,n.y-Fa/2+U/-2);c.lineTo(n.x+Fa/2-3*U/2,n.y-3*Fa/2-U/2);c.moveTo(n.x-U/2+Fa/2,n.y-Fa/2-U/2);c.lineTo(n.x-Fa/2-3*U/2,n.y-3*Fa/2+U/2);c.stroke()}});mxMarker.addMarker("circle",Ra);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,I,z,da){var U=n.clone(),Fa=Ra.apply(this,arguments),Ua=r*(x+2*z),Pa=v*(x+2*z);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(U.x-r*z,U.y-v*z);c.lineTo(U.x-2*Ua+r*z,U.y-2*Pa+v*z);c.moveTo(U.x-Ua-Pa+v*z,U.y-Pa+Ua-r*z);c.lineTo(U.x+Pa-Ua-v*z,U.y-Pa-Ua+r*z);c.stroke()}});-mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Fa=v*(x+z+1),Ua=n.clone();n.x-=U;n.y-=Fa;return function(){c.begin();c.moveTo(Ua.x-Fa,Ua.y+U);c.quadTo(n.x-Fa,n.y+U,n.x,n.y);c.quadTo(n.x+Fa,n.y-U,Ua.x+Fa,Ua.y-U);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,x,I,z,da){l=r*z*1.118;t=v*z*1.118;r*=x+z;v*=x+z;var U=n.clone();U.x-=l;U.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(U.x,U.y);I?c.lineTo(U.x-r-v/2,U.y-v+r/2):c.lineTo(U.x+v/2-r,U.y--v-r/2);c.lineTo(U.x-r,U.y-v);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,I,z,da,U){v*=I+da;x*=I+da;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);z?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/c):l.lineTo(Fa.x+x/c-v,Fa.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=function(c,l,t){return nb(c,["width"],l,function(n,r,v,x,I){I=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x+-r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));c.style.width=Math.round(2*n)/c.view.scale-t})},nb=function(c,l,t,n,r){return La(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var I=x.length-1;v=c.view.translate;var z=c.view.scale,da=t?x[0]:x[I];x=t?x[1]:x[I-1];I=x.x-da.x;var U=x.y-da.y,Fa=Math.sqrt(I*I+U*U);da=n.call(this,Fa,I/Fa,U/Fa,da,x);return new mxPoint(da.x/z-v.x,da.y/z-v.y)}return null},function(v,x,I){var z=c.absolutePoints,-da=z.length-1;v=c.view.translate;var U=c.view.scale,Fa=t?z[0]:z[da];z=t?z[1]:z[da-1];da=z.x-Fa.x;var Ua=z.y-Fa.y,Pa=Math.sqrt(da*da+Ua*Ua);x.x=(x.x+v.x)*U;x.y=(x.y+v.y)*U;r.call(this,Pa,da/Pa,Ua/Pa,Fa,z,x,I)})},cb=function(c,l){return function(t){return[nb(t,["startWidth"],!0,function(n,r,v,x,I){I=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));t.style.startWidth=-Math.round(2*n)/t.view.scale-l})]}},vb=function(c){return function(l){return[La(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=-Math.max(0,Math.min(c,(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[La(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},yb=function(c,l,t){return function(n){var r=[La(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+-x,v.y+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},sb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=[La(v,["size"],function(I){var z=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=parseFloat(mxUtils.getValue(this.state.style,"size",z?r:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,-da*(z?1:I.width))),I.getCenterY())},function(I,z,da){I=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?z.x-I.x:Math.max(0,Math.min(t,(z.x-I.x)/I.width));this.state.style.size=I},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},qb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[La(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,-"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},rb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l}},ib=function(c,l){return La(c,+function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Ga/2,n.y-Ga/2+U/2);c.lineTo(n.x+Ga/2-3*U/2,n.y-3*Ga/2-U/2);+c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1),Ua=n.x+U/2,Pa=n.y+Ga/2;n.x-=U;n.y-=Ga;return function(){c.begin();c.moveTo(Ua-U/2-Ga/2,Pa-Ga/2+U/2);c.lineTo(Ua-U/2+Ga/2,Pa-Ga/2-U/2);c.lineTo(Ua+Ga/2-3*U/2,Pa-3*Ga/2-U/2);c.lineTo(Ua-Ga/2-3*U/2,Pa-3*Ga/2+U/2);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1);return function(){c.begin();c.moveTo(n.x-U/2-Ga/2,n.y-Ga/2+U/+2);c.lineTo(n.x+Ga/2-3*U/2,n.y-3*Ga/2-U/2);c.moveTo(n.x-U/2+Ga/2,n.y-Ga/2-U/2);c.lineTo(n.x-Ga/2-3*U/2,n.y-3*Ga/2+U/2);c.stroke()}});mxMarker.addMarker("circle",Ra);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,I,z,da){var U=n.clone(),Ga=Ra.apply(this,arguments),Ua=r*(x+2*z),Pa=v*(x+2*z);return function(){Ga.apply(this,arguments);c.begin();c.moveTo(U.x-r*z,U.y-v*z);c.lineTo(U.x-2*Ua+r*z,U.y-2*Pa+v*z);c.moveTo(U.x-Ua-Pa+v*z,U.y-Pa+Ua-r*z);c.lineTo(U.x+Pa-Ua-v*z,U.y-Pa-Ua+r*z);c.stroke()}});+mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,I,z,da){var U=r*(x+z+1),Ga=v*(x+z+1),Ua=n.clone();n.x-=U;n.y-=Ga;return function(){c.begin();c.moveTo(Ua.x-Ga,Ua.y+U);c.quadTo(n.x-Ga,n.y+U,n.x,n.y);c.quadTo(n.x+Ga,n.y-U,Ua.x+Ga,Ua.y-U);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,x,I,z,da){l=r*z*1.118;t=v*z*1.118;r*=x+z;v*=x+z;var U=n.clone();U.x-=l;U.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(U.x,U.y);I?c.lineTo(U.x-r-v/2,U.y-v+r/2):c.lineTo(U.x+v/2-r,U.y-+v-r/2);c.lineTo(U.x-r,U.y-v);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,I,z,da,U){v*=I+da;x*=I+da;var Ga=r.clone();return function(){l.begin();l.moveTo(Ga.x,Ga.y);z?l.lineTo(Ga.x-v-x/c,Ga.y-x+v/c):l.lineTo(Ga.x+x/c-v,Ga.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=function(c,l,t){return nb(c,["width"],l,function(n,r,v,x,I){I=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x++r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));c.style.width=Math.round(2*n)/c.view.scale-t})},nb=function(c,l,t,n,r){return Na(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var I=x.length-1;v=c.view.translate;var z=c.view.scale,da=t?x[0]:x[I];x=t?x[1]:x[I-1];I=x.x-da.x;var U=x.y-da.y,Ga=Math.sqrt(I*I+U*U);da=n.call(this,Ga,I/Ga,U/Ga,da,x);return new mxPoint(da.x/z-v.x,da.y/z-v.y)}return null},function(v,x,I){var z=c.absolutePoints,+da=z.length-1;v=c.view.translate;var U=c.view.scale,Ga=t?z[0]:z[da];z=t?z[1]:z[da-1];da=z.x-Ga.x;var Ua=z.y-Ga.y,Pa=Math.sqrt(da*da+Ua*Ua);x.x=(x.x+v.x)*U;x.y=(x.y+v.y)*U;r.call(this,Pa,da/Pa,Ua/Pa,Ga,z,x,I)})},cb=function(c,l){return function(t){return[nb(t,["startWidth"],!0,function(n,r,v,x,I){I=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,z){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));t.style.startWidth=+Math.round(2*n)/t.view.scale-l})]}},vb=function(c){return function(l){return[Na(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=+Math.max(0,Math.min(c,(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Na(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},yb=function(c,l,t){return function(n){var r=[Na(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x++x,v.y+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},sb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=[Na(v,["size"],function(I){var z=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=parseFloat(mxUtils.getValue(this.state.style,"size",z?r:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,+da*(z?1:I.width))),I.getCenterY())},function(I,z,da){I=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?z.x-I.x:Math.max(0,Math.min(t,(z.x-I.x)/I.width));this.state.style.size=I},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},qb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Na(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,+"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},rb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l}},ib=function(c,l){return Na(c,[mxConstants.STYLE_ARCSIZE],function(t){var n=null!=l?l:t.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var r=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(t.x+t.width-Math.min(t.width/2,r),t.y+n)}r=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(t.x+t.width-Math.min(Math.max(t.width/2,t.height/2),Math.min(t.width,t.height)*-r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},La=function(c,l,t,n,r,v,x){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(da){for(var U=0;U<l.length;U++)this.copyStyle(l[U]);+r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},Na=function(c,l,t,n,r,v,x){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(da){for(var U=0;U<l.length;U++)this.copyStyle(l[U]);x&&x(da)};I.getPosition=t;I.setPosition=n;I.ignoreGrid=null!=r?r:!0;if(v){var z=I.positionChanged;I.positionChanged=function(){z.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},ob={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},pipe:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(nb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,r,v,x,I){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,x,I,z,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,z.x,z.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(da.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),t.push(nb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,@@ -3489,32 +3490,32 @@ r*(I+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.viewmxEvent.isAltDown(da.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),t.push(nb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,x,I){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,I,z,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,z.x,z.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,z.x,z.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(da.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=-parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ib(c,t/2))}l.push(La(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=+parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ib(c,t/2))}l.push(Na(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],I=0;I<v.length;I++)v[I]!=c.cell&&r.isSwimlane(v[I])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[I]))==-n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:rb(),ext:rb(),rectangle:rb(),triangle:rb(),rhombus:rb(),umlLifeline:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[La(c,+n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:rb(),ext:rb(),rectangle:rb(),triangle:rb(),rhombus:rb(),umlLifeline:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Na(c,["width","height"],function(l){var t=Math.max(ma.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",ma.prototype.width))),n=Math.max(1.5*ma.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",ma.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(ma.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*ma.prototype.corner,Math.min(l.height,t.y-l.y)))},-!1)]},process:function(c){var l=[La(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,-!1)&&l.push(ib(c));return l},cross:function(c){return[La(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Aa.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[La(c,["size"],function(l){var t=Math.max(0,-Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},-function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[La(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Wa.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));-return l},dataStorage:function(c){return[La(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?bb.prototype.fixedSize:bb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=-[La(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position)));mxUtils.getValue(this.state.style,"base",S.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",S.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=-Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),La(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",S.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),La(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,+!1)]},process:function(c){var l=[Na(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,+!1)&&l.push(ib(c));return l},cross:function(c){return[Na(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ya.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,+Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},+function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Na(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Wa.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));+return l},dataStorage:function(c){return[Na(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?bb.prototype.fixedSize:bb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=+[Na(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position)));mxUtils.getValue(this.state.style,"base",S.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",S.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=+Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Na(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",S.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Na(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",S.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",S.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",S.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},internalStorage:function(c){var l=-[La(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},module:function(c){return[La(c,-["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ka.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ka.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[La(c,-["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[La(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,+[Na(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},module:function(c){return[Na(c,+["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ma.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[Na(c,+["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Na(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:vb(1),doubleArrow:vb(.5),"mxgraph.arrows2.wedgeArrow":cb(20,20),"mxgraph.arrows2.wedgeArrowDashed":cb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":cb(20,20),-folder:function(c){return[La(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,t.x-l.x));mxUtils.getValue(this.state.style,-"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},-!1)]},tape:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[La(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*-Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[La(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=+folder:function(c){return[Na(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,t.x-l.x));mxUtils.getValue(this.state.style,+"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},+!1)]},tape:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Na(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*+Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Na(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,-n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:sb(ea.prototype.size,!0,null,!0,ea.prototype.fixedSize),hexagon:sb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:sb(X.prototype.size,!1),display:sb(Ga.prototype.size,!1),cube:yb(1,e.prototype.size,!1),card:yb(.5,J.prototype.size,!0),loopLimit:yb(.5,B.prototype.size,!0),trapezoid:qb(.5,W.prototype.size,W.prototype.fixedSize),parallelogram:qb(1,K.prototype.size,-K.prototype.fixedSize)};Graph.createHandle=La;Graph.handleFactory=ob;var ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=ob[l];null==l&&null!=this.state.shape&&+n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:sb(fa.prototype.size,!0,null,!0,fa.prototype.fixedSize),hexagon:sb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:sb(X.prototype.size,!1),display:sb(Fa.prototype.size,!1),cube:yb(1,e.prototype.size,!1),card:yb(.5,J.prototype.size,!0),loopLimit:yb(.5,B.prototype.size,!0),trapezoid:qb(.5,W.prototype.size,W.prototype.fixedSize),parallelogram:qb(1,K.prototype.size,+K.prototype.fixedSize)};Graph.createHandle=Na;Graph.handleFactory=ob;var ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=ob[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=ob[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=ob[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var jb=new mxPoint(1,0),hb=new mxPoint(1,0),Ya=mxUtils.toRadians(-30);-jb=mxUtils.getRotatedPoint(jb,Math.cos(Ya),Math.sin(Ya));var xb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(xb),Math.sin(xb));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var z=jb.x,da=jb.y,U=hb.x,Fa=hb.y,Ua="horizontal"==-mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=I){c=function(oa,sa,qa){oa-=Pa.x;var pa=sa-Pa.y;sa=(Fa*oa-U*pa)/(z*Fa-da*U);oa=(da*oa-z*pa)/(da*U-z*Fa);Ua?(qa&&(Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa),r.push(Pa)),Pa=new mxPoint(Pa.x+U*oa,Pa.y+Fa*oa)):(qa&&(Pa=new mxPoint(Pa.x+U*oa,Pa.y+Fa*oa),r.push(Pa)),Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa));r.push(Pa)};var Pa=I;null==n&&(n=new mxPoint(I.x+(x.x-I.x)/2,I.y+(x.y-I.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",+jb=mxUtils.getRotatedPoint(jb,Math.cos(Ya),Math.sin(Ya));var xb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(xb),Math.sin(xb));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var z=jb.x,da=jb.y,U=hb.x,Ga=hb.y,Ua="horizontal"==+mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=I){c=function(oa,sa,qa){oa-=Pa.x;var pa=sa-Pa.y;sa=(Ga*oa-U*pa)/(z*Ga-da*U);oa=(da*oa-z*pa)/(da*U-z*Ga);Ua?(qa&&(Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa),r.push(Pa)),Pa=new mxPoint(Pa.x+U*oa,Pa.y+Ga*oa)):(qa&&(Pa=new mxPoint(Pa.x+U*oa,Pa.y+Ga*oa),r.push(Pa)),Pa=new mxPoint(Pa.x+z*sa,Pa.y+da*sa));r.push(Pa)};var Pa=I;null==n&&(n=new mxPoint(I.x+(x.x-I.x)/2,I.y+(x.y-I.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return Ab.apply(this,arguments)};h.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};w.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,@@ -3522,7 +3523,7 @@ Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.pus0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=+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))];xa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,@@ -3534,10 +3535,10 @@ null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,."tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};$a.prototype.constraints=mxRectangleShape.prototype.constraints;bb.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=-mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,-.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Ka.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ka.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,-"jettyHeight",Ka.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,+0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};$a.prototype.constraints=mxRectangleShape.prototype.constraints;bb.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ka.prototype.constraints=+mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,+.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Ma.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ma.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,+"jettyHeight",Ma.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,l),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(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,l));t>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.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)];ha.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,@@ -3545,8 +3546,8 @@ l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.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)];ea.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),new mxConnectionConstraint(new mxPoint(.75,0),!1)];fa.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)];La.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,@@ -3559,12 +3560,12 @@ new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new1),!1));return c};pb.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)];Za.prototype.getConstraints=function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));return c};gb.prototype.getConstraints=function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Aa.prototype.getConstraints=+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};ya.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,x=(l-r)/2;r=x+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ba.prototype.constraints=null;q.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)];A.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)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,+.9),!1)];A.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)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function f(k,u,w,y,C){C.getModel().beginUpdate();try{var D=C.getCellGeometry(k);null!=D&&w&&y&&(w/=y,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,C.getModel().setGeometry(k,D));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,@@ -3709,7 +3710,7 @@ e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.eMenus.prototype.createMenubar=function(a){var b=new Menubar(this.editorUi,a),f=mxUtils.bind(this,function(){for(var g=this.defaultMenuItems,d=0;d<g.length;d++)mxUtils.bind(this,function(h){var m=b.addMenu(mxResources.get(g[d]),mxUtils.bind(this,function(){h.funct.apply(this,arguments)}));this.menuCreated(h,m)})(this.get(g[d]));"kennedy"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme||a.appendChild(this.editorUi.statusContainer)});f();var e=mxUtils.bind(this,function(){a.innerHTML="";f()});this.editorUi.addListener("currentThemeChanged",e);this.editorUi.addListener("languageChanged",e);return b};Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",b.className=f,a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Menubar.prototype.addMenu=function(a,b,f,e){a=this.editorUi.createMenuElement(a,b,e);a.className="geMenubar";null!=f?this.container.insertBefore(a,f):this.container.appendChild(a);return a};Menubar.prototype.destroy=function(){};function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};-Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}+Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.init();this.gestureHandler=mxUtils.bind(this,function(f){this.editorUi.isHideCurrentMenuEvent(f)&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}Toolbar.prototype.init=function(){var a=this.addMenu(this.editorUi.menus.get("viewPanels"),null,Editor.dockRightImage);a.setAttribute("data-min-width","720");this.addSeparator(null,720);var b=this.editorUi.createZoomInput();b.setAttribute("data-min-width","580");this.container.appendChild(b);this.addSeparator(null,580);this.addItems(["zoomIn","zoomOut"],null,null,[Editor.zoomInImage,Editor.zoomOutImage],460);this.addSeparator(null,460);this.addItems(["undo","redo"],null,null,[Editor.undoImage,Editor.redoImage]);this.addSeparator(null,260);this.addItems(["delete"],null,null,[Editor.trashImage],260);this.addSeparator(null,300);this.addItems(["toFront","toBack"],null,null,[Editor.toFrontImage,Editor.toBackImage],660);this.addSeparator(null,660);this.addItems(["fillColor"],null,null,[Editor.fillColorImage],740);this.addItems(["strokeColor"],null,null,[Editor.strokeColorImage],780);this.addItems(["shadow"],null,null,[Editor.shadowImage],820);this.addSeparator(null,820);this.edgeShapeMenu=this.addMenu(this.editorUi.menus.get("edgeShape"));this.edgeShapeMenu.setAttribute("data-min-width",440);this.edgeStyleMenu=this.addMenu(this.editorUi.menus.get("edgeStyle"));this.edgeStyleMenu.setAttribute("data-min-width",480);this.addSeparator(null,480);var f=this.addMenu(this.editorUi.menus.get("insert"),null,Editor.plusImage);f.setAttribute("data-min-width",300);var e=f.cloneNode(!0);e.setAttribute("data-min-width",330);e.style.backgroundImage="url("+Editor.shapesImage+")";this.editorUi.addShapePicker(e,!0);this.container.appendChild(e);var g=@@ -3748,26 +3749,26 @@ G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+"4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(D,E){E=null!=E?E:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",E=!0;var G=mxUtils.parseColor(D);D=G.r/255;var J=G.g/255,M=G.b/255,Q=Math.min(Math.min(D,J),M);G=Math.max(Math.max(D,J),M);var K=G-Q;0===K?D=[null,0,G]:(D=D===Q?3+(M-J)/K:J===Q?5+(D-M)/K:1+(J-D)/K,D=[6===D?0:D,K/G,G]);null!=D[0]&&(g[0]=D[0]);0!=D[2]&&(g[1]=D[1]);g[2]=D[2];p(E)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";-var ColorDialog=function(a,b,f,e,g,d,h){function m(ba){return mxUtils.color2hex("#"+ba).substring(1).toUpperCase()}function p(){ea.src="none"==S.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ba){ba||"none"==S.style.display?(S.style.display="flex",N.focus()):S.style.display="none";p()}function u(ba){""==ba.value&&null!=Q&&W?ba.style.background=ba==N?Q.dark:Q.light:""==ba.value||ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)?ba.style.background="transparent":ba.style.background=+var ColorDialog=function(a,b,f,e,g,d,h){function m(ba){return mxUtils.color2hex("#"+ba).substring(1).toUpperCase()}function p(){fa.src="none"==S.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ba){ba||"none"==S.style.display?(S.style.display="flex",N.focus()):S.style.display="none";p()}function u(ba){""==ba.value&&null!=Q&&W?ba.style.background=ba==N?Q.dark:Q.light:""==ba.value||ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)?ba.style.background="transparent":ba.style.background="#"+ba.value;ba.style.color="transparent"==ba.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ba.style.background)?"#ffffff":"#000000"}function w(){u(X);u(N)}function y(ba){ba?h&&null!=Q?(X.value=Q.light.substring(1).toUpperCase(),ba=!1):(X.value="",N.value="",ca.value="automatic",X.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),N.setAttribute("title",mxResources.get("useBlackAndWhite")),X.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==X.value&&-null!=Q&&(X.value=Q.light.substring(1).toUpperCase()),X.removeAttribute("placeholder"),X.removeAttribute("title"),""==N.value&&null!=Q&&(N.value=Q.dark.substring(1).toUpperCase()),N.removeAttribute("placeholder"),N.removeAttribute("title"),ba=!1);W=ba}function C(ba){"#"==ba.value.charAt(0)&&(ba.value=ba.value.substring(1));var ma=ba.value,Ja=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ja&&"default"!=Ja&&Ja!=mxResources.get("default").toLowerCase()&&Ja!=mxResources.get("automatic").toLowerCase()||+null!=Q&&(X.value=Q.light.substring(1).toUpperCase()),X.removeAttribute("placeholder"),X.removeAttribute("title"),""==N.value&&null!=Q&&(N.value=Q.dark.substring(1).toUpperCase()),N.removeAttribute("placeholder"),N.removeAttribute("title"),ba=!1);W=ba}function C(ba){"#"==ba.value.charAt(0)&&(ba.value=ba.value.substring(1));var ma=ba.value,La=ma.toLowerCase();null==g||""!=ma&&"automatic"!=La&&"default"!=La&&La!=mxResources.get("default").toLowerCase()&&La!=mxResources.get("automatic").toLowerCase()||null==Q?(ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)||(ba.value=m(ba.value),ha.fromString("#"+ba.value)),y(!1),ba!=N||X.value==mxConstants.NONE&&N.value==mxConstants.NONE||(ca.value="custom"),ba==X&&"automatic"==ca.value&&(X.value==mxConstants.NONE?N.value=mxConstants.NONE:mxUtils.isVarColor(X.value)?N.value=X.value:N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ba.value)).substring(1).toUpperCase()),w()):V.click()}function D(){var ba=X.value,ma=N.value;if(W&&null!=Q||(/(^#?[a-zA-Z0-9]*$)/.test(ba)||mxUtils.isVarColor(ba))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(W)ba="default";else if(""==ba&&(ba=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),ba==mxConstants.NONE||mxUtils.isVarColor(ba)||"#"==ba.charAt(0)||(ba="#"+m(ba)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),ba!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=ca.value&&ma!=mxConstants.NONE?ba==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+ba+","+ma+")",12):ba!=mxConstants.NONE&&ColorDialog.addRecentColor(ba.substring(1),12),"none"!=ba||"none"!=ma)ba=ba==mxConstants.NONE?"transparent":ba,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==ca.value||(ba="light-dark("+ba+","+ma+")");Y(ba);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||window.setTimeout(function(){ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)},0)}function G(){ia.value!=mxConstants.NONE&&""!=ia.value&&ha.fromString("#"+ia.value,!0)}function J(){var ba=aa(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ba.style.marginBottom="8px";return ba}function M(ba){13==ba.keyCode&&(C(mxEvent.getSource(ba)),D())}var Q=null!=d?mxUtils.getLightDarkColor(d,null,null,h):null,K=a.editor.graph;this.editorUi=a;var W=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var X=document.createElement("input");X.style.textOverflow="ellipsis";X.style.margin="0 0 0 4px";X.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var T=document.createElement("div");T.style.display="flex";T.style.alignItems="center";d.appendChild(T);var N=document.createElement("input");N.style.textOverflow="ellipsis";N.style.margin="0 4px";N.style.maxWidth="60px";N.style.width="100%";var ca=document.createElement("select");ca.style.textOverflow="ellipsis";ca.style.width="100%";var H=document.createElement("option");H.setAttribute("value","automatic");mxUtils.write(H,mxResources.get("automatic"));ca.appendChild(H);H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("userDefined"));ca.appendChild(H);ca.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var S=document.createElement("div");S.style.padding=-"0 6px 0 6px";H=document.createElement("img");H.setAttribute("title",mxResources.get("dark"));H.className="geAdaptiveAsset";H.src=Editor.thinDarkImage;H.style.width="20px";S.appendChild(H);mxEvent.addListener(H,"click",function(){N.focus()});S.appendChild(N);S.appendChild(ca);S.style.display="flex";S.style.alignItems="center";H=document.createElement("div");H.style.display="flex";H.style.alignItems="center";H.style.userSelect="none";H.style.cursor="pointer";H.style.padding="2px 0 2px 0";var ea=document.createElement("img");-ea.setAttribute("title",mxResources.get("dark"));ea.className="geAdaptiveAsset";ea.style.marginLeft="-2px";H.appendChild(ea);mxUtils.write(H,mxResources.get("advanced"));var la=document.createElement("img");la.setAttribute("title",mxResources.get("swap"));la.className="geAdaptiveAsset";la.style.marginLeft="4px";la.style.width="16px";la.style.height="16px";la.style.cursor="pointer";la.src=Editor.swapImage;mxEvent.addListener(la,"click",function(ba){k(!0);ca.value="custom";var ma=X.value;X.value=N.value;+"0 6px 0 6px";H=document.createElement("img");H.setAttribute("title",mxResources.get("dark"));H.className="geAdaptiveAsset";H.src=Editor.thinDarkImage;H.style.width="20px";S.appendChild(H);mxEvent.addListener(H,"click",function(){N.focus()});S.appendChild(N);S.appendChild(ca);S.style.display="flex";S.style.alignItems="center";H=document.createElement("div");H.style.display="flex";H.style.alignItems="center";H.style.userSelect="none";H.style.cursor="pointer";H.style.padding="2px 0 2px 0";var fa=document.createElement("img");+fa.setAttribute("title",mxResources.get("dark"));fa.className="geAdaptiveAsset";fa.style.marginLeft="-2px";H.appendChild(fa);mxUtils.write(H,mxResources.get("advanced"));var la=document.createElement("img");la.setAttribute("title",mxResources.get("swap"));la.className="geAdaptiveAsset";la.style.marginLeft="4px";la.style.width="16px";la.style.height="16px";la.style.cursor="pointer";la.src=Editor.swapImage;mxEvent.addListener(la,"click",function(ba){k(!0);ca.value="custom";var ma=X.value;X.value=N.value;N.value=ma;w();mxEvent.consume(ba)});H.appendChild(la);var O=document.createElement("img");O.setAttribute("title",mxResources.get("copy"));O.className="geAdaptiveAsset";O.style.marginLeft="4px";O.style.width="16px";O.style.height="16px";O.style.cursor="pointer";O.src=Editor.doubleArrowUpImage;mxEvent.addListener(O,"click",function(ba){ia==N?X.value=N.value:N.value=X.value;k(!0);ca.value="custom";w();mxEvent.consume(ba)});H.appendChild(O);p();mxEvent.addListener(H,"click",function(){k();p();ColorDialog.collapsed="none"==S.style.display});var V=mxUtils.button("",function(){y(!0);w();ia.focus();""==ia.value&&null!=Q&&W&&ha.fromString(ia==N?Q.dark:Q.light,!0)});mxEvent.addListener(ca,"change",function(){"automatic"==ca.value?(X.focus(),C(X)):(y(!1),mxUtils.isVarColor(N.value)||(N.value=W&&null!=Q?Q.dark.substring(1).toUpperCase():N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+X.value)).substring(1).toUpperCase()),N.focus(),E());w()});mxEvent.addListener(X,"change",function(){C(X)});mxEvent.addListener(N,"change",function(){C(N)});var Y=null!=f?f:this.createApplyFunction();this.init=function(){E()};var ha=new ColorPicker,ia=Editor.isDarkMode()&&("auto"==K.getAdaptiveColors()||"simple"==K.getAdaptiveColors()&&"custom"==ca.value)&&!h?N:X;mxEvent.addListener(X,"focus",function(){ia=X;G();O.src=Editor.doubleArrowDownImage});mxEvent.addListener(N,"focus",function(){ia=N;G();O.src=Editor.doubleArrowUpImage});ha.addListener("change",function(ba,ma){ba=ma.getProperty("color").substring(1).toUpperCase();ia.value.toUpperCase()!=-ba&&(ia.value=ba,C(ia),window.setTimeout(function(){ia.focus()},0))});f=document.createElement("div");f.appendChild(ha.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var aa=mxUtils.bind(this,function(ba,ma,Ja,na){ma=null!=ma?ma:12;var ya=document.createElement("table");ya.style.borderCollapse="collapse";ya.setAttribute("cellspacing","0");ya.style.marginBottom="20px";ya.style.cellSpacing="0px";-ya.style.marginLeft="1px";var za=document.createElement("tbody");ya.appendChild(za);for(var Ka=ba.length/ma,Qa=0;Qa<Ka;Qa++){for(var Ia=document.createElement("tr"),Ha=0;Ha<ma;Ha++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ja);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";-else if(mxUtils.isLightDarkColor(ra)){var Va=mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Va=this.colorNames[String(ra).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ia.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ia==N&&N.value==mxConstants.NONE?X.value=mxConstants.NONE:-ia.value=mxConstants.NONE;if(ia==X||ia==N&&X.value==mxConstants.NONE)ca.value="automatic";C(ia);window.setTimeout(function(){ia.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);ca.value="custom";var Wa=mxUtils.getLightDarkColor(ra);X.value=Wa.light.substring(1).toUpperCase();N.value=Wa.dark.substring(1).toUpperCase();C(X);C(N);ia==X?ha.fromString(Wa.light):ha.fromString(Wa.dark)}else ha.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(ba[Qa*ma+Ha]);za.appendChild(Ia)}na&&(ba=document.createElement("td"),-ba.setAttribute("title",mxResources.get("reset")),ba.className="geAdaptiveAsset",ba.style.border="1px solid black",ba.style.padding="0px",ba.style.width="16px",ba.style.height="16px",ba.style.backgroundImage="url('"+Editor.crossImage+"')",ba.style.backgroundPosition="center center",ba.style.backgroundSize="14px 14px",ba.style.backgroundRepeat="no-repeat",ba.style.cursor="pointer",Ia.appendChild(ba),mxEvent.addListener(ba,"click",function(){ColorDialog.resetRecentColors();ya.parentNode.replaceChild(J(),-ya)}));ta.appendChild(ya);return ya});h||(d.appendChild(H),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=ca.value||(S.style.display="none",p()),H=document.createElement("img"),H.setAttribute("title",mxResources.get("light")),H.className="geAdaptiveAsset",H.src=Editor.thinLightImage,H.style.width="20px",T.appendChild(H),mxEvent.addListener(H,"click",function(){X.focus()}));T.appendChild(X);null!=Q&&(V.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),+ba&&(ia.value=ba,C(ia),window.setTimeout(function(){ia.focus()},0))});f=document.createElement("div");f.appendChild(ha.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var aa=mxUtils.bind(this,function(ba,ma,La,na){ma=null!=ma?ma:12;var za=document.createElement("table");za.style.borderCollapse="collapse";za.setAttribute("cellspacing","0");za.style.marginBottom="20px";za.style.cellSpacing="0px";+za.style.marginLeft="1px";var Aa=document.createElement("tbody");za.appendChild(Aa);for(var Ma=ba.length/ma,Qa=0;Qa<Ma;Qa++){for(var Ja=document.createElement("tr"),Ia=0;Ia<ma;Ia++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=La);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";+else if(mxUtils.isLightDarkColor(ra)){var Va=mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Va=this.colorNames[String(ra).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ja.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ia==N&&N.value==mxConstants.NONE?X.value=mxConstants.NONE:+ia.value=mxConstants.NONE;if(ia==X||ia==N&&X.value==mxConstants.NONE)ca.value="automatic";C(ia);window.setTimeout(function(){ia.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);ca.value="custom";var Wa=mxUtils.getLightDarkColor(ra);X.value=Wa.light.substring(1).toUpperCase();N.value=Wa.dark.substring(1).toUpperCase();C(X);C(N);ia==X?ha.fromString(Wa.light):ha.fromString(Wa.dark)}else ha.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(ba[Qa*ma+Ia]);Aa.appendChild(Ja)}na&&(ba=document.createElement("td"),+ba.setAttribute("title",mxResources.get("reset")),ba.className="geAdaptiveAsset",ba.style.border="1px solid black",ba.style.padding="0px",ba.style.width="16px",ba.style.height="16px",ba.style.backgroundImage="url('"+Editor.crossImage+"')",ba.style.backgroundPosition="center center",ba.style.backgroundSize="14px 14px",ba.style.backgroundRepeat="no-repeat",ba.style.cursor="pointer",Ja.appendChild(ba),mxEvent.addListener(ba,"click",function(){ColorDialog.resetRecentColors();za.parentNode.replaceChild(J(),+za)}));ta.appendChild(za);return za});h||(d.appendChild(H),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=ca.value||(S.style.display="none",p()),H=document.createElement("img"),H.setAttribute("title",mxResources.get("light")),H.className="geAdaptiveAsset",H.src=Editor.thinLightImage,H.style.width="20px",T.appendChild(H),mxEvent.addListener(H,"click",function(){X.focus()}));T.appendChild(X);null!=Q&&(V.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),V.style.cursor="pointer",V.style.position="relative",V.style.marginLeft="4px",V.innerText="",K=document.createElement("div"),K.style.display="inline-block",K.style.verticalAlign="middle",K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.marginTop="-2px",K.style.width="12px",K.style.height="12px",h?K.style.backgroundColor=Q.light:K.style.backgroundImage="linear-gradient(to right bottom, "+Q.cssText+" 50%, "+mxUtils.invertLightDarkColor(Q).cssText+" 50.3%)",V.appendChild(K),T.appendChild(V),mxEvent.addListener(V,"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";f.style.whiteSpace="nowrap";T.appendChild(P);K=mxUtils.button("",function(){document.activeElement==P?X.focus():(P.value="#"+X.value,P.click())});K.style.cursor="pointer";H=document.createElement("img");H.src=Editor.colorDropperImage;H.className="geAdaptiveAsset";H.style.position="relative";H.style.verticalAlign="middle";H.style.marginTop="-2px";H.style.width="auto";H.style.height="14px";K.appendChild(H);T.appendChild(K);f.appendChild(d);mxEvent.addListener(P,"change",function(){ha.fromString(P.value)});h||f.appendChild(S);J();d=aa(this.presetColors);d.style.marginBottom="8px";d=aa(this.defaultColors);d.style.marginBottom="16px";f.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";@@ -3804,15 +3805,15 @@ k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=documM.setAttribute("type","checkbox");M.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(M);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=!1;k=document.createElement("td");k.appendChild(Q);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";k=document.createElement("td");k.appendChild(K);g.appendChild(k);p.appendChild(g);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(y,"change",function(){J=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(C.value=Math.floor(h*T),D.value=Math.floor(m*T)):(y.value="100",C.value=h,D.value=m);f()});mxEvent.addListener(C,"change",function(){var T=parseInt(C.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),D.value=Math.floor(m*T)):(y.value="100",C.value=h,D.value=m);f()});mxEvent.addListener(D,"change",function(){var T=parseInt(D.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),C.value=Math.floor(h*-T)):(y.value="100",C.value=h,D.value=m);f()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var W=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,N=w.value,ca=Math.max(0,parseFloat(y.value)||100)/100,H=Math.max(0,parseInt(K.value)),S=e.background,ea=Math.max(1,parseInt(G.value));if(("svg"==N||"png"==N||-"pdf"==N)&&M.checked)S=null;else if(null==S||S==mxConstants.NONE)S="#ffffff";ExportDialog.lastBorderValue=H;ExportDialog.exportFile(a,T,N,S,ca,H,ea,Q.checked)}}));W.className="geBtn gePrimaryBtn";var X=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});X.className="geBtn";a.editor.cancelFirst?(k.appendChild(X),k.appendChild(W)):(k.appendChild(W),k.appendChild(X));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;+T)):(y.value="100",C.value=h,D.value=m);f()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var W=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,N=w.value,ca=Math.max(0,parseFloat(y.value)||100)/100,H=Math.max(0,parseInt(K.value)),S=e.background,fa=Math.max(1,parseInt(G.value));if(("svg"==N||"png"==N||+"pdf"==N)&&M.checked)S=null;else if(null==S||S==mxConstants.NONE)S="#ffffff";ExportDialog.lastBorderValue=H;ExportDialog.exportFile(a,T,N,S,ca,H,fa,Q.checked)}}));W.className="geBtn gePrimaryBtn";var X=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});X.className="geBtn";a.editor.cancelFirst?(k.appendChild(X),k.appendChild(W)):(k.appendChild(W),k.appendChild(X));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;ExportDialog.exportFile=function(a,b,f,e,g,d,h,m){m=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(e,g,d)),b,f);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-p.x)/m.view.scale),Math.floor((d/g-p.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*g/m.view.scale+2*d);g=Math.ceil(p.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};var EditDataDialog=function(a,b){function f(){0<K.value.length?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(T){}var k=new mxForm("properties");k.table.style.width="100%";var u=d.attributes,w=[],y=[],C=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(T,N){var ca=document.createElement("div");ca.style.position="relative";ca.style.paddingRight="20px";ca.style.boxSizing="border-box";ca.style.width="100%";var H=document.createElement("a"),S=mxUtils.createImage(Dialog.prototype.closeImage);S.style.height="9px";S.style.fontSize="9px";S.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";H.className="geButton";H.setAttribute("title",-mxResources.get("delete"));H.style.position="absolute";H.style.top="4px";H.style.right="0px";H.style.margin="0px";H.style.width="9px";H.style.height="9px";H.style.cursor="pointer";H.appendChild(S);N=function(ea){return function(){for(var la=0,O=0;O<w.length;O++){if(w[O]==ea){y[O]=null;k.table.deleteRow(la+(null!=D?1:0));break}null!=y[O]&&la++}}}(N);mxEvent.addListener(H,"click",N);N=T.parentNode;ca.appendChild(T);ca.appendChild(H);N.appendChild(ca)};h=function(T,N,ca){w[T]=N;y[T]=k.addTextarea(w[C]++mxResources.get("delete"));H.style.position="absolute";H.style.top="4px";H.style.right="0px";H.style.margin="0px";H.style.width="9px";H.style.height="9px";H.style.cursor="pointer";H.appendChild(S);N=function(fa){return function(){for(var la=0,O=0;O<w.length;O++){if(w[O]==fa){y[O]=null;k.table.deleteRow(la+(null!=D?1:0));break}null!=y[O]&&la++}}}(N);mxEvent.addListener(H,"click",N);N=T.parentNode;ca.appendChild(T);ca.appendChild(H);N.appendChild(ca)};h=function(T,N,ca){w[T]=N;y[T]=k.addTextarea(w[C]+":",ca,2);y[T].style.width="100%";0<ca.indexOf("\n")&&y[T].setAttribute("rows","2");E(y[T],N);null!=m[N]&&0==m[N].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var G=g.getModel().getParent(b)==g.getModel().getRoot(),J=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==J.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,N){return"label"==T.name?1:"label"==N.name?-1:T.name<N.name?-1:T.name>N.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(N){if(null!=N&&0<N.length&&N!=D)if(g.model.isRoot(b)){var ca=a.getPageById(D);if(null!=ca)if(null==a.getPageById(N)){var H=a.getPageIndex(ca);0<=H&&(a.removePage(ca),ca.node.setAttribute("id",N),D=N,Q.innerHTML=mxUtils.htmlEntities(N),a.insertPage(ca,H))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(N)?(g.getModel().cellRemoved(b),b.setId(N),D=N,Q.innerHTML=mxUtils.htmlEntities(N),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[N])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(C,p[M].name,p[M].value),C++;p=document.createElement("div");@@ -3831,22 +3832,22 @@ mxEvent.addListener(b,"click",function(){h.value="";h.focus()});d.appendChild(h)b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(h.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,h=document.createElement("div");h.style.position="absolute";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),h,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var m=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){m.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();m.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){m.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(h);mxEvent.addMouseWheelListener(function(p,k){for(var u=!1,w=mxEvent.getSource(p);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=p.deltaY&&Math.round(p.deltaY)!=p.deltaY&&(u=1+Math.abs(p.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(p))})},LayersWindow=function(a,b,f,e,g){function d(){var N=K.get(p.getLayerForCells(p.getSelectionCells()));-null!=N?N.appendChild(T):null!=T.parentNode&&T.parentNode.removeChild(T)}function h(){function N(S,ea,la,O){var V=document.createElement("div");V.className="geToolbarContainer";K.put(la,V);V.style.overflow="hidden";V.style.position="relative";V.style.padding="4px";V.style.height="30px";V.style.display="flex";V.style.alignItems="center";V.style.borderWidth="0px 0px 1px 0px";V.style.borderStyle="solid";V.style.whiteSpace="nowrap";V.setAttribute("title",ea+" ("+la.getId()+")");var Y=document.createElement("div");+null!=N?N.appendChild(T):null!=T.parentNode&&T.parentNode.removeChild(T)}function h(){function N(S,fa,la,O){var V=document.createElement("div");V.className="geToolbarContainer";K.put(la,V);V.style.overflow="hidden";V.style.position="relative";V.style.padding="4px";V.style.height="30px";V.style.display="flex";V.style.alignItems="center";V.style.borderWidth="0px 0px 1px 0px";V.style.borderStyle="solid";V.style.whiteSpace="nowrap";V.setAttribute("title",fa+" ("+la.getId()+")");var Y=document.createElement("div");Y.style.display="inline-flex";Y.style.alignItems="center";Y.style.width="100%";Y.style.textOverflow="ellipsis";Y.style.overflow="hidden";var ha=document.createElement("span");mxEvent.addListener(V,"dragover",function(aa){aa.dataTransfer.dropEffect="move";y=S;aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(V,"dragstart",function(aa){"true"!=ha.contentEditable&&(w=V,mxClient.IS_FF&&aa.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(V,"dragend",function(aa){null!=w&&null!=y&&1<p.model.getChildCount(p.model.root)&&p.addCell(la,p.model.root,y);y=w=null;aa.stopPropagation();aa.preventDefault()});var ia=document.createElement("img");ia.setAttribute("draggable","false");ia.setAttribute("align","top");ia.setAttribute("border","0");ia.className="geAdaptiveAsset";ia.style.width="16px";ia.style.padding="0px 6px 0 4px";ia.style.cursor="pointer";ia.setAttribute("title",mxResources.get(p.model.isVisible(la)?"hide":"show"));p.model.isVisible(la)?(ia.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(V,90)):(ia.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(V,40));p.isEnabled()||mxUtils.setOpacity(ia,50);Y.appendChild(ia);mxEvent.addListener(ia,"click",function(aa){p.isEnabled()&&p.model.setVisible(la,!p.model.isVisible(la));mxEvent.consume(aa)});ia=document.createElement("img");ia.setAttribute("draggable","false");ia.setAttribute("align","top");ia.setAttribute("border","0");ia.className="geAdaptiveAsset";ia.style.width="16px";ia.style.padding="0px 6px 0 0";ia.setAttribute("title",mxResources.get("lockUnlock"));var ta=p.getCurrentCellStyle(la);"1"==mxUtils.getValue(ta,"locked","0")?(ia.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ia,90),V.style.color="red"):(ia.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ia,40));p.isEnabled()&&(ia.style.cursor="pointer");mxEvent.addListener(ia,"click",function(aa){if(p.isEnabled()){var P=null;p.getModel().beginUpdate();try{P="1"==mxUtils.getValue(ta,"locked","0")?null:"1",p.setCellStyles("locked",P,[la])}finally{p.getModel().endUpdate()}"1"==-P&&p.removeSelectionCells(p.getModel().getDescendants(la));mxEvent.consume(aa)}});Y.appendChild(ia);mxUtils.write(ha,ea);ha.style.display="block";ha.style.whiteSpace="nowrap";ha.style.overflow="hidden";ha.style.textOverflow="ellipsis";ha.style.position="absolute";ha.style.padding="2px";ha.style.left="52px";ha.style.right="8px";Y.appendChild(ha);V.appendChild(Y);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ea=document.createElement("div"),ea.style.display=-"block",ea.style.textAlign="right",ea.style.whiteSpace="nowrap",ea.style.position="absolute",ea.style.right="16px",ea.style.top="6px",0<S&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toBack")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▼",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",ea.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,-S-1);mxEvent.consume(aa)})),0<=S&&S<C-1&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toFront")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▲",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",ea.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,S+1);mxEvent.consume(aa)})),V.appendChild(ea);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&+P&&p.removeSelectionCells(p.getModel().getDescendants(la));mxEvent.consume(aa)}});Y.appendChild(ia);mxUtils.write(ha,fa);ha.style.display="block";ha.style.whiteSpace="nowrap";ha.style.overflow="hidden";ha.style.textOverflow="ellipsis";ha.style.position="absolute";ha.style.padding="2px";ha.style.left="52px";ha.style.right="8px";Y.appendChild(ha);V.appendChild(Y);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)fa=document.createElement("div"),fa.style.display=+"block",fa.style.textAlign="right",fa.style.whiteSpace="nowrap",fa.style.position="absolute",fa.style.right="16px",fa.style.top="6px",0<S&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toBack")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▼",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",fa.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,+S-1);mxEvent.consume(aa)})),0<=S&&S<C-1&&(Y=document.createElement("a"),Y.setAttribute("title",mxResources.get("toFront")),Y.className="geButton",Y.style.cssFloat="none",Y.innerHTML="▲",Y.style.width="14px",Y.style.height="14px",Y.style.fontSize="14px",Y.style.margin="0px",Y.style.marginTop="-1px",fa.appendChild(Y),mxEvent.addListener(Y,"click",function(aa){p.isEnabled()&&p.addCell(la,p.model.root,S+1);mxEvent.consume(aa)})),V.appendChild(fa);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(V.setAttribute("draggable","true"),V.style.cursor="move")}mxEvent.addListener(V,"dblclick",function(aa){var P=mxEvent.getSource(aa).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ha.contentEditable&&(m(la),mxEvent.consume(aa))});p.getDefaultParent()==la&&(V.classList.add("geActivePage"),V.style.fontWeight=p.isEnabled()?"bold":"",D=la);mxEvent.addListener(V,"click",function(aa){p.isEnabled()&&"true"!=ha.contentEditable&&(p.setDefaultParent(O),p.view.setCurrentRoot(null),mxEvent.isShiftDown(aa)&&p.setSelectionCells(la.children),mxEvent.consume(aa))});u.appendChild(V)}p.isEnabled()?(X.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),W.classList.remove("mxDisabled"),J.classList.remove("mxDisabled")):(X.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),W.classList.add("mxDisabled"),J.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";K.clear();for(var ca=C-1;0<=ca;ca--)mxUtils.bind(this,function(S){N(ca,p.convertValueToString(S)||mxResources.get("background"),S,S)})(p.model.getChildAt(p.model.root,-ca));var H=p.convertValueToString(D)||mxResources.get("background");X.setAttribute("title",mxResources.get("removeIt",[H]));W.setAttribute("title",mxResources.get("duplicateIt",[H]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(N){if(p.isEnabled()&&null!=N){var ca=K.get(N);if(null!=ca){var H=ca.getElementsByTagName("span");if(null!=H&&0<H.length){var S=H[0],ea=mxUtils.getTextContent(S);S.style.textOverflow="";S.style.cursor="text";S.contentEditable="true";S.focus();document.execCommand("selectAll",-!1,null);ca.removeAttribute("draggable");ca.style.cursor="";var la=function(O){if("true"==S.contentEditable){S.contentEditable="false";var V=mxUtils.getTextContent(S);O&&V!=ea?(V=mxUtils.getTextContent(S),0<V.length?p.cellLabelChanged(N,V):p.cellLabelChanged(N,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(S,"keydown",function(O){if(13==O.keyCode||27==O.keyCode)la(13==O.keyCode),mxEvent.consume(O)});mxEvent.addListener(S,"blur",function(O){la(!0);mxEvent.consume(O)})}}}}var p=a.editor.graph,+ca));var H=p.convertValueToString(D)||mxResources.get("background");X.setAttribute("title",mxResources.get("removeIt",[H]));W.setAttribute("title",mxResources.get("duplicateIt",[H]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(N){if(p.isEnabled()&&null!=N){var ca=K.get(N);if(null!=ca){var H=ca.getElementsByTagName("span");if(null!=H&&0<H.length){var S=H[0],fa=mxUtils.getTextContent(S);S.style.textOverflow="";S.style.cursor="text";S.contentEditable="true";S.focus();document.execCommand("selectAll",+!1,null);ca.removeAttribute("draggable");ca.style.cursor="";var la=function(O){if("true"==S.contentEditable){S.contentEditable="false";var V=mxUtils.getTextContent(S);O&&V!=fa?(V=mxUtils.getTextContent(S),0<V.length?p.cellLabelChanged(N,V):p.cellLabelChanged(N,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(S,"keydown",function(O){if(13==O.keyCode||27==O.keyCode)la(13==O.keyCode),mxEvent.consume(O)});mxEvent.addListener(S,"blur",function(O){la(!0);mxEvent.consume(O)})}}}}var p=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,y=null;mxEvent.addListener(k,"dragover",function(N){N.dataTransfer.dropEffect="move";y=0;N.stopPropagation();N.preventDefault()});mxEvent.addListener(k,"drop",function(N){N.stopPropagation();N.preventDefault()});var C=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var G=document.createElement("a");G.className="geButton";var J=G.cloneNode(!1);J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(J,"click",function(N){if(p.isEnabled()){p.model.beginUpdate();try{var ca=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(ca)}finally{p.model.endUpdate()}m(ca)}mxEvent.consume(N)});-p.isEnabled()||J.classList.add("mxDisabled");E.appendChild(J);var M=G.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(N){if(p.isEnabled()&&!p.isSelectionEmpty()){var ca=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(H,S){for(var ea=p.getLayerForCells(p.getSelectionCells()),la=C-1;0<=la;la--)mxUtils.bind(this,function(O){var V="1"==mxUtils.getValue(p.getCurrentCellStyle(O),-"locked","0"),Y=H.addItem(p.convertValueToString(O)||mxResources.get("background"),null,mxUtils.bind(this,function(){V||p.moveCells(p.getSelectionCells(),0,0,!1,O)}),S,null,null,!V);V?H.addCheckmark(Y,Editor.lockedImage):O==ea&&H.addCheckmark(Y,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,la))}),ca.x,ca.y+M.offsetHeight,N)}});E.appendChild(M);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,+p.isEnabled()||J.classList.add("mxDisabled");E.appendChild(J);var M=G.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(N){if(p.isEnabled()&&!p.isSelectionEmpty()){var ca=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(H,S){for(var fa=p.getLayerForCells(p.getSelectionCells()),la=C-1;0<=la;la--)mxUtils.bind(this,function(O){var V="1"==mxUtils.getValue(p.getCurrentCellStyle(O),+"locked","0"),Y=H.addItem(p.convertValueToString(O)||mxResources.get("background"),null,mxUtils.bind(this,function(){V||p.moveCells(p.getSelectionCells(),0,0,!1,O)}),S,null,null,!V);V?H.addCheckmark(Y,Editor.lockedImage):O==fa&&H.addCheckmark(Y,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,la))}),ca.x,ca.y+M.offsetHeight,N)}});E.appendChild(M);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(N){p.isEnabled()&&a.showDataDialog(D);mxEvent.consume(N)});p.isEnabled()||Q.classList.add("mxDisabled");E.appendChild(Q);var K=new mxDictionary,W=G.cloneNode(!1);W.style.backgroundImage="url("+Editor.duplicateImage+")";W.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(W,"click",function(N){if(p.isEnabled()){N=null;p.model.beginUpdate();try{N=p.cloneCell(D),p.cellLabelChanged(N,mxResources.get("untitledLayer")),N.setVisible(!0),N=p.addCell(N,p.model.root),p.setDefaultParent(N)}finally{p.model.endUpdate()}null==N||p.isCellLocked(N)||p.selectAll(N)}});p.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);var X=G.cloneNode(!1);X.style.backgroundImage="url("+Editor.trashImage+")";X.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(X,"click",function(N){if(p.isEnabled()){p.model.beginUpdate();try{var ca=p.model.root.getIndex(D);p.removeCells([D],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<ca&&ca<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,ca-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(N)});p.isEnabled()||X.classList.add("mxDisabled");E.appendChild(X);k.appendChild(E);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="•";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",@@ -12161,12 +12162,12 @@ null==oa&&(oa=[],ya[sa]=oa),oa.push(qa))}ia=ia.nextSibling}N.stop();H()}})};g.ap"right";v.style.position="absolute";v.style.left="40px";v.style.bottom="24px";v.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=z&&z();b.hideDialog(!0)});D.className="geBtn";!b.editor.cancelFirst||x&&null==z||v.appendChild(D);l||"1"==urlParams.embed||x||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(l=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ia=new FilenameDialog(b,"",mxResources.get("create"),function(ua){null!=ua&&0<ua.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ua),function(sa){Z=sa;fa=null;templateRealURl=ua;b.hideDialog();T()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ia.container,300,80,!0,!0);ia.init()}),l.className="geBtn",v.appendChild(l));Graph.fileSupport&&m&&(m=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ia=document.createElement("input");ia.setAttribute("multiple","multiple");ia.setAttribute("type","file");mxEvent.addListener(ia,"change",function(ua){b.openFiles(ia.files,!0);ia.value=""});ia.style.display="none";document.body.appendChild(ia);b.newDlgFileInputElt=ia}b.newDlgFileInputElt.click()}),m.className="geBtn",v.appendChild(m));v.appendChild(O);b.editor.cancelFirst||null!=d||x&&null==z||v.appendChild(D);g.appendChild(v);this.container=g};NewDialog.tagsList={};-var SaveDialog=function(b,l,n,d,x,z,y,F){function M(G,H,g,p,C,I){var N=null;if(null==d||0>mxUtils.indexOf(d,G)){C=null!=C?C:b.getTitleForService(G);var O=0<=mxUtils.indexOf(T,G);if(O||null!=b.getServiceForName(G)){N=document.createElement("option");var S="";!O&&b.isOffline()&&(N.setAttribute("disabled","disabled"),S=" ("+mxResources.get("offline")+")");if("pick"==I)N.innerHTML=mxUtils.htmlEntities(C)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+S,N.setAttribute("value",-"pickFolder-"+G),N.setAttribute("title",C+" - "+mxResources.get("pickFolder")+"...");else{O=G+(null!=g?"-"+g:"");var R=u[O];null!=R&&null!=R.option&&R.option.parentNode.removeChild(R.option);R=null;if(null!=H){"/"==H.charAt(H.length-1)&&(H=H.substring(0,H.length-1));"/"==H.charAt(0)&&(H=H.substring(1));R=H;if(G!=App.MODE_GITHUB&&G==App.MODE_GITLAB){var V=R.lastIndexOf("/");0<=V&&(R=R.substring(V+1))}40<R.length&&(R=R.substring(0,20)+"..."+R.substring(R.length-20))}N.innerHTML=mxUtils.htmlEntities(C)+-(null!=R?" – "+mxUtils.htmlEntities(R):"")+S;N.setAttribute("title",C+(null!=H?" ("+H+")":"")+(null!=g&&decodeURIComponent(g)!=H?" ["+g+"]":""));N.setAttribute("value",O);u[O]={option:N,mode:G,path:H,id:g};SaveDialog.lastValue==O&&null==F&&"disabled"==!N.getAttribute("disabled")?p=!0:null==p&&("root"==I?p=null==F&&b.mode==G||null!=G&&G==F:"pickFolder-"==Q.value.substring(0,11)&&(p=!0));p&&N.setAttribute("selected","selected")}Q.appendChild(N)}}return N}function K(G){b.pickFolder(G,-function(H){var g=null;G==App.MODE_GOOGLE&&null!=H.docs&&0<H.docs.length?g={mode:G,path:H.docs[0].name,id:H.docs[0].id}:G==App.MODE_ONEDRIVE&&null!=H.value&&0<H.value.length?g={mode:G,path:H.value[0].name,id:OneDriveFile.prototype.getIdOf(H.value[0])}:(G==App.MODE_GITHUB||G==App.MODE_GITLAB)&&null!=H&&0<H.length&&(g={mode:G,path:decodeURIComponent(H),id:H});null!=g&&(U.style.display="",b.addRecent(g,"Folders",5),H=M(g.mode,g.path,g.id,!0),Q.innerHTML="",u={},L(),g=Q.selectedIndex,Q.value=H.value,-0>Q.selectedIndex&&(Q.selectedIndex=g))},!0,!0,!0,!0)}function L(){var G=b.getRecent("Folders"),H=0;if(null!=G&&0<G.length){for(var g=0;g<G.length;g++)null!=M(G[g].mode,G[g].path,G[g].id)&&H++;0<H&&Q.appendChild(P.cloneNode(!0))}M(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");M(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(M(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),M(App.MODE_ONEDRIVE,null,-null,null,null,"pick"));null!=b.dropbox&&M(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);M(App.MODE_GITHUB,null,null,null,null,"pick");M(App.MODE_GITLAB,null,null,null,null,"pick");M(App.MODE_TRELLO);G=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&G&&M(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&&M(App.MODE_BROWSER);+var SaveDialog=function(b,l,n,d,x,z,y,F){function M(G,H,g,p,C,I){var N=null;if(null==d||0>mxUtils.indexOf(d,G)){C=null!=C?C:b.getTitleForService(G);var O=0<=mxUtils.indexOf(T,G);if(O||null!=b.getServiceForName(G)){N=document.createElement("option");var S="";!O&&b.isOffline(G==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(N.setAttribute("disabled","disabled"),S=" ("+mxResources.get("offline")+")");if("pick"==I)N.innerHTML=mxUtils.htmlEntities(C)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))++"..."+S,N.setAttribute("value","pickFolder-"+G),N.setAttribute("title",C+" - "+mxResources.get("pickFolder")+"...");else{O=G+(null!=g?"-"+g:"");var R=u[O];null!=R&&null!=R.option&&R.option.parentNode.removeChild(R.option);R=null;if(null!=H){"/"==H.charAt(H.length-1)&&(H=H.substring(0,H.length-1));"/"==H.charAt(0)&&(H=H.substring(1));R=H;if(G!=App.MODE_GITHUB&&G==App.MODE_GITLAB){var V=R.lastIndexOf("/");0<=V&&(R=R.substring(V+1))}40<R.length&&(R=R.substring(0,20)+"..."+R.substring(R.length-20))}N.innerHTML=+mxUtils.htmlEntities(C)+(null!=R?" – "+mxUtils.htmlEntities(R):"")+S;N.setAttribute("title",C+(null!=H?" ("+H+")":"")+(null!=g&&decodeURIComponent(g)!=H?" ["+g+"]":""));N.setAttribute("value",O);u[O]={option:N,mode:G,path:H,id:g};SaveDialog.lastValue==O&&null==F&&"disabled"==!N.getAttribute("disabled")?p=!0:null==p&&("root"==I?p=null==F&&b.mode==G||null!=G&&G==F:"pickFolder-"==Q.value.substring(0,11)&&(p=!0));p&&N.setAttribute("selected","selected")}Q.appendChild(N)}}return N}+function K(G){b.pickFolder(G,function(H){var g=null;G==App.MODE_GOOGLE&&null!=H.docs&&0<H.docs.length?g={mode:G,path:H.docs[0].name,id:H.docs[0].id}:G==App.MODE_ONEDRIVE&&null!=H.value&&0<H.value.length?g={mode:G,path:H.value[0].name,id:OneDriveFile.prototype.getIdOf(H.value[0])}:(G==App.MODE_GITHUB||G==App.MODE_GITLAB)&&null!=H&&0<H.length&&(g={mode:G,path:decodeURIComponent(H),id:H});null!=g&&(U.style.display="",b.addRecent(g,"Folders",5),H=M(g.mode,g.path,g.id,!0),Q.innerHTML="",u={},L(),g=Q.selectedIndex,+Q.value=H.value,0>Q.selectedIndex&&(Q.selectedIndex=g))},!0,!0,!0,!0)}function L(){var G=b.getRecent("Folders"),H=0;if(null!=G&&0<G.length){for(var g=0;g<G.length;g++)null!=M(G[g].mode,G[g].path,G[g].id)&&H++;0<H&&Q.appendChild(P.cloneNode(!0))}M(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");M(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(M(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),M(App.MODE_ONEDRIVE,+null,null,null,null,"pick"));null!=b.dropbox&&M(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);M(App.MODE_GITHUB,null,null,null,null,"pick");M(App.MODE_GITLAB,null,null,null,null,"pick");M(App.MODE_TRELLO);G=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&G&&M(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&&M(App.MODE_BROWSER);G&&M("download");Editor.popupsAllowed&&M("_blank",null,null,null,mxResources.get("openInNewWindow"));0<H&&(Q.appendChild(P.cloneNode(!0)),H=Q.value,Q.appendChild(U),Q.value=H);if("pickFolder-"==Q.value.substring(0,11)||"reset"==Q.value)H=document.createElement("option"),H.setAttribute("value",""),H.setAttribute("selected","selected"),mxUtils.write(H,mxResources.get("pickFolder")+"..."),Q.insertBefore(H,Q.firstChild);q=Q.value}function c(){if("reset"==Q.value)b.resetRecent("Folders"),Q.innerHTML="",Q.value="",pickFolderOption=null,u={},L();else if("pickFolder-"==Q.value.substring(0,11)){var G=Q.value.substring(11);Q.value=q;K(G)}else if(null!=B&&null!=u[Q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[B.value].extension){G=b.getExtensionForService(u[Q.value].mode);var H=D.value;null!=G&&0>l.indexOf(".")&&0>H.indexOf(".")&&(D.value=H+G)}J.innerHTML="";mxUtils.write(J,mxResources.get("download"==Q.value||"_blank"==Q.value?"ok":"save"));""==Q.value?J.setAttribute("disabled","disabled"):J.removeAttribute("disabled")}var f=document.createElement("div");f.style.display="flex";f.style.flexWrap="wrap";f.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="grid";k.style.gap="5px 8px";k.style.gridAutoRows="auto auto 44px";k.style.gridAutoColumns="0fr minmax(0,1fr)";k.style.width="100%";var m=null,t=null;if(null!=x&&null!=z&&"image/"==z.substring(0,6)&&("image/svg"!=z.substring(0,9)||mxClient.IS_SVG)){k.style.display="inline-grid";k.style.flexBasis=@@ -12746,7 +12747,7 @@ R.appendChild(S);p=document.createElement("div");p.style.marginTop="30px";p.stylV.className="geBtn",p.appendChild(V));I=null!=I?I:null!=C?"export":PrintDialog.previewEnabled?"print":"ok";I=mxUtils.button(mxResources.get(I),function(){try{g.hideDialog(),O(!0)}catch(Ba){g.handleError(Ba)}});I.className="geBtn gePrimaryBtn";p.appendChild(I);g.editor.cancelFirst||p.appendChild(S);R.appendChild(p);if(g.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(R.classList.add("geDarkMode"),R.style.colorScheme="dark"):(R.classList.remove("geDarkMode"),R.style.colorScheme="light")};g.addListener("darkModeChanged",Ka);Ka();var Na=function(Ba,Ia){Ba=Ia.getProperty("dialog");R.parentNode==Ba.container&&(g.editor.removeListener(Na),g.removeListener(Ka))};g.editor.addListener("hideDialog",Na)}this.container=R};var H=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 H.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)}})();(function(){EditorUi.VERSION="28.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&&+(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)}})();(function(){EditorUi.VERSION="28.1.1";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||"1"==urlParams.dev;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:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',@@ -12783,107 +12784,107 @@ u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("ednull!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=T&&(u=u.cloneNode(!0),u.setAttribute("border",T));c=Q?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!v&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=k?k.getTitle():null,q,P);else if(v||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(m=null),k=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,f,m,null,E,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,m){c=null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var B=D.getElementsByTagName("mxGraphModel"),Q=0<B.length?B[0]:null;B=D;null==Q&&k?(Q=mxUtils.getNodeValue(D),0<Q.length&&(Q=Graph.decompress(Q),null!=Q&&0<Q.length&&(B=D.cloneNode(!1),B.appendChild(mxUtils.parseXml(Q).documentElement)))):null==Q||k?B=D.cloneNode(!0):(B=D.cloneNode(!1),mxUtils.setTextContent(B,Graph.compressNode(Q)));t.appendChild(B)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var v=this.pages[f],A=v.node;if(v!=this.currentPage)if(v.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(v.root));-this.editor.graph.saveViewState(v.viewState,E,null,m);EditorUi.removeChildNodes(A);A.appendChild(E);delete v.needsUpdate}else m&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&(null!=v.viewState.backgroundImage.originalSrc?v.viewState.backgroundImage=this.createImageForPageLink(v.viewState.backgroundImage.originalSrc,v):Graph.isPageLink(v.viewState.backgroundImage.src)&&(v.viewState.backgroundImage=this.createImageForPageLink(v.viewState.backgroundImage.src,v))),null!=v.viewState.backgroundImage&&-null!=v.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(v.root)),this.editor.graph.saveViewState(v.viewState,E,null,m),A=A.cloneNode(!1),A.appendChild(E)));c(A)}return t};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],m=0;m<c.length;m++){var t=c.charAt(m);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(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(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(v){c[EditorUi.DIFF_INSERT][f].data=v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var t=c[EditorUi.DIFF_UPDATE][m];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(v){var A=t.cells[v];if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&-delete A[E];mxUtils.isEmptyObject(A)&&delete t.cells[v]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}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.clearStatus(),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,m,t,v,A,E,D,B,Q,U,T){t=null!=t?t:!0;v=null!=v?v:!1;B=null!=B?B:!Editor.defaultCompressed;-var P=this.editor.graph;if((f||!c&&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 u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&P.setBackgroundImage(u.viewState.backgroundImage);-P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}A=null!=A?A:this.getXmlFileData(t,v,B,Q);D=null!=D?D:this.getCurrentFile();c=this.createFileData(A,P,D,window.location.href,c,f,k,m,t,E,B,U,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,k,m,t,v){v=null!=v?v:!0;var A=null,E=EditorUi.drawHost+-"/js/embed-static.min.js";if(null!=f){A=v?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;v=Math.floor(A.x/D-f.view.translate.x);D=Math.floor(A.y/D-f.view.translate.y);A=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(E=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",v);c.setAttribute("y0",D)}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!=m&&c.setAttribute("edit",m));null!=t&&(t=t.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));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;">'+m+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+E+'">\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(c,f,k,m,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.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==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(c))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\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(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 m=this.getHashObject(),t=null;this.fileNode=f;this.pages=[];for(var v=0;v<c.length;v++){null==c[v].getAttribute("id")&&c[v].setAttribute("id",v);f=new DiagramPage(c[v]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1]));this.pages.push(f);-if(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=t?t: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 A=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(v=0;v<A.length;v++)f[A[v]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(v=0;v<D.length;v++){var B=D[v];E.setVisible(B,f[B.id]||!1)}}catch(Q){}};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,m,t,v,A,E,D,B,Q,U,T,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&Q?".drawio":"")+"."+c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,S){try{return this.createDownloadRequest(O,c,m,S,A,t,E,D,B,Q,U,void 0,void 0,!v,T,P,q,u,J)}catch(R){this.handleError(R)}}));else{var p=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var I=this.editor.graph.background;-if(A||I==mxConstants.NONE)I=null;var N=this.editor.graph.getSvg(I,null,null,null,null,m);k&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else H=G+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,m,t,v,A,E,D,-B,Q,U,T,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H);f="";for(var g in c)k=c[g],null!=k&&(f+=g+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H){var g=this.editor.graph,p=g.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,N=null;if(!EditorUi.isElectronApp&&(p.width*-p.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==f&&(null!=Q?(C=Q.from,I=Q.to):0==v&&(N="1"));"xmlpng"==f&&(B="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){C=v;break}v=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=Q&&null!=-Q.from&&(t.globalVars.pagenumber=Q.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:N,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:B,xml:k,filename:null!=c?c:"",extras:JSON.stringify(t),scale:A,border:E,pageMargin:q,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=-u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:J,sheetsDown:G}};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(m){}}}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(m){}0<-k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var m=window.location.hash,t=mxUtils.bind(this,function(A){var E=null!=c.data?c.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return m};this.fileLoaded(A);"csv"==c.format&&this.importCsv(E,-mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?parseInt(c.interval):6E4,B=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")+-" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(B);B=window.setTimeout(Q,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();Q()}));U();Q()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=-new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);p.addListener(mxEvent.CLICK,function(C,I){m.alert(g.tooltip)});return p}var k=null,m=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,v=t.getModel();v.beginUpdate();var A=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=v.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var B=-mxUtils.parseXml(D).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))v.setValue(E,B);else for(var Q=B.attributes,U=0;U<Q.length;U++)t.setAttributeForCell(E,Q[U].nodeName,0<Q[U].nodeValue.length?Q[U].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+E.id+": "+g)}try{var T=c.getAttribute("style");null!=T&&t.model.setStyle(E,T)}catch(g){null!=window.console&&console.log("Error in style for "+E.id+": "+g)}try{var P=c.getAttribute("icon");if(null!=P){var q=-0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(E);null!=q&&t.addCellOverlay(E,f(q))}}catch(g){null!=window.console&&console.log("Error in icon for "+E.id+": "+g)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var J=t.getCellGeometry(E);if(null!=J){J=J.clone();for(key in u){var G=parseFloat(u[key]);"dx"==key?J.x+=G:"dy"==key?J.y+=G:"dw"==key?J.width+=G:"dh"==key?J.height+=G:J[key]=parseFloat(u[key])}t.model.setGeometry(E,J)}}}catch(g){null!=window.console&&-console.log("Error in icon for "+E.id+": "+g)}}}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,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(A=c.hasAttribute("max-scale")?-parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(c,f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=k.lastIndexOf(".");0<=m&&(c=k.substring(m),k=k.substring(0,m));if(f){f=k;var t=new Date;k=t.getFullYear();m=t.getMonth()+1;var v=t.getDate(),A=t.getHours(),E=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+m+"-"+v+"-"+A+"-"+-E+"-"+t))}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 m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,-function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=m&&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.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=-c)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));t=!0;if(!this.isOffline()&&null!=-c.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.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+A})}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(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||v():v()});f?c():(null!=E.fallbackFileData&&(E.alternateAction=-{label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else v();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var k=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var A=c[v].node.cloneNode(!1);-A.removeAttribute("name");m.root=c[v].root;var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=f&&(f.eltCount+=A.getElementsByTagName("*").length,f.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(D,B,Q,U){return!U||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?U&&"mxCell"==D.nodeName&&"previous"==B?null:Q:Math.round(Q)},-f)<<0}return k};EditorUi.prototype.hashValue=function(c,f,k){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var v=c.attributes[t].name,A=null!=f?f(c,v,c.attributes[t].value,!0):c.attributes[t].value;null!=A&&(m^=this.hashValue(v,f,k)+this.hashValue(A,-f,k))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=(m<<5)-m+this.hashValue(c.childNodes[t],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,m,t,v,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(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 m=f.previousSibling;k.insertBefore(f,c);k.insertBefore(m,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());-if("mxlibrary"==k.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,m,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.showSearchWindow=function(c,f){var k=c?"findReplace":"find",-m=k+"Window";if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,v=c?t?330:300:240;this[m]=new FindWindow(this,document.body.offsetWidth-(v+20),100,v,c?t?304:288:180,c);this[m].window.addListener("show",function(){this.fireEvent(new mxEventObject(k))});this[m].window.addListener("hide",function(){this.fireEvent(new mxEventObject(k))});this[m].window.setVisible(!0)}else null==f&&this[m].window.setVisible(!this[m].window.isVisible());null!=-f&&(this[m].doSearch(f),this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,k,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var v=0;v<this.openLibraries.length;v++)if(this.openLibraries[v].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[v],this.openLibraries);break}t={file:c,images:f,title:k,-expand:m};this.openLibraries.push(t)}else this.scratchpad=c;v=this.sidebar.palettes[c.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var A=null,E=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),H.appendChild(A)):this.addLibraryEntries(G,H)});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 D=this.sidebar.addPalette(c.getHash(),k,null!=m?m:!0,mxUtils.bind(this,function(G){E(f,G)}));null!=t&&(t.div=D);this.repositionLibrary(v,"L.scratchpad"!=c.getHash());m=D.parentNode.previousSibling;k=m.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var B=document.createElement("div");B.style.backgroundColor="inherit";m.style.position="relative";var Q=-document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)B.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),-mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var T=this.editor.graph,P=null;k=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.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",B.insertBefore(P,B.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=Q.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),B.insertBefore(U,B.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,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(G,H,g,p){G=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=T.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=A&&null!=-A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),J=mxUtils.bind(this,function(G){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(G),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=T.getSelectionCells(),g=T.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=T.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=T.view.translate.x;g.y-=T.view.translate.y;-u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(G))}),-mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,J(G),mxEvent.consume(G))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor=-"",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){D.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){D.style.cursor="";D.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,-function(H,g,p,C,I,N,O,S,R){if(null!=H&&"image/"==g.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,I,N),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,I,N),G,mxEvent.isAltDown(G)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null);else{var V=!1,Y=mxUtils.bind(this,function(W,X){null!=W&&"application/pdf"==-X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var aa=JSON.parse(mxUtils.getTextContent(W.documentElement));E(aa,D);f=f.concat(aa);q(G);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var ba=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<ba.length;aa++){var la=this.stringToCells(Editor.getDiagramNodeXml(ba[aa])),ea=this.editor.graph.getBoundingBoxFromGeometry(la);-null!=ea&&u(la,new mxRectangle(0,0,ea.width,ea.height),G)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)});null!=R&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(R,function(W){Y(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,O)&&null!=R?this.isExternalDataComms()?-this.parseFile(R,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?Y(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):Y(H,g)}}));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"dragleave",function(G){D.style.cursor="";D.style.backgroundColor=-"";G.stopPropagation();G.preventDefault()}));Q=Q.cloneNode(!1);Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("edit"));B.insertBefore(Q,B.firstChild);mxEvent.addListener(Q,"click",k);k=Q.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));B.insertBefore(k,B.firstChild);mxEvent.addListener(k,"click",J);".scratchpad"==c.title&&(this.addSelectionToScratchpad=J);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||-(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),k.className="geLibraryButton",B.insertBefore(k,B.firstChild))}m.appendChild(B);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var m=c[k],t=m.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var v="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(v+="aspect=fixed;");v=v+"image="+t+";";-null!=m.style&&(v+=m.style);f.appendChild(this.sidebar.createVertexTemplate(v,m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var A=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),E=0==A.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(A,m.w,m.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),v=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,-E,!0,null,!0),f.appendChild(v)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,m,t,v,A){c=new ImageDialog(this,c,f,k,m,-t,v,A);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,m,t,v){var A=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=v&&v(E),E==A)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(f,JSON.stringify(D))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(B){this.handleError(B)}}),-null,mxResources.get("close"),null,null,null,!0,null,null,t,k,m);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,k,m){c=null!=c?c:mxUtils.bind(this,function(t,v,A,E){v||(t=new ChangePageSetup(this,m?A:null,t),t.ignoreColor=!m,null!=E&&m&&(t.shadowVisible=E),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,k,m);this.showDialog(c.container,400,m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,-f,k,m,t){c=new LibraryDialog(this,c,f,k,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var n=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=n.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,-m,t,v,A){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{A||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=D||null!=f){A=mxUtils.htmlEntities(mxResources.get("unknownError"),-!1);var B=mxResources.get("ok"),Q=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(B=mxResources.get("cancel"),Q=function(){E();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 U=null!=t?null:null!=-v?v: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==D.code||404==D.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,-function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=m&&m()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML=" ";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");J.appendChild(H)}H=document.createElement("option");-mxUtils.write(H,mxResources.get("addAccount"));H.value=P.length;J.appendChild(H)}var P=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var J=document.createElement("select");J.style.width="100%";T();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var G=J.value,H=P.length!=G;H&&this.drive.setUser(P[G]);this.drive.authorize(H,mxUtils.bind(this,function(){H||-(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(J);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=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),-A+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,t=D.alternateAction.funct);this.showError(f,A,B,k,Q,null,null,c,t,null,null,null,m?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,m,t,v){c=null!=c?c:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){A();null!=f&&f()},function(){A();null!=k&&k()},m,t,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,f,k,m,t,v,A,E,D){v=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+-c])){A=null!=A?A:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var B=document.createElement("div");B.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");B.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(B.style,"transform",A);mxUtils.setPrefixedStyle(B.style,"transition","all 1000ms ease");null!=D&&mxUtils.setPrefixedStyle(B.style,"transform-origin",D);D=D=document.createElement("img");D.setAttribute("src",Editor.crossImage);D.setAttribute("title",mxResources.get(m?-"doNotShowAgain":"close"));D.setAttribute("border","0");t||(v=document.createElement("img"),v.setAttribute("src",IMAGE_PATH+"/logo.png"),v.setAttribute("border","0"),v.setAttribute("align","absmiddle"),v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",B.appendChild(v),D.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",B.appendChild(D));mxUtils.write(B,f);document.body.appendChild(B);-this.bannerShowing=!0;t&&(D.className="geLibraryButton",B.appendChild(D));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 Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!m){f.appendChild(Q);var U=document.createElement("label");U.setAttribute("for","geDoNotShowAgainCheckbox");-mxUtils.write(U,mxResources.get("doNotShowAgain"));f.appendChild(U);B.style.paddingBottom=t?"16px":"30px";B.appendChild(f)}var T=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,Q.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,-"transform",A);window.setTimeout(mxUtils.bind(this,function(){T()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=Q&&u!=U?(null!=k&&k(),T(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};-EditorUi.prototype.createImageDataUri=function(c,f,k,m){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,k,m,t){var v="jpeg"==k?"jpg":k;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+v;c=this.createImageDataUri(c,f,k,t);this.saveData(m,v,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,m,t,v){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?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,m);else{var A=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);v=65==(E?parseInt(E[2],10):!1)?!1:v}if(v||this.isOffline()){A.href=URL.createObjectURL(m?this.base64ToBlob(c,-k):new Blob([c],{type:k}));v?A.download=f: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(c,f,k,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,m,t,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=v?"&base64="+v:"")+(null!=f?"&filename="+-encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,m,t,v,A,E,D){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var B=mxUtils.bind(this,function(U,T,P,q){try{if("_blank"==T)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,-!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(T==App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(c,U,k,m,null,E);else if(null!=U&&0<U.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,U,k,m,T,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(T,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);A||t.push("_blank");var Q=new SaveDialog(this,f,mxUtils.bind(this,function(U,T,P){B(U.value,T,U,P);this.hideDialog(null,-null,Q.container)}),t,c,k,m,D);this.showDialog(Q.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));Q.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var v=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=v&&(t="background: "+v+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+-t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(v=k?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+v+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.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 f=c(mxUtils.bind(this,function(m){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.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,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 t=f.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(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.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,+this.editor.graph.saveViewState(v.viewState,E,null,m);EditorUi.removeChildNodes(A);A.appendChild(E);delete v.needsUpdate}else m&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&null!=v.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(v.root)),this.editor.graph.saveViewState(v.viewState,E,null,m,v),A=A.cloneNode(!1),A.appendChild(E)));c(A)}return t};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],m=0;m<c.length;m++){var t=+c.charAt(m);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(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(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(v){c[EditorUi.DIFF_INSERT][f].data=v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var t=c[EditorUi.DIFF_UPDATE][m];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(v){var A=t.cells[v];+if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&&delete t.cells[v]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}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.clearStatus(),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,m,t,v,A,E,D,B,Q,U,T){t=null!=t?t:!0;v=null!=v?v:!1;B=null!=B?B:!Editor.defaultCompressed;var P=this.editor.graph;if((f||!c&&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 u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&P.setBackgroundImage(u.viewState.backgroundImage);P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}A=null!=A?A:this.getXmlFileData(t,v,B,Q);D=null!=D?D:this.getCurrentFile();c=this.createFileData(A,P,D,+window.location.href,c,f,k,m,t,E,B,U,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,k,m,t,v){v=null!=v?v:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){A=v?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;v=Math.floor(A.x/D-f.view.translate.x);D=Math.floor(A.y/D-f.view.translate.y);A=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(E=EditorUi.drawHost++"/embed.js?s="+f));c.setAttribute("x0",v);c.setAttribute("y0",D)}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!=m&&c.setAttribute("edit",m));null!=t&&(t=t.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));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;">'+m+"</div>\n</div>\n"++(null==t?'<script type="text/javascript" src="'+E+'">\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(c,f,k,m,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.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==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(c))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\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(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 m=this.getHashObject(),t=null;this.fileNode=f;this.pages=[];for(var v=0;v<c.length;v++){null==c[v].getAttribute("id")&&c[v].setAttribute("id",v);f=new DiagramPage(c[v]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1]));this.pages.push(f);if(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=+null!=t?t: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 A=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(v=0;v<A.length;v++)f[A[v]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(v=0;v<D.length;v++){var B=D[v];E.setVisible(B,f[B.id]||!1)}}catch(Q){}};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,m,t,v,A,E,D,B,Q,U,T,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&Q?".drawio":"")+"."++c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,S){try{return this.createDownloadRequest(O,c,m,S,A,t,E,D,B,Q,U,void 0,+void 0,!v,T,P,q,u,J)}catch(R){this.handleError(R)}}));else{var p=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var I=this.editor.graph.background;if(A||I==mxConstants.NONE)I=null;var N=this.editor.graph.getSvg(I,null,null,null,null,m);k&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,+mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else H=G+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H);f="";for(var g in c)k=c[g],null!=k&&(f+=g+"="+encodeURIComponent(k)++"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H){var g=this.editor.graph,p=g.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,N=null;if(!EditorUi.isElectronApp&&(p.width*p.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==f&&(null!=Q?(C=Q.from,I=Q.to):0==v&&+(N="1"));"xmlpng"==f&&(B="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){C=v;break}v=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=Q&&null!=Q.from&&(t.globalVars.pagenumber=Q.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:+g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:N,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:B,xml:k,filename:null!=c?c:"",extras:JSON.stringify(t),scale:A,border:E,pageMargin:q,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:J,sheetsDown:G}};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(m){}}}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(m){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var m=window.location.hash,+t=mxUtils.bind(this,function(A){var E=null!=c.data?c.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return m};this.fileLoaded(A);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?+parseInt(c.interval):6E4,B=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(B);B=window.setTimeout(Q,+D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();Q()}));U();Q()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);p.addListener(mxEvent.CLICK,function(C,I){m.alert(g.tooltip)});+return p}var k=null,m=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,v=t.getModel();v.beginUpdate();var A=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=v.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var B=mxUtils.parseXml(D).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))v.setValue(E,B);else for(var Q=B.attributes,U=0;U<+Q.length;U++)t.setAttributeForCell(E,Q[U].nodeName,0<Q[U].nodeValue.length?Q[U].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+E.id+": "+g)}try{var T=c.getAttribute("style");null!=T&&t.model.setStyle(E,T)}catch(g){null!=window.console&&console.log("Error in style for "+E.id+": "+g)}try{var P=c.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(E);null!=q&&t.addCellOverlay(E,f(q))}}catch(g){null!=window.console&&+console.log("Error in icon for "+E.id+": "+g)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var J=t.getCellGeometry(E);if(null!=J){J=J.clone();for(key in u){var G=parseFloat(u[key]);"dx"==key?J.x+=G:"dy"==key?J.y+=G:"dw"==key?J.width+=G:"dh"==key?J.height+=G:J[key]=parseFloat(u[key])}t.model.setGeometry(E,J)}}}catch(g){null!=window.console&&console.log("Error in icon for "+E.id+": "+g)}}}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,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(A=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,+A)}return k};EditorUi.prototype.getCopyFilename=function(c,f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=k.lastIndexOf(".");0<=m&&(c=k.substring(m),k=k.substring(0,m));if(f){f=k;var t=new Date;k=t.getFullYear();m=t.getMonth()+1;var v=t.getDate(),A=t.getHours(),E=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+m+"-"+v+"-"+A+"-"+E+"-"+t))}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){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[f]);var m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);+null!=m&&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.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));t=!0;if(!this.isOffline()&&null!=c.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.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+A})}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(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||v():v()});f?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,+function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else v();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var k=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var A=c[v].node.cloneNode(!1);A.removeAttribute("name");m.root=c[v].root;+var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=f&&(f.eltCount+=A.getElementsByTagName("*").length,f.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(D,B,Q,U){return!U||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?U&&"mxCell"==D.nodeName&&"previous"==B?null:Q:Math.round(Q)},f)<<0}return k};EditorUi.prototype.hashValue=+function(c,f,k){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var v=c.attributes[t].name,A=null!=f?f(c,v,c.attributes[t].value,!0):c.attributes[t].value;null!=A&&(m^=this.hashValue(v,f,k)+this.hashValue(A,f,k))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=+(m<<5)-m+this.hashValue(c.childNodes[t],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,m,t,v,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(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 m=f.previousSibling;k.insertBefore(f,c);k.insertBefore(m,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());if("mxlibrary"==+k.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,m,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.showSearchWindow=function(c,f){var k=c?"findReplace":"find",m=k+"Window";+if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,v=c?t?330:300:240;this[m]=new FindWindow(this,document.body.offsetWidth-(v+20),100,v,c?t?304:288:180,c);this[m].window.addListener("show",function(){this.fireEvent(new mxEventObject(k))});this[m].window.addListener("hide",function(){this.fireEvent(new mxEventObject(k))});this[m].window.setVisible(!0)}else null==f&&this[m].window.setVisible(!this[m].window.isVisible());null!=f&&(this[m].doSearch(f),+this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,k,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var v=0;v<this.openLibraries.length;v++)if(this.openLibraries[v].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[v],this.openLibraries);break}t={file:c,images:f,title:k,expand:m};this.openLibraries.push(t)}else this.scratchpad=+c;v=this.sidebar.palettes[c.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var A=null,E=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),H.appendChild(A)):this.addLibraryEntries(G,H)});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 D=this.sidebar.addPalette(c.getHash(),k,null!=m?m:!0,mxUtils.bind(this,function(G){E(f,G)}));null!=t&&(t.div=D);this.repositionLibrary(v,"L.scratchpad"!=c.getHash());m=D.parentNode.previousSibling;k=m.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var B=document.createElement("div");B.style.backgroundColor="inherit";m.style.position="relative";var Q=document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",+Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)B.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var T=+this.editor.graph,P=null;k=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.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",B.insertBefore(P,B.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=Q.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),B.insertBefore(U,B.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,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(G,+H,g,p){G=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=T.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),J=+mxUtils.bind(this,function(G){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(G),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=T.getSelectionCells(),g=T.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=T.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=T.view.translate.x;g.y-=T.view.translate.y;u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),+mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(G))}),mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&+(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,J(G),mxEvent.consume(G))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,+"dragover",mxUtils.bind(this,function(G){D.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){D.style.cursor="";D.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,g,p,C,I,N,O,S,R){if(null!=H&&"image/"==g.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,I,N),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,I,N),G,mxEvent.isAltDown(G)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null);else{var V=!1,Y=mxUtils.bind(this,function(W,X){null!=W&&"application/pdf"==X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&+(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var aa=JSON.parse(mxUtils.getTextContent(W.documentElement));E(aa,D);f=f.concat(aa);q(G);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var ba=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<ba.length;aa++){var la=this.stringToCells(Editor.getDiagramNodeXml(ba[aa])),ea=this.editor.graph.getBoundingBoxFromGeometry(la);null!=ea&&u(la,new mxRectangle(0,0,ea.width,+ea.height),G)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)});null!=R&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(R,function(W){Y(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,O)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(W){4==+W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?Y(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):Y(H,g)}}));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"dragleave",function(G){D.style.cursor="";D.style.backgroundColor="";G.stopPropagation();G.preventDefault()}));+Q=Q.cloneNode(!1);Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("edit"));B.insertBefore(Q,B.firstChild);mxEvent.addListener(Q,"click",k);k=Q.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));B.insertBefore(k,B.firstChild);mxEvent.addListener(k,"click",J);".scratchpad"==c.title&&(this.addSelectionToScratchpad=J);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,+!0),k.className="geLibraryButton",B.insertBefore(k,B.firstChild))}m.appendChild(B);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var m=c[k],t=m.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var v="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(v+="aspect=fixed;");v=v+"image="+t+";";null!=m.style&&(v+=m.style);f.appendChild(this.sidebar.createVertexTemplate(v,+m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var A=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),E=0==A.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(A,m.w,m.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),v=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,E,!0,null,!0),f.appendChild(v)}};EditorUi.prototype.getResource=function(c){return null!=+c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,m,t,v,A){c=new ImageDialog(this,c,f,k,m,t,v,A);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,+!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,m,t,v){var A=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=v&&v(E),E==A)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(f,JSON.stringify(D))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(B){this.handleError(B)}}),null,mxResources.get("close"),+null,null,null,!0,null,null,t,k,m);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,k,m){c=null!=c?c:mxUtils.bind(this,function(t,v,A,E){v||(t=new ChangePageSetup(this,m?A:null,t),t.ignoreColor=!m,null!=E&&m&&(t.shadowVisible=E),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,k,m);this.showDialog(c.container,400,m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,m,t){c=new LibraryDialog(this,+c,f,k,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var n=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=n.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,m,t,v,A){var E=null!=this.spinner&&+null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{A||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=D||null!=f){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var B=mxResources.get("ok"),Q=null;+f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(B=mxResources.get("cancel"),Q=function(){E();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 U=null!=t?null:null!=v?v: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==D.code||404==D.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="++U);null!=m&&m()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML=" ";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");J.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=P.length;J.appendChild(H)}+var P=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var J=document.createElement("select");J.style.width="100%";T();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var G=J.value,H=P.length!=G;H&&this.drive.setUser(P[G]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(g){this.handleError(g)}),+!0)}));q.appendChild(J);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=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,+function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,t=D.alternateAction.funct);this.showError(f,A,B,k,Q,null,null,c,t,null,null,null,m?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,m,t,v){c=null!=c?c:"";var A=null!=this.spinner&&null!=this.spinner.pause?+this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){A();null!=f&&f()},function(){A();null!=k&&k()},m,t,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,f,k,m,t,v,A,E,D){v=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){A=null!=A?A:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";+var B=document.createElement("div");B.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");B.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(B.style,"transform",A);mxUtils.setPrefixedStyle(B.style,"transition","all 1000ms ease");null!=D&&mxUtils.setPrefixedStyle(B.style,"transform-origin",D);D=D=document.createElement("img");D.setAttribute("src",Editor.crossImage);D.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));D.setAttribute("border","0");t||(v=document.createElement("img"),+v.setAttribute("src",IMAGE_PATH+"/logo.png"),v.setAttribute("border","0"),v.setAttribute("align","absmiddle"),v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",B.appendChild(v),D.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",B.appendChild(D));mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;t&&(D.className="geLibraryButton",B.appendChild(D));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 Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!m){f.appendChild(Q);var U=document.createElement("label");U.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(U,mxResources.get("doNotShowAgain"));f.appendChild(U);B.style.paddingBottom=+t?"16px":"30px";B.appendChild(f)}var T=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,Q.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",A);window.setTimeout(mxUtils.bind(this,+function(){T()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=Q&&u!=U?(null!=k&&k(),T(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=+function(c,f,k,m){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,k,m,t){var v="jpeg"==k?"jpg":k;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+v;c=this.createImageDataUri(c,f,k,t);this.saveData(m,v,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,m,t,v){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?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,m);else{var A=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);v=65==(E?parseInt(E[2],10):!1)?!1:v}if(v||this.isOffline()){A.href=URL.createObjectURL(m?this.base64ToBlob(c,k):new Blob([c],{type:k}));v?A.download=f: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(c,f,k,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,m,t,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=v?"&base64="+v:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=+function(c,f,k,m,t,v,A,E,D){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var B=mxUtils.bind(this,function(U,T,P,q){try{if("_blank"==T)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(T==+App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(c,U,k,m,null,E);else if(null!=U&&0<U.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,U,k,m,T,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(T,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);A||t.push("_blank");var Q=new SaveDialog(this,f,mxUtils.bind(this,function(U,T,P){B(U.value,T,U,P);this.hideDialog(null,null,Q.container)}),t,c,k,m,D);this.showDialog(Q.container,420,110,!0,!1,mxUtils.bind(this,+function(){this.hideDialog()}));Q.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var v=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=v&&(t="background: "+v+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=+f||k?(v=k?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+v+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.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 f=c(mxUtils.bind(this,function(m){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.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,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 t=f.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(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.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.editor.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=c(mxUtils.bind(this,function(m){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 v=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=v.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=v.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",@@ -13031,101 +13032,101 @@ f.getModel().beginUpdate();try{f.setCellStyles("image",S,[p]);var Y=f.model.getGfunction(p,C){try{var I=this.graph.getAttributeForCell(p,"plantUmlData");if(null!=I)this.editPlantUmlData(p,C,I);else if(I=this.graph.getAttributeForCell(p,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(p,C,I);else{var N=f.getCellStyle(p);"1"==mxUtils.getValue(N,"metaEdit","0")?c.showDataDialog(p):m.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(p){return c.getLinkTitle(p)};f.customLinkClicked=function(p,C){var I=!1;try{var N=this.getGraphBounds();c.handleCustomLink(p,C);I=!0;c.chromelessResize&&!N.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(C))}catch(O){c.handleError(O)}return I};var t=f.parseBackgroundImage;f.parseBackgroundImage=function(p){var C=t.apply(this,arguments);null!=C&&null!=C.src&&Graph.isPageLink(C.src)&&(C={originalSrc:C.src});return C};var v=f.setBackgroundImage;f.setBackgroundImage=function(p){null!=p&&null!=p.originalSrc&&(p=c.createImageForPageLink(p.originalSrc,c.currentPage,this));v.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(p,C){p=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=p){var I=p.indexOf(",");if(0<I)for(p=p.substring(I+1),C=C.getProperty("patches"),I=0;I<C.length;I++)if(null!=C[I][EditorUi.DIFF_UPDATE]&&null!=C[I][EditorUi.DIFF_UPDATE][p]||-null!=C[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(C[I][EditorUi.DIFF_REMOVE],p)){f.refreshBackgroundImage();break}}}));var A=f.getBackgroundImageObject;f.getBackgroundImageObject=function(p,C){var I=A.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=C?c.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 E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(p){p=null!=p?p:"";"1"==urlParams.dev&&(p+=(0<p.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(p,C,I){var N=C;C=function(O,S,R){if(null==S){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(S=V.getAttribute("href"))}null!=-S&&f.isCustomLink(S)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(S,R)&&mxEvent.consume(O);null!=N&&N(O,S,R)};D.call(this,p,C,I)};z.apply(this,arguments);this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(p,C,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(p,["zoomIn","zoomOut","-"],null,I);B.apply(this,arguments);f.isSelectionEmpty()||-null==c.addSelectionToScratchpad||this.addMenuItems(p,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(p,["-","exitGroup","home"],null,I)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(p,C,I){if(c.editor.graph.isSelectionEmpty())Q.apply(this,arguments),c.menus.addMenuItems(p,["copyAsImage","copyAsSvg"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(p,C,I):this.addPopupMenuArrangeItems(p,C,-I),this.addMenuItems(p,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(p,C,I),this.addMenuItems(p,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(C)&&f.isCellEditable(C)&&(this.addSubmenu("editCell",p,null,mxResources.get("edit")),p.addSeparator(),f.getModel().isEdge(C))){this.addSubmenu("line",p);var N=f.getModel().getGeometry(C);null!=N&&null!=N.points&&0<N.points.length&&this.addMenuItems(p,-["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(p,["enterGroup"],null,I);N=c.getSelectionState();null!=N.mergeCell?this.addMenuItem(p,"mergeCells"):(1<N.style.colspan||1<N.style.rowspan)&&this.addMenuItem(p,"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.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=f.getExportVariables;f.getExportVariables=function(){var p=U.apply(this,arguments),C=c.getCurrentFile();null!=C&&(p.filename=C.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=-c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var T=f.getGlobalVariable;f.getGlobalVariable=function(p){var C=c.getCurrentFile();return"filename"==p&&null!=C?C.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=-this.getCurrentFile(),C=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;P!=C&&p==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());P=C;q=p}));var u=f.labelLinkClicked;f.labelLinkClicked=function(p,C,I){var N=C.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))u.apply(this,arguments);else{if(!f.isEnabled()||null!=p&&f.isCellLocked(p.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(I)}};-this.editor.getOrCreateFilename=function(){var p=c.defaultFilename,C=c.getCurrentFile();null!=C&&(p=null!=C.getTitle()?C.getTitle():p);return p};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.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&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(p,C){null!=C&&f.isEnabled()&&!f.isEditing()&&null!=C.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(p){var C=f.cellEditor.text2,I=null;null!=-C&&(mxEvent.addListener(C,"dragleave",function(N){null!=I&&(I.parentNode.removeChild(I),I=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==I&&(I=this.highlightElement(C));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(S,R,V,Y,W,X){f.insertImage(S,-W,X)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var R=0;R<S.length;R++)S[R]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var O=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(S){var R=Math.max(1,S.width);S=Math.max(1,S.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,R)),V/Math.max(1,S));f.insertImage(decodeURIComponent(O),-R*V,S*V)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));N.stopPropagation();N.preventDefault()})))}));if(Editor.isSettingsEnabled()){J=this.editor.graph.view;var G=mxSettings.getUnit();J.setUnit(G);Editor.pageSizeUnit=-G==mxConstants.METERS?mxConstants.MILLIMETERS:G;J.addListener("unitChanged",function(p,C){p=C.getProperty("unit");mxSettings.setUnit(p);mxSettings.save();Editor.pageSizeUnit=p==mxConstants.METERS?mxConstants.MILLIMETERS:p});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit);this.refresh()}if("1"==urlParams.styledev){J=document.getElementById("geFooter");-null!=J&&(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)})),J.appendChild(this.styleInput),-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,C){0<this.editor.graph.getSelectionCount()?(p=this.editor.graph.getSelectionCell(),p=this.editor.graph.getModel().getStyle(p),this.styleInput.value=p||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==this.styleInput?!0:H.apply(this,arguments)}}J=document.getElementById("geInfo");-null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(f.container,"dragleave",function(p){f.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),p.stopPropagation(),p.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(p){null==g&&(g=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();p.stopPropagation();p.preventDefault()}));mxEvent.addListener(f.container,-"drop",mxUtils.bind(this,function(p){null!=g&&(g.parentNode.removeChild(g),g=null);if(f.isEnabled()){var C=mxUtils.convertPoint(f.container,mxEvent.getClientX(p),mxEvent.getClientY(p)),I=p.dataTransfer.files,N=f.view.translate,O=f.view.scale,S=C.x/O-N.x,R=C.y/O-N.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(p)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(p)&&(R=S=null),this.importFiles(I,S,R,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(p),null,null,mxEvent.isShiftDown(p),p));else{mxEvent.isAltDown(p)&&(R=S=0);var V=0<=mxUtils.indexOf(p.dataTransfer.types,"text/uri-list")?p.dataTransfer.getData("text/uri-list"):null;C=this.extractGraphModelFromEvent(p,null!=this.pages);if(null!=C)f.setSelectionCells(this.importXml(C,S,R,!0));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/html")){var Y=p.dataTransfer.getData("text/html");C=document.createElement("div");C.innerHTML=Graph.sanitizeHtml(Y);-var W=null;I=C.getElementsByTagName("img");null!=I&&1==I.length?(Y=I[0].getAttribute("src"),null==Y&&(Y=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)||(W=!0)):(I=C.getElementsByTagName("a"),null!=I&&1==I.length?Y=I[0].getAttribute("href"):(C=C.getElementsByTagName("pre"),null!=C&&1==C.length&&(Y=mxUtils.getTextContent(C[0]))));var X=!0,aa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(Y,S,R,!0,W,null,X,mxEvent.isControlDown(p)))});W&&null!=Y&&Y.length>-this.resampleThreshold?this.confirmImageResize(function(ba){X=ba;aa()},mxEvent.isControlDown(p)):aa()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(ba){var la=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,la)),ea/Math.max(1,ba));f.setSelectionCell(f.insertVertex(null,null,"",S,R,la*ea,ba*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-V+";"))}),mxUtils.bind(this,function(ba){f.setSelectionCells(this.insertTextAt(V,S,R,!0))})):0<=mxUtils.indexOf(p.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(p.dataTransfer.getData("text/plain"),S,R,!0))}}p.stopPropagation();p.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(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var p=parseInt(this.div.offsetLeft),C=parseInt(this.div.offsetWidth),-I=c.embedViewport.x+c.embedViewport.width,N=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),S=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(p,I-C))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(N,S-O))+"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(J=-Editor.currentTheme,"simple"==J||"sketch"==J)this.doSetCurrentTheme(J,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));J=!1;if(null!=urlParams.dark)J=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)J="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||-J&&"auto"!=mxSettings.settings.darkMode||(J=mxSettings.settings.darkMode);"auto"==J&&this.isAutoDarkModeSupported()&&(J=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof J?"1"==J:J);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(p){this.isAutoDarkMode()&&this.setDarkMode(p.matches)}))}catch(p){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);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",-mxUtils.bind(this,function(p,C){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var y=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}y.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,m=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,-mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(B),mxEvent.getClientY(B)),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 v=null,A=null,E=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(B){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(B);m.popupMenuHandler.hideMenu();mxEvent.consume(B)}));t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(B){E=parseInt(this.diagramContainer.style.width);v=mxEvent.getClientX(B);m.popupMenuHandler.hideMenu();-mxEvent.consume(B)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(B){var Q=!1;null!=v&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(B)-v)+"px",Q=!0);null!=A&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(B)-A)+"px",Q=!0);Q&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),-function(B){null==v&&null==A||mxEvent.consume(B);A=v=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(B){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",-mxUtils.bind(this,function(B){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.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 m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(v){var A=mxEvent.getSource(v);null==f.container||!f.isEnabled()||f.isMouseDown||-f.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=v.keyCode&&(mxClient.IS_MAC||17!=v.keyCode)&&(!mxClient.IS_MAC||91!=v.keyCode&&93!=v.keyCode)||m||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",v=f.container.scrollLeft,A=f.container.scrollTop,f.container.appendChild(k),m=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=v,f.container.scrollTop=A)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(v){var A=v.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=A&&17!=A&&91!=A&&93!=A||(m=!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(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),c()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),-this.copyCells(k,!0),c()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(v){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML=" ",k.focus(),null!=v.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(v,k,!0,!0)),!mxEvent.isConsumed(v)){var A=f.container.scrollLeft,E=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=A,f.container.scrollTop=E,Graph.removePasteFormatting(k.firstChild),-this.pasteCells(v,k,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==k?!0:t.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){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var k="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(k||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return k};EditorUi.prototype.saveScrollState=-function(c){var f=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(k-=this.embedViewport.x,m-=this.embedViewport.y):(k+=this.embedViewport.x,m+=this.embedViewport.y));f={x:k,y:m,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=-c.boundingRect){var m=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-m.x;c.y-=c.boundingRect.y-m.y}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="")}));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 m=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=m&&null!=m.getAttribute("class");if(!f&&null!=m){m=m.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;-m==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";m=32>=c.clientWidth;c.style.visibility=m&&""==this.editor.getStatus()?"hidden":"";if(m||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=-""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};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(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(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.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};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="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display=-"",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,k,m){k=null!=k?k:"geButton";var t=this.menus.get(c);m=this.menubar.addMenu(mxResources.get(c),t.funct,null,m);m.className=k;m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(t,m,k);null!=f&&(m.style.backgroundImage="url("+f+")",m.innerText="");return m};EditorUi.prototype.addButton=function(c,f,k,m){c=this.createToolbarButton(c,f,k);m=null!=m?m:this.container;m.appendChild(c);return c};-EditorUi.prototype.createToolbarButton=function(c,f,k){var m=document.createElement("a");m.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(m.style.backgroundImage="url("+c+")");null!=f&&m.setAttribute("title",f);null!=k&&mxEvent.addListener(m,"click",function(t){"disabled"!=m.getAttribute("disabled")&&k(t);mxEvent.consume(t)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=function(c,f,k){var m=this.actions.get(c),t=null!=m?m.funct:null,v=this.createToolbarButton(f,-mxResources.get(c)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),t);null==m||k||(c=function(){m.isEnabled()?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),m.addListener("stateChanged",c),c());return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=this,f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),k="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"),f,60,240,k,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");c.format.refresh();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?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,A=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>v||690>A)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var F=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=-function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):F.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var k=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=c?f:0,v=Editor.transitionDelay;-mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&m();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 "+v+"s 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&&m()}),1E3*v)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var M=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():M.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=-mxUtils.bind(this,function(A,E){var D=this.menus.get(A);A=this.createMenuElement(E,mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));A.setAttribute("title",E);A.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";A.className="geButton";c.parentNode.appendChild(A);return A});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-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",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.right="0px",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.left="0px";k.style.right="50%";var m=document.createElement("span");k.appendChild(m);var t=f("openLibraryFrom","");t.style.borderLeftWidth="1px";t.style.left="50%";t.style.right="0px";var v=document.createElement("span");t.appendChild(v);this.dependsOnLanguage(mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));k.setAttribute("title",mxResources.get("newLibrary"));v.innerHTML="";mxUtils.write(v,mxResources.get("openLibraryFrom"));t.setAttribute("title",-mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);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(m){this.createShapesPanel(m)}));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.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=-c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};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){this.spinner.spin(document.body,mxResources.get("working"))&&-(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};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,m=f.getAttribute("media");(m="all"==m||"not all"!=m&&k)&&!c?f.setAttribute("media",k?"not all":"(forced-colors: active)"):!m&&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&&null==this.ruler&&(this.ruler=new mxDualRuler(this,-this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);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){mxUtils.lightDarkColorSupported&&(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,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(!0))),(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;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 m=this.diagramContainer.getAttribute("data-bounds");if(null!=m){this.diagramContainer.removeAttribute("data-bounds");var t=m.split(" ");m=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];var v=parseInt(t[2]);t=parseInt(t[3]);v=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,v):v,m.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,m.height-80);this.diagramContainer.style.width=-v+"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()}),"*")}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=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-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,-c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="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(m){}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.writeImageToClipboard=function(c,f,k,m,t,v){m=null!=m?m:"image/png";var A=null==f||null==k?'<img src="'+c+'">':'<img src="'+c+'" width="'+f+'" height="'+k+'">',E={"text/html":new Blob([A],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(m)&&(E[m]=this.base64ToBlob(c.substring(c.indexOf(",")+-1),m));var D=new ClipboardItem(E);navigator.clipboard.write([D]).then(t)["catch"](v);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",f,"h",k,"type",m,"html",[A],"data",[E],"item",[D])};EditorUi.prototype.writeHtmlToClipboard=function(c,f){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](f)};EditorUi.prototype.writeTextToClipboard=function(c,f){navigator.clipboard.writeText(c)["catch"](f)};+null!=C[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(C[I][EditorUi.DIFF_REMOVE],p)){f.refreshBackgroundImage();break}}}));var A=f.getBackgroundImageObject;f.getBackgroundImageObject=function(p,C,I){var N=A.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=C?c.createImageForPageLink(N.originalSrc,I,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 E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(p){p=null!=p?p:"";"1"==urlParams.dev&&(p+=(0<p.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(p,C,I){var N=C;C=function(O,S,R){if(null==S){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(S=V.getAttribute("href"))}null!=S&&f.isCustomLink(S)&&(mxEvent.isTouchEvent(O)||+!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(S,R)&&mxEvent.consume(O);null!=N&&N(O,S,R)};D.call(this,p,C,I)};z.apply(this,arguments);this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(p,C,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(p,["zoomIn","zoomOut","-"],null,I);B.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(p,+["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(p,["-","exitGroup","home"],null,I)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(p,C,I){if(c.editor.graph.isSelectionEmpty())Q.apply(this,arguments),c.menus.addMenuItems(p,["copyAsImage","copyAsSvg"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(p,C,I):this.addPopupMenuArrangeItems(p,C,I),this.addMenuItems(p,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),+null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(p,C,I),this.addMenuItems(p,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(C)&&f.isCellEditable(C)&&(this.addSubmenu("editCell",p,null,mxResources.get("edit")),p.addSeparator(),f.getModel().isEdge(C))){this.addSubmenu("line",p);var N=f.getModel().getGeometry(C);null!=N&&null!=N.points&&0<N.points.length&&this.addMenuItems(p,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(p,+["enterGroup"],null,I);N=c.getSelectionState();null!=N.mergeCell?this.addMenuItem(p,"mergeCells"):(1<N.style.colspan||1<N.style.rowspan)&&this.addMenuItem(p,"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.dependsOnLanguage(mxUtils.bind(this,+function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=f.getExportVariables;f.getExportVariables=function(){var p=U.apply(this,arguments),C=c.getCurrentFile();null!=C&&(p.filename=C.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var T=f.getGlobalVariable;f.getGlobalVariable=+function(p){var C=c.getCurrentFile();return"filename"==p&&null!=C?C.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=this.getCurrentFile(),C=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;P!=C&&p==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),+f.view.validate());P=C;q=p}));var u=f.labelLinkClicked;f.labelLinkClicked=function(p,C,I){var N=C.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))u.apply(this,arguments);else{if(!f.isEnabled()||null!=p&&f.isCellLocked(p.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var p=c.defaultFilename,C=c.getCurrentFile();null!=C&&(p=null!=C.getTitle()?C.getTitle():p);return p};var J=+this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.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&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(p,C){null!=+C&&f.isEnabled()&&!f.isEditing()&&null!=C.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(p){var C=f.cellEditor.text2,I=null;null!=C&&(mxEvent.addListener(C,"dragleave",function(N){null!=I&&(I.parentNode.removeChild(I),I=null);N.stopPropagation();N.preventDefault()}),+mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==I&&(I=this.highlightElement(C));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(S,R,V,Y,W,X){f.insertImage(S,W,X)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var R=0;R<S.length;R++)S[R]()},mxEvent.isControlDown(N));+else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var O=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(S){var R=Math.max(1,S.width);S=Math.max(1,S.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,R)),V/Math.max(1,S));f.insertImage(decodeURIComponent(O),R*V,S*V)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,+"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));N.stopPropagation();N.preventDefault()})))}));if(Editor.isSettingsEnabled()){J=this.editor.graph.view;var G=mxSettings.getUnit();J.setUnit(G);Editor.pageSizeUnit=G==mxConstants.METERS?mxConstants.MILLIMETERS:G;J.addListener("unitChanged",function(p,C){p=C.getProperty("unit");mxSettings.setUnit(p);+mxSettings.save();Editor.pageSizeUnit=p==mxConstants.METERS?mxConstants.MILLIMETERS:p});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit);this.refresh()}if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(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)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,C){0<this.editor.graph.getSelectionCount()?+(p=this.editor.graph.getSelectionCell(),p=this.editor.graph.getModel().getStyle(p),this.styleInput.value=p||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==this.styleInput?!0:H.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(f.container,+"dragleave",function(p){f.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),p.stopPropagation(),p.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(p){null==g&&(g=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();p.stopPropagation();p.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(p){null!=g&&(g.parentNode.removeChild(g),g=null);if(f.isEnabled()){var C=mxUtils.convertPoint(f.container,+mxEvent.getClientX(p),mxEvent.getClientY(p)),I=p.dataTransfer.files,N=f.view.translate,O=f.view.scale,S=C.x/O-N.x,R=C.y/O-N.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(p)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(p)&&(R=S=null),this.importFiles(I,S,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(p),null,null,mxEvent.isShiftDown(p),p));else{mxEvent.isAltDown(p)&&(R=S=0);var V=0<=mxUtils.indexOf(p.dataTransfer.types,+"text/uri-list")?p.dataTransfer.getData("text/uri-list"):null;C=this.extractGraphModelFromEvent(p,null!=this.pages);if(null!=C)f.setSelectionCells(this.importXml(C,S,R,!0));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/html")){var Y=p.dataTransfer.getData("text/html");C=document.createElement("div");C.innerHTML=Graph.sanitizeHtml(Y);var W=null;I=C.getElementsByTagName("img");null!=I&&1==I.length?(Y=I[0].getAttribute("src"),null==Y&&(Y=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)||+(W=!0)):(I=C.getElementsByTagName("a"),null!=I&&1==I.length?Y=I[0].getAttribute("href"):(C=C.getElementsByTagName("pre"),null!=C&&1==C.length&&(Y=mxUtils.getTextContent(C[0]))));var X=!0,aa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(Y,S,R,!0,W,null,X,mxEvent.isControlDown(p)))});W&&null!=Y&&Y.length>this.resampleThreshold?this.confirmImageResize(function(ba){X=ba;aa()},mxEvent.isControlDown(p)):aa()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),+mxUtils.bind(this,function(ba){var la=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,la)),ea/Math.max(1,ba));f.setSelectionCell(f.insertVertex(null,null,"",S,R,la*ea,ba*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){f.setSelectionCells(this.insertTextAt(V,S,R,!0))})):0<=mxUtils.indexOf(p.dataTransfer.types,"text/plain")&&+f.setSelectionCells(this.insertTextAt(p.dataTransfer.getData("text/plain"),S,R,!0))}}p.stopPropagation();p.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(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",+function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var p=parseInt(this.div.offsetLeft),C=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,N=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),S=c.embedViewport.y+c.embedViewport.height;+this.div.style.left=Math.max(c.embedViewport.x,Math.min(p,I-C))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(N,S-O))+"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(J=Editor.currentTheme,"simple"==J||"sketch"==J)this.doSetCurrentTheme(J,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():+(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));J=!1;if(null!=urlParams.dark)J=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)J="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||J&&"auto"!=mxSettings.settings.darkMode||(J=mxSettings.settings.darkMode);"auto"==J&&this.isAutoDarkModeSupported()&&(J=window.matchMedia("(prefers-color-scheme: dark)").matches);+this.setDarkMode("string"===typeof J?"1"==J:J);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(p){this.isAutoDarkMode()&&this.setDarkMode(p.matches)}))}catch(p){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);+Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(p,C){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=+0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var y=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}y.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,m=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(B),mxEvent.getClientY(B)),+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 v=null,A=null,E=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(B){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(B);+m.popupMenuHandler.hideMenu();mxEvent.consume(B)}));t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(B){E=parseInt(this.diagramContainer.style.width);v=mxEvent.getClientX(B);m.popupMenuHandler.hideMenu();mxEvent.consume(B)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(B){var Q=!1;null!=v&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(B)-+v)+"px",Q=!0);null!=A&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(B)-A)+"px",Q=!0);Q&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(B){null==v&&null==A||mxEvent.consume(B);A=v=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(B){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(B){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.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 m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(v){var A=mxEvent.getSource(v);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=v.keyCode&&(mxClient.IS_MAC||17!=v.keyCode)&&(!mxClient.IS_MAC||91!=v.keyCode&&93!=v.keyCode)||+m||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",v=f.container.scrollLeft,A=f.container.scrollTop,f.container.appendChild(k),m=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=v,f.container.scrollTop=A)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(v){var A=v.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=A&&17!=A&&91!=A&&93!=A||(m=!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(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),c()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k,!0),c()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(v){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML=+" ",k.focus(),null!=v.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(v,k,!0,!0)),!mxEvent.isConsumed(v)){var A=f.container.scrollLeft,E=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=A,f.container.scrollTop=E,Graph.removePasteFormatting(k.firstChild),this.pasteCells(v,k,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==+k?!0:t.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){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var k="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&+"simple"==c||c==Editor.currentTheme;if(k||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return k};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?+(k-=this.embedViewport.x,m-=this.embedViewport.y):(k+=this.embedViewport.x,m+=this.embedViewport.y));f={x:k,y:m,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=c.boundingRect){var m=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-m.x;c.y-=c.boundingRect.y-m.y}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="")}));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 m=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=m&&null!=m.getAttribute("class");if(!f&&null!=m){m=m.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;m==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',+f=!0)}this.statusContainer.style.display="none";m=32>=c.clientWidth;c.style.visibility=m&&""==this.editor.getStatus()?"hidden":"";if(m||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();+this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};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(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(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.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||+Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};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="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,+f,k,m){k=null!=k?k:"geButton";var t=this.menus.get(c);m=this.menubar.addMenu(mxResources.get(c),t.funct,null,m);m.className=k;m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(t,m,k);null!=f&&(m.style.backgroundImage="url("+f+")",m.innerText="");return m};EditorUi.prototype.addButton=function(c,f,k,m){c=this.createToolbarButton(c,f,k);m=null!=m?m:this.container;m.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,k){var m=document.createElement("a");m.className=+"geButton";null!=c&&"data:"==c.substring(0,5)&&(m.style.backgroundImage="url("+c+")");null!=f&&m.setAttribute("title",f);null!=k&&mxEvent.addListener(m,"click",function(t){"disabled"!=m.getAttribute("disabled")&&k(t);mxEvent.consume(t)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=function(c,f,k){var m=this.actions.get(c),t=null!=m?m.funct:null,v=this.createToolbarButton(f,mxResources.get(c)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),t);null==m||k||(c=function(){m.isEnabled()?+v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),m.addListener("stateChanged",c),c());return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=this,f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),k="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"),+f,60,240,k,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");c.format.refresh();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?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var v=+window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,A=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>v||690>A)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var F=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):+F.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var k=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=c?f:0,v=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");+0!=t&&m();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 "+v+"s 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&&m()}),1E3*v)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var M=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():M.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(A,E){var D=this.menus.get(A);A=this.createMenuElement(E,+mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));A.setAttribute("title",E);A.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";A.className="geButton";c.parentNode.appendChild(A);return A});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-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",+f.className="geButton",f.style.left="0px",f.style.right="50%",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.right="0px",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.left="0px";k.style.right="50%";var m=document.createElement("span");k.appendChild(m);+var t=f("openLibraryFrom","");t.style.borderLeftWidth="1px";t.style.left="50%";t.style.right="0px";var v=document.createElement("span");t.appendChild(v);this.dependsOnLanguage(mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));k.setAttribute("title",mxResources.get("newLibrary"));v.innerHTML="";mxUtils.write(v,mxResources.get("openLibraryFrom"));t.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);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(m){this.createShapesPanel(m)}));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.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};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){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,+null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};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,m=f.getAttribute("media");(m="all"==m||"not all"!=m&&k)&&!c?+f.setAttribute("media",k?"not all":"(forced-colors: active)"):!m&&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&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);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){mxUtils.lightDarkColorSupported&&(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,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(!0))),+(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;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 m=this.diagramContainer.getAttribute("data-bounds");if(null!=m){this.diagramContainer.removeAttribute("data-bounds");+var t=m.split(" ");m=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];var v=parseInt(t[2]);t=parseInt(t[3]);v=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,v):v,m.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,m.height-80);this.diagramContainer.style.width=v+"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()}),"*")}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=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-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||+null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="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(m){}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.writeImageToClipboard=function(c,f,k,m,t,v){m=null!=m?m:"image/png";var A=null==f||null==k?'<img src="'+c+'">':'<img src="'+c+'" width="'+f+'" height="'+k+'">',E={"text/html":new Blob([A],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(m)&&(E[m]=this.base64ToBlob(c.substring(c.indexOf(",")+1),m));var D=new ClipboardItem(E);+navigator.clipboard.write([D]).then(t)["catch"](v);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",f,"h",k,"type",m,"html",[A],"data",[E],"item",[D])};EditorUi.prototype.writeHtmlToClipboard=function(c,f){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](f)};EditorUi.prototype.writeTextToClipboard=function(c,f){navigator.clipboard.writeText(c)["catch"](f)};EditorUi.prototype.copySvg=function(c,f,k){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var m=this.editor.graph.getSvg(null,k,null,null,null,null,null,null,null,null,null,null,null,0<c.length?c:null);m.setAttribute("content",f);var t=Editor.createSvgDataUri(mxUtils.getXml(m)),v=parseInt(m.getAttribute("width")),A=parseInt(m.getAttribute("height"));this.writeImageToClipboard(t,v,A,"image/svg+xml",null,mxUtils.bind(this,function(E){this.handleError(E)}))}}catch(E){this.handleError(E)}};EditorUi.prototype.copyImage=function(c,f,k){try{k=null!=k?k:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,t){try{this.spinner.stop();var v=this.createImageDataUri(m,f,"png"),A=Math.round(parseInt(t.getAttribute("width"))/k),E=Math.round(parseInt(t.getAttribute("height"))/k);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[f],"scale",[k]);this.writeImageToClipboard(v,A,E,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var D=this.getBaseFilename(!1)+(null!=f?".drawio":"")+".png";this.saveLocalFile(v.substring(v.lastIndexOf(",")+1),D,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,k,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,@@ -13553,8 +13554,8 @@ App.prototype.generateDiagram=function(b,l,n){var d=!1,x=null,z='Write a detailel(x,F)},n)};App.prototype.loadDraft=function(b,l){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&(n.fileChanged(),null!=l&&l())}),0)}),null,null,!0)};App.prototype.filterDrafts=function(b,l,n){function d(){n(x)}var x=[];try{this.getDatabaseItems(mxUtils.bind(this,function(z){EditorUi.debug("App.filterDrafts",[this],"items",z);for(var y=0;y<z.length;y++)try{var F=z[y].key;if(null!=F&&".draft_"==F.substring(0,7)){var M=JSON.parse(z[y].data);null!=M&&"draft"==M.type&&M.aliveCheck!=l&&(null==b&&null==M.fileObject||null!=M.fileObject&&M.fileObject.path==b)&&(M.key=F,x.push(M))}}catch(K){}d()}),d)}catch(z){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(l){if(1==l.length)this.loadDraft(l[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[0].key)}));else if(1<l.length){var n=new Date(l[0].modified);n=new DraftDialog(this,1<l.length?mxResources.get("selectDraft"):mxResources.get("draftFound",-[n.toLocaleDateString()+" "+n.toLocaleTimeString()]),1<l.length?null:l[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=l[d]?d:0;this.loadDraft(l[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[d].key)}))}),mxUtils.bind(this,function(d,x){this.removeDatabaseItem(l[""!=d?d:0].key);null!=x&&x()}),null,null,null,1<l.length?l:null);this.showDialog(n.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)}));n.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(l){}};+[n.toLocaleDateString()+" "+n.toLocaleTimeString()]),1<l.length?null:l[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=l[d]?d:0;this.loadDraft(l[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[d].key)}))}),mxUtils.bind(this,function(d,x){this.removeDatabaseItem(l[""!=d?d:0].key);null!=x&&x()}),null,null,null,1<l.length?l:null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(d){d&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,+this.getFileData(),null,null,null,null,null,!0))}));n.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(l){}};App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var l=this.getServiceCount(!0),n=mxUtils.bind(this,function(){var x=new SplashDialog(this);this.showDialog(x.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(z,y){!z&&!y||mxClient.IS_CHROMEAPP||(z=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=z)}),!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||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&n();else{b=4==l?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();n()}),b);this.showDialog(d.container,3>b?200:300,3<l?320:210,!0,!1)}}};App.prototype.addLanguageMenu=function(b,l,n){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),this.setElementTitle(d,"language"),d.className="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=@@ -13592,14 +13593,14 @@ App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===tmxClient.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 l=mxUtils.parseXml(b);if("mxfile"==l.documentElement.nodeName){for(var n=l.documentElement.getElementsByTagName("diagram"),d=0;d<n.length;d++){var x=Editor.parseDiagramNode(n[d],!0);null!=x&&(mxUtils.setTextContent(n[d],""),n[d].appendChild(x))}b=mxUtils.getPrettyXml(l.documentElement)}}catch(z){}return b};-App.prototype.createFile=function(b,l,n,d,x,z,y,F,M,K){d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){l=null!=l?l:this.emptyDiagramXml;null==l||Editor.defaultCompressed||(l=this.uncompressPages(l));var L=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(k){L();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{var f=mxUtils.bind(this,function(k){L();this.fileCreated(k,-n,z,x,M,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==y&&null!=this.stateArg&&null!=this.stateArg.folderId&&(y=this.stateArg.folderId),this.drive.insertFile(b,l,y,f,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,l,f,c,!1,y):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,l,f,c,!1,y):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,l,f,c,!1,y):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,l,f,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,l,f,c,!1,y):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,l,f,c):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(k,m){var t=new LocalFile(this,l,m.name,null,k,m);t.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,n,z,x,M,K)}),c,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&c(k)}),this.createFileSystemOptions(b))):(L(),this.fileCreated(new LocalFile(this,l,b,null==d),n,z,x,M,K))}catch(k){L(),-this.handleError(k)}}};-App.prototype.fileCreated=function(b,l,n,d,x,z){var y=window.location.pathname;null!=l&&0<l.length&&(y+="?libs="+l);null!=x&&0<x.length&&(y+="?clibs="+x);y=this.getUrl(y);b.getMode()!=App.MODE_DEVICE&&(y+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var F=b.getData();F=0<F.length?this.editor.extractGraphModel(mxUtils.parseXml(F).documentElement,!0):null;var M=window.location.protocol+"//"+window.location.hostname+y,K=F,L=null;null!=F&&/\.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(F,L,b,M));null!=L&&L.container.parentNode.removeChild(L.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var k=this.getCurrentFile();null==n&&null!=k&&(n=!k.isModified()&&null==k.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,z);n&&this.updateStatus(mxUtils.bind(this,-function(){b.addAllSavedStatus()}));null!=l&&this.sidebar.showEntries(l);if(null!=x){for(var v=[],A=x.split(";"),E=0;E<A.length;E++)v.push(decodeURIComponent(A[E]));this.loadLibraries(v)}null!=d&&d()}),t=mxUtils.bind(this,function(){n||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==n||n?t():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),-b.getTitle(),null==b.getMode())),window.geOpenWindow(y,null,t))});b.constructor==LocalFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,function(k){c();null!=k&&"AbortError"==k.name||this.handleError(k)}))}};+App.prototype.createFile=function(b,l,n,d,x,z,y,F,M,K){EditorUi.debug("App.createFile",[this],"title",[b],"data",[l],"libs",[n],"mode",[d]);d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){l=null!=l?l:this.emptyDiagramXml;null==l||Editor.defaultCompressed||(l=this.uncompressPages(l));var L=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(k){L();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():+null!=k&&this.handleError(k)});try{var f=mxUtils.bind(this,function(k){L();this.fileCreated(k,n,z,x,M,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==y&&null!=this.stateArg&&null!=this.stateArg.folderId&&(y=this.stateArg.folderId),this.drive.insertFile(b,l,y,f,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,l,f,c,!1,y):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,l,f,c,!1,y):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,l,f,c,!1,y):d==App.MODE_DROPBOX&&+null!=this.dropbox?this.dropbox.insertFile(b,l,f,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,l,f,c,!1,y):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,l,f,c):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(k,m){var t=new LocalFile(this,l,m.name,null,k,m);t.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,n,z,x,M,K)}),c,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&c(k)}),this.createFileSystemOptions(b))):+(L(),this.fileCreated(new LocalFile(this,l,b,null==d),n,z,x,M,K))}catch(k){L(),this.handleError(k)}}};+App.prototype.fileCreated=function(b,l,n,d,x,z){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[l],"replace",[n]);var y=window.location.pathname;null!=l&&0<l.length&&(y+="?libs="+l);null!=x&&0<x.length&&(y+="?clibs="+x);y=this.getUrl(y);b.getMode()!=App.MODE_DEVICE&&(y+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var F=b.getData();F=0<F.length?this.editor.extractGraphModel(mxUtils.parseXml(F).documentElement,!0):null;var M=window.location.protocol++"//"+window.location.hostname+y,K=F,L=null;null!=F&&/\.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(F,L,b,M));null!=L&&L.container.parentNode.removeChild(L.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var k=this.getCurrentFile();null==n&&null!=k&&(n=!k.isModified()&&(null==k.getMode()||EditorUi.isElectronApp));+var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,z);n&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=l&&this.sidebar.showEntries(l);if(null!=x){for(var v=[],A=x.split(";"),E=0;E<A.length;E++)v.push(decodeURIComponent(A[E]));this.loadLibraries(v)}null!=d&&d()}),t=mxUtils.bind(this,function(){n||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});+null==n||n?t():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(y,null,t))});b.constructor==LocalFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,function(k){c();null!=k&&"AbortError"==k.name||this.handleError(k)}))}};App.prototype.loadFile=function(b,l,n,d,x){if("1"==urlParams.openInSameWin||navigator.standalone)l=!0;this.hideDialog();var z=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var M=mxUtils.bind(this,function(k){this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(k){null!=k?(this.fileLoaded(new StorageFile(this,k,b)),null!=d&&d()):M({message:mxResources.get("fileNotFound")})}),M)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();window.location.hash=null!=k?k.getHash():""}));else if(null!=n)this.spinner.stop(),this.fileLoaded(n),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,@@ -13888,9 +13889,9 @@ EditorUi.prototype.restoreViewState=function(b,l,n){b=null!=b?this.getPageById(bGraph.prototype.createViewState=function(b){var l=b.getAttribute("page"),n=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),x=parseFloat(b.getAttribute("pageHeight")),z=b.getAttribute("background"),y=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}})}catch(M){console.log("ExtFonts format error: "+M.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!=l?"0"!=l:this.defaultPageVisible,background:null!=z&&0<z.length?z:null,backgroundImage:y,pageScale:isNaN(n)?mxGraph.prototype.pageScale:n,pageFormat:isNaN(d)||isNaN(x)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,x),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:F||[]}};-Graph.prototype.saveViewState=function(b,l,n,d){n||(l.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),l.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),l.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),l.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),l.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),l.setAttribute("connect",null==b||b.connect?"1":"0"),l.setAttribute("arrows",null==b||b.arrows?"1":"0"),l.setAttribute("fold",-null==b||b.foldingEnabled?"1":"0"));l.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);n=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=n&&(l.setAttribute("pageWidth",n.width),l.setAttribute("pageHeight",n.height));null!=b&&(null!=b.background&&l.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&l.setAttribute("backgroundImage",-JSON.stringify(d)));l.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");l.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?l.removeAttribute("adaptiveColors"):l.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&l.setAttribute("extFonts",b.extFonts.map(function(x){return x.name+"^"+x.url}).join("|"))};+Graph.prototype.saveViewState=function(b,l,n,d,x){n||(l.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),l.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),l.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),l.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),l.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),l.setAttribute("connect",null==b||b.connect?"1":"0"),l.setAttribute("arrows",null==b||b.arrows?"1":"0"),+l.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));l.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);n=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=n&&(l.setAttribute("pageWidth",n.width),l.setAttribute("pageHeight",n.height));null!=b&&(null!=b.background&&l.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,+d,x),null!=d&&l.setAttribute("backgroundImage",JSON.stringify(d)));l.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");l.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?l.removeAttribute("adaptiveColors"):l.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&l.setAttribute("extFonts",b.extFonts.map(function(z){return z.name+"^"+z.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,l){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;diff --git a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.jsindex 60f78521f..cbf5f3005 100644--- a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js+++ b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js@@ -1,2 +1,2 @@-if(!self.define){let e,c={};const n=(n,i)=>(n=new URL(n+".js",i).href,c[n]||new Promise((c=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=c,document.head.appendChild(e)}else e=n,importScripts(n),c()})).then((()=>{let e=c[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(i,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(c[r])return;let o={};const a=e=>n(e,r),f={module:{uri:r},exports:o,require:a};c[r]=Promise.all(i.map((e=>f[e]||a(e)))).then((e=>(s(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0b2d9cb0ec4407c38508304c026e8515"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"196736fc1ea51bec09a27310e72e0ecf"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"d381db23d3c925eb81854c07b46776a5"},{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:"fdb5a8e9f7cd3114a9f695348b93d207"},{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:"5b9f2e79efc7cadba0c06301edbeeff1"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"resources/dia.txt",revision:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,c={};const n=(n,i)=>(n=new URL(n+".js",i).href,c[n]||new Promise((c=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=c,document.head.appendChild(e)}else e=n,importScripts(n),c()})).then((()=>{let e=c[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(i,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(c[r])return;let o={};const f=e=>n(e,r),a={module:{uri:r},exports:o,require:f};c[r]=Promise.all(i.map((e=>a[e]||f(e)))).then((e=>(s(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0a43db0d17562d385729f1d38073dccd"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"c0f6b9be1801ba990471a576aef71dff"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"25c061e619a1bdbce765821594f0f79d"},{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:"fdb5a8e9f7cd3114a9f695348b93d207"},{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:"5b9f2e79efc7cadba0c06301edbeeff1"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"resources/dia.txt",revision:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-ac-draw-io.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.map b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.mapindex e0a349b7b..7e8a2c40b 100644--- a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-ac-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/ae0e758ac8c6d691edc86d4f64077a2e/service-worker-ac-draw-io.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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0b2d9cb0ec4407c38508304c026e8515\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"196736fc1ea51bec09a27310e72e0ecf\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"d381db23d3c925eb81854c07b46776a5\"\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\": \"fdb5a8e9f7cd3114a9f695348b93d207\"\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\": \"5b9f2e79efc7cadba0c06301edbeeff1\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,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,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-ac-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/5ea8bdb1e10afd95d7c5873e9ff1e569/service-worker-ac-draw-io.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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0a43db0d17562d385729f1d38073dccd\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"c0f6b9be1801ba990471a576aef71dff\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"25c061e619a1bdbce765821594f0f79d\"\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\": \"fdb5a8e9f7cd3114a9f695348b93d207\"\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\": \"5b9f2e79efc7cadba0c06301edbeeff1\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,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,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.jsindex 7715926b8..3f46e02c6 100644--- a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js+++ b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const c=(c,r)=>(c=new URL(c+".js",r).href,i[c]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=c,e.onload=i,document.head.appendChild(e)}else e=c,importScripts(c),i()})).then((()=>{let e=i[c];if(!e)throw new Error(`Module ${c} didn’t register its module`);return e})));self.define=(r,n)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let o={};const a=e=>c(e,s),f={module:{uri:s},exports:o,require:a};i[s]=Promise.all(r.map((e=>f[e]||a(e)))).then((e=>(n(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0b2d9cb0ec4407c38508304c026e8515"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"196736fc1ea51bec09a27310e72e0ecf"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{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:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{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:"resources/dia.txt",revision:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,i={};const r=(r,c)=>(r=new URL(r+".js",c).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=(c,n)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let o={};const a=e=>r(e,s),d={module:{uri:s},exports:o,require:a};i[s]=Promise.all(c.map((e=>d[e]||a(e)))).then((e=>(n(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0a43db0d17562d385729f1d38073dccd"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"c0f6b9be1801ba990471a576aef71dff"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{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:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{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:"resources/dia.txt",revision:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-aj-draw-io.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.map b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.mapindex 849999b34..c350b7341 100644--- a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-aj-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/a8a9ba79c3fb3436cfe7835f31acd06d/service-worker-aj-draw-io"],"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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0b2d9cb0ec4407c38508304c026e8515\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"196736fc1ea51bec09a27310e72e0ecf\"\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/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\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\": \"ce61a0e62031a160e057809fefe64aa2\"\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\": \"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\": \"resources/dia.txt\",\n \"revision\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-aj-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/66ae8e2beb40581e7e6b950f3b42768f/service-worker-aj-draw-io"],"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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0a43db0d17562d385729f1d38073dccd\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"c0f6b9be1801ba990471a576aef71dff\"\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/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\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\": \"ce61a0e62031a160e057809fefe64aa2\"\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\": \"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\": \"resources/dia.txt\",\n \"revision\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.jsindex 61d3c9bf2..d48b51bcf 100644--- a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js+++ b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const s=(s,a)=>(s=new URL(s+".js",a).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(a,r)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const d=e=>s(e,c),f={module:{uri:c},exports:o,require:d};i[c]=Promise.all(a.map((e=>f[e]||d(e)))).then((e=>(r(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0b2d9cb0ec4407c38508304c026e8515"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{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:"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:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"resources/dia_da.txt",revision:"2c92a85d1576af84ed15afe26b98a650"},{url:"resources/dia_de.txt",revision:"7b462b7e90c90e5b0e1a6dc6723cc0cf"},{url:"resources/dia_es.txt",revision:"d21bb809dbaf5397ed31d85965aaf505"},{url:"resources/dia_fr.txt",revision:"a0a7368861f497a6d22a0e6cfe57bf27"},{url:"resources/dia_id.txt",revision:"7665ebfc3c4c61cc7e79997c572d8bcf"},{url:"resources/dia_it.txt",revision:"743786b04ae77cbf2f08fe869269380f"},{url:"resources/dia_ja.txt",revision:"eac626f063fd37a528073264c5e61dda"},{url:"resources/dia_ko.txt",revision:"e16d7b493694fe84c981b9ee8fa4392d"},{url:"resources/dia_nl.txt",revision:"83873498df6b6ad511a2dba791ca4ba6"},{url:"resources/dia_pl.txt",revision:"8c57b33454faa8c0a5456cabab308a03"},{url:"resources/dia_pt.txt",revision:"1978cabf61e304fb2d0b4c38fc4c0569"},{url:"resources/dia_ru.txt",revision:"49be2fa633be9926ebfe79de1cad414f"},{url:"resources/dia_vi.txt",revision:"c4ec475c2da9167d3ac99062f69aca73"},{url:"resources/dia_zh.txt",revision:"864acd3d195fed0ad3939e436834d61c"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{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/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/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,i={};const s=(s,a)=>(s=new URL(s+".js",a).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(a,r)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const d=e=>s(e,c),f={module:{uri:c},exports:o,require:d};i[c]=Promise.all(a.map((e=>f[e]||d(e)))).then((e=>(r(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0a43db0d17562d385729f1d38073dccd"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{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:"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:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"resources/dia_da.txt",revision:"2c92a85d1576af84ed15afe26b98a650"},{url:"resources/dia_de.txt",revision:"7b462b7e90c90e5b0e1a6dc6723cc0cf"},{url:"resources/dia_es.txt",revision:"d21bb809dbaf5397ed31d85965aaf505"},{url:"resources/dia_fr.txt",revision:"a0a7368861f497a6d22a0e6cfe57bf27"},{url:"resources/dia_id.txt",revision:"7665ebfc3c4c61cc7e79997c572d8bcf"},{url:"resources/dia_it.txt",revision:"743786b04ae77cbf2f08fe869269380f"},{url:"resources/dia_ja.txt",revision:"eac626f063fd37a528073264c5e61dda"},{url:"resources/dia_ko.txt",revision:"e16d7b493694fe84c981b9ee8fa4392d"},{url:"resources/dia_nl.txt",revision:"83873498df6b6ad511a2dba791ca4ba6"},{url:"resources/dia_pl.txt",revision:"8c57b33454faa8c0a5456cabab308a03"},{url:"resources/dia_pt.txt",revision:"1978cabf61e304fb2d0b4c38fc4c0569"},{url:"resources/dia_ru.txt",revision:"49be2fa633be9926ebfe79de1cad414f"},{url:"resources/dia_vi.txt",revision:"c4ec475c2da9167d3ac99062f69aca73"},{url:"resources/dia_zh.txt",revision:"864acd3d195fed0ad3939e436834d61c"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{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/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/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-app-diagrams-net.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.map b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.mapindex f49c7edd2..bd5519cef 100644--- a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-app-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/f7e9bf8ad99ebb1bc274b81348498f22/service-worker-app-diagrams-net.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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0b2d9cb0ec4407c38508304c026e8515\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\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\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"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\": \"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\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2c92a85d1576af84ed15afe26b98a650\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"7b462b7e90c90e5b0e1a6dc6723cc0cf\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"d21bb809dbaf5397ed31d85965aaf505\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"a0a7368861f497a6d22a0e6cfe57bf27\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"7665ebfc3c4c61cc7e79997c572d8bcf\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"743786b04ae77cbf2f08fe869269380f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"eac626f063fd37a528073264c5e61dda\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"e16d7b493694fe84c981b9ee8fa4392d\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"83873498df6b6ad511a2dba791ca4ba6\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"8c57b33454faa8c0a5456cabab308a03\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"1978cabf61e304fb2d0b4c38fc4c0569\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"49be2fa633be9926ebfe79de1cad414f\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c4ec475c2da9167d3ac99062f69aca73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"864acd3d195fed0ad3939e436834d61c\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\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/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/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/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,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,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,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,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,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-app-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/0583704d81332628545ee72912f06c39/service-worker-app-diagrams-net.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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0a43db0d17562d385729f1d38073dccd\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\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\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"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\": \"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\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2c92a85d1576af84ed15afe26b98a650\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"7b462b7e90c90e5b0e1a6dc6723cc0cf\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"d21bb809dbaf5397ed31d85965aaf505\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"a0a7368861f497a6d22a0e6cfe57bf27\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"7665ebfc3c4c61cc7e79997c572d8bcf\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"743786b04ae77cbf2f08fe869269380f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"eac626f063fd37a528073264c5e61dda\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"e16d7b493694fe84c981b9ee8fa4392d\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"83873498df6b6ad511a2dba791ca4ba6\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"8c57b33454faa8c0a5456cabab308a03\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"1978cabf61e304fb2d0b4c38fc4c0569\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"49be2fa633be9926ebfe79de1cad414f\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c4ec475c2da9167d3ac99062f69aca73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"864acd3d195fed0ad3939e436834d61c\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\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/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/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/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,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,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,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,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,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.jsindex abe24a90f..28f411edf 100644--- a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js+++ b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js@@ -1,2 +1,2 @@-if(!self.define){let e,s={};const i=(i,r)=>(i=new URL(i+".js",r).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(r,c)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let o={};const a=e=>i(e,n),t={module:{uri:n},exports:o,require:a};s[n]=Promise.all(r.map((e=>t[e]||a(e)))).then((e=>(c(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0b2d9cb0ec4407c38508304c026e8515"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"196736fc1ea51bec09a27310e72e0ecf"},{url:"resources/dia.txt",revision:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,s={};const i=(i,r)=>(i=new URL(i+".js",r).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(r,c)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let o={};const d=e=>i(e,n),a={module:{uri:n},exports:o,require:d};s[n]=Promise.all(r.map((e=>a[e]||d(e)))).then((e=>(c(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0a43db0d17562d385729f1d38073dccd"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"c0f6b9be1801ba990471a576aef71dff"},{url:"resources/dia.txt",revision:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-embed-viewer-diagrams-net.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.map b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.mapindex 73a5f5222..e711274a3 100644--- a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-embed-viewer-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/ab2f182e66edf7080f0ca6c588d95fd6/service-worker-embed-viewer-diagrams-net.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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0b2d9cb0ec4407c38508304c026e8515\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"196736fc1ea51bec09a27310e72e0ecf\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-embed-viewer-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/8015e17047a013459861df80c3310004/service-worker-embed-viewer-diagrams-net.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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0a43db0d17562d385729f1d38073dccd\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"c0f6b9be1801ba990471a576aef71dff\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.jsindex e6de03022..2c3457309 100644--- a/src/main/webapp/js/viewer-static.min.js+++ b/src/main/webapp/js/viewer-static.min.js@@ -22,13 +22,13 @@ if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMaplang.substring(0,dash));0<=window.mxLanguages.indexOf(lang)&&(window.mxLanguage=lang)}}"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="1"));"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}"dark"==urlParams.ui&&null==urlParams.dark&&(urlParams.dark="1");"sketch"==a&&null==urlParams.sketch&&"ac.draw.io"===window.location.hostname&&(urlParams.sketch="1");return a}();-(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,-8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";+(function(){if("undefined"!==typeof JSON&&isLocalStorage){try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}try{a=localStorage.getItem(".configuration"),b=null,null!=a&&(b=JSON.parse(a).lockdown),null!=b&&(urlParams.lockdown=b)}catch(d){}}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&+(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,+b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"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:"28.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/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.1.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),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||@@ -54,8 +54,8 @@ unescape(c)):mxResources.resources[d]=c}}}},containsKey:function(a){return null!"/resources/editor",null,function(){mxResources.add(mxClient.basePath+"/resources/graph",null,a)})}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.intersect=function(a){if(null!=a){var b=this.x+this.width,c=a.x+a.width,d=this.y+this.height,e=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(b,c)-this.x;this.height=Math.min(d,e)-this.y}};-mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};-mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};+mxRectangle.prototype.intersectsPoint=function(a,b){return a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,q=(l.geometry.y-l.previous.y)*n,r=(l.geometry.width-l.previous.width)*n;n*=l.geometry.height-l.previous.height;0==d?(m.x-=p,m.y-=q,m.width-=r,m.height-=n):(m.x+=p/10,m.y+=q/10,m.width+=r/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},@@ -1886,8 +1886,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,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)};-Editor=function(b,f,l,u,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=u||this.createGraph(f,l);this.editable=null!=y?y:!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(q,B){this.status=q;this.statusFunction=B;this.fireEvent(new mxEventObject("statusChanged"))};-this.getStatus=function(){return this.status};this.graphChangeListener=function(q,B){q=null!=B?B.getProperty("edit"):null;null!=q&&q.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,f,l,u,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=u||this.createGraph(f,l);this.editable=null!=y?y:!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(q,C){this.status=q;this.statusFunction=C;this.fireEvent(new mxEventObject("statusChanged"))};+this.getStatus=function(){return this.status};this.graphChangeListener=function(q,C){q=null!=C?C.getProperty("edit"):null;null!=q&&q.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(f){}})();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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTI0MHYtODBoNzIwdjgwSDEyMFptMC0yMDB2LTgwaDcyMHY4MEgxMjBabTAtMjAwdi04MGg3MjB2ODBIMTIwWiIvPjwvc3ZnPg==";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";@@ -1957,7 +1957,7 @@ 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?"⌘":"Ctrl";Editor.altKey=mxClient.IS_MAC?"⌥":"Alt";Editor.shiftKey=mxClient.IS_MAC?"⇧":"Shift";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeClipboard=window==window.top&&null!=navigator.clipboard&&null!=navigator.clipboard.read;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;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 f=document.createElement("div");f.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(f.childNodes)}return null};-Editor.extractGraphModelFromPng=function(b){var f=null;try{var l=b.substring(b.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);EditorUi.parsePng(u,mxUtils.bind(this,function(y,q,B){y=u.substring(y+8,y+8+B);"zTXt"==q?(B=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,B)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(B+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==+Editor.extractGraphModelFromPng=function(b){var f=null;try{var l=b.substring(b.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);EditorUi.parsePng(u,mxUtils.bind(this,function(y,q,C){y=u.substring(y+8,y+8+C);"zTXt"==q?(C=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,C)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(C+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==y[0]||"mxfile"==y[0])&&(f=y[1]));if(null!=f||"IDAT"==q)return!0}))}catch(y){}null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));return f};Editor.soundex=function(b){if(null==b||0==b.length)return"";var f=[],l=1;f[0]=b[0].toUpperCase();for(var u=1,y=b.length;u<y;u++){var q=b[u].toUpperCase().charCodeAt(0)-65;if(0<=q&&25>=q&&"0"!="01230120022455012603010202"[q]&&("01230120022455012603010202"[q]!=f[l-1]&&(f[l]="01230120022455012603010202"[q],l++),3<l))break}if(3>=l)for(;3>=l;)f[l]="0",l++;return f.join("")};Editor.selectFilename=function(b){var f=b.value.lastIndexOf(".");if(0<f){var l=b.value.substring(f+1);"drawio"!=l&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],l)&&(l=b.value.lastIndexOf(".drawio.",f),0<l&&(f=l))}f=0<f?f:b.value.length;Editor.selectSubstring(b,0,f)};@@ -1966,7 +1966,7 @@ Editor.toUnit=function(b,f){return f==mxConstants.INCHES?Math.round(100*b/mxConsEditor.fromUnit=function(b,f){return f==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):f==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):f==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.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,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});+Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});mxEvent.addListener(window,"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var l=b.isCssTransformsSupported,u=this;b.isCssTransformsSupported=function(){return l.apply(this,arguments)&&(!u.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});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=@@ -1980,80 +1980,80 @@ Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var f=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,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],B=0;B<u.length;B++)null!=b.view.getState(u[B])&&(q.push(u[B]),-y||(b.scrollCellToVisible(u[B]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};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,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],C=0;C<u.length;C++)null!=b.view.getState(u[C])&&(q.push(u[C]),+y||(b.scrollCellToVisible(u[C]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};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,f,l,u,y,q,B,H,S,E,Q){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),-f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!Q)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=B;this.container=y;null!=E&&this.addResizeHandler(E);+function Dialog(b,f,l,u,y,q,C,H,S,E,Q){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),+f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!Q)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=C;this.container=y;null!=E&&this.addResizeHandler(E);b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,f){return new mxPoint(b,f)};-Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,B=mxUtils.bind(this,function(E){l=mxEvent.getClientX(E);u=mxEvent.getClientY(E);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,H,S);mxEvent.consume(E)}),-H=mxUtils.bind(this,function(E){if(null!=l&&null!=u){var Q=mxEvent.getClientX(E)-l,c=mxEvent.getClientY(E)-u;this.container.style.width=Math.max(b.width,y+2*Q)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(E)}}),S=mxUtils.bind(this,function(E){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,H,S),mxEvent.consume(E))});mxEvent.addGestureListeners(f,B,H,S);this.container.appendChild(f)};+Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(E){l=mxEvent.getClientX(E);u=mxEvent.getClientY(E);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,H,S);mxEvent.consume(E)}),+H=mxUtils.bind(this,function(E){if(null!=l&&null!=u){var Q=mxEvent.getClientX(E)-l,c=mxEvent.getClientY(E)-u;this.container.style.width=Math.max(b.width,y+2*Q)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(E)}}),S=mxUtils.bind(this,function(E){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,H,S),mxEvent.consume(E))});mxEvent.addGestureListeners(f,C,H,S);this.container.appendChild(f)};Dialog.prototype.close=function(b,f){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,f))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,f,l,u,y,q,B,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=+var ErrorDialog=function(b,f,l,u,y,q,C,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof l&&(l=l.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(l);c.appendChild(f);l=document.createElement("div");l.style.marginTop="12px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",l.appendChild(f),l.style.textAlign="center");null!=E&&(E=mxUtils.button(E,function(){null!=Q&&Q()}),E.className="geBtn",l.appendChild(E));-var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=B&&(u=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};-PrintDialog.prototype.create=function(b){function f(m){var n=B.checked||E.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/l.pageScale;if(n){var M=B.checked?1:parseInt(Q.value);isNaN(M)||(I=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);I*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):-n=!0;n=PrintDialog.createPrintPreview(l,I,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=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(m){B.checked=!B.checked;E.checked=!B.checked;mxEvent.consume(m)});mxEvent.addListener(B,"change",function(){E.checked=!B.checked});q.appendChild(H);y.appendChild(q);q=q.cloneNode(!1);var E=document.createElement("input");E.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(E);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,-"click",function(m){E.checked=!E.checked;B.checked=!E.checked;mxEvent.consume(m)});q.appendChild(H);var Q=document.createElement("input");Q.setAttribute("value","1");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("size","4");Q.setAttribute("disabled","disabled");Q.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(Q);mxUtils.write(H," "+mxResources.get("pages")+" (max)");q.appendChild(H);y.appendChild(q);mxEvent.addListener(E,"change",-function(){E.checked?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");B.checked=!E.checked});q=q.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");q.appendChild(H);H=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";H.appendChild(c);q.appendChild(H);y.appendChild(q);q=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){S&&b.hideDialog();null!=H&&H()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};+PrintDialog.prototype.create=function(b){function f(m){var n=C.checked||E.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/l.pageScale;if(n){var M=C.checked?1:parseInt(Q.value);isNaN(M)||(I=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);I*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):+n=!0;n=PrintDialog.createPrintPreview(l,I,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(C);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));+H.appendChild(S);mxEvent.addListener(S,"click",function(m){C.checked=!C.checked;E.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){E.checked=!C.checked});q.appendChild(H);y.appendChild(q);q=q.cloneNode(!1);var E=document.createElement("input");E.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(E);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,+"click",function(m){E.checked=!E.checked;C.checked=!E.checked;mxEvent.consume(m)});q.appendChild(H);var Q=document.createElement("input");Q.setAttribute("value","1");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("size","4");Q.setAttribute("disabled","disabled");Q.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(Q);mxUtils.write(H," "+mxResources.get("pages")+" (max)");q.appendChild(H);y.appendChild(q);mxEvent.addListener(E,"change",+function(){E.checked?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");C.checked=!E.checked});q=q.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");q.appendChild(H);H=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";H.appendChild(c);q.appendChild(H);y.appendChild(q);q=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 g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";H.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";H.appendChild(g);b.editor.cancelFirst||H.appendChild(S);q.appendChild(H);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};-PrintDialog.createPrintPreview=function(b,f,l,u,y,q,B){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";f.backgroundColor=B;var H=f.isTextLabel;f.isTextLabel=function(E){return"geHint"==!E.className&&H.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(E){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};+PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var H=f.isTextLabel;f.isTextLabel=function(E){return"geHint"==!E.className&&H.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(E){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};PrintDialog.previewEnabled=!0;var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(Q.style.backgroundImage="url("+x.src+")",Q.style.display="inline-block"):(Q.style.backgroundImage="",Q.style.display="none");Q.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(Q.style.backgroundColor=g,Q.style.display="inline-block")}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");-var q=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");q.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",l.pageFormat);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");q.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=l.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");-q.appendChild(B);B=document.createElement("td");var E=document.createElement("button");E.className="geBtn";E.style.margin="0px";mxUtils.write(E,mxResources.get("change")+"...");var Q=document.createElement("div");Q.style.display="inline-block";Q.style.verticalAlign="middle";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="contain";Q.style.border="1px solid lightGray";Q.style.borderRadius="4px";Q.style.marginRight="14px";Q.style.height="32px";-Q.style.width="64px";Q.style.cursor="pointer";Q.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,I,M,L){I||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(E,"click",n);mxEvent.addListener(Q,"click",n);f();B.appendChild(Q);B.appendChild(E);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");-B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";b.editor.cancelFirst&&B.appendChild(E);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,H.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&-(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";B.appendChild(n);b.editor.cancelFirst||B.appendChild(E);q.appendChild(B);y.appendChild(q);u.appendChild(y);this.container=u};-PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var B=document.createElement("select");B.style.position="relative";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";y.style.marginRight="6px";H.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));H.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";H.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,+var q=document.createElement("tr");var C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";mxUtils.write(C,mxResources.get("paperSize")+":");q.appendChild(C);C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(C,"pagesetupdialog",l.pageFormat);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("gridSize")+":");q.appendChild(C);+C=document.createElement("td");C.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=l.getGridSize();C.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");+q.appendChild(C);C=document.createElement("td");var E=document.createElement("button");E.className="geBtn";E.style.margin="0px";mxUtils.write(E,mxResources.get("change")+"...");var Q=document.createElement("div");Q.style.display="inline-block";Q.style.verticalAlign="middle";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="contain";Q.style.border="1px solid lightGray";Q.style.borderRadius="4px";Q.style.marginRight="14px";Q.style.height="32px";+Q.style.width="64px";Q.style.cursor="pointer";Q.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,I,M,L){I||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(E,"click",n);mxEvent.addListener(Q,"click",n);f();C.appendChild(Q);C.appendChild(E);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");+C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";b.editor.cancelFirst&&C.appendChild(E);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,H.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&+(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";C.appendChild(n);b.editor.cancelFirst||C.appendChild(E);q.appendChild(C);y.appendChild(q);u.appendChild(y);this.container=u};+PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var C=document.createElement("select");C.style.position="relative";C.style.marginBottom="4px";C.style.borderRadius="4px";C.style.borderWidth="1px";C.style.borderStyle="solid";+C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";y.style.marginRight="6px";H.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));H.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";H.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));H.appendChild(S);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.marginLeft="4px";E.style.fontSize="12px";E.style.width="210px";E.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.setAttribute("title",mxResources.get("width"));Q.style.textAlign="right";E.appendChild(Q);mxUtils.write(E," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign="right";E.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var m=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<m.length;n++){var x=document.createElement("option");x.setAttribute("value",m[n].unit);mxUtils.write(x,m[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;E.appendChild(g);-H.style.display="none";E.style.display="none";var F={},I=PageSetupDialog.getFormats();for(n=0;n<I.length;n++)m=I[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),B.appendChild(x);var M=function(){B.value="custom";for(var K=0;K<I.length;K++){var aa=I[K];null!=aa.format&&("a4"==aa.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==aa.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),-l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==aa.format.width&&l.height==aa.format.height?(B.value=aa.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==aa.format.height&&l.height==aa.format.width&&(B.value=aa.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==-B.value?(Q.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),B.value="custom",H.style.display="none",E.style.display=""):(H.style.display="",E.style.display="none")};M();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(E);var L=function(K,aa){K=F[B.value];null!=K.format?(Q.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),E.style.display=+H.style.display="none";E.style.display="none";var F={},I=PageSetupDialog.getFormats();for(n=0;n<I.length;n++)m=I[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),C.appendChild(x);var M=function(){C.value="custom";for(var K=0;K<I.length;K++){var aa=I[K];null!=aa.format&&("a4"==aa.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==aa.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),+l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==aa.format.width&&l.height==aa.format.height?(C.value=aa.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==aa.format.height&&l.height==aa.format.width&&(C.value=aa.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==+C.value?(Q.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),C.value="custom",H.style.display="none",E.style.display=""):(H.style.display="",E.style.display="none")};M();b.appendChild(C);mxUtils.br(b);b.appendChild(H);b.appendChild(E);var L=function(K,aa){K=F[C.value];null!=K.format?(Q.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),E.style.display="none",H.style.display=""):(H.style.display="none",E.style.display="");K=parseFloat(Q.value);if(isNaN(K)||0>=K)Q.value=Editor.toUnit(l.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(l.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(Q.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));aa||K.width==l.width&&K.height==l.height||(l=K,null!=u&&u(l))};mxEvent.addListener(f,"click",function(K){y.checked=!0;L(K);mxEvent.consume(K)});-mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(Q,"blur",L);mxEvent.addListener(Q,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(B,"change",function(K){L(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){Q.value=Editor.toUnit(Editor.fromUnit(Q.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,+mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(Q,"blur",L);mxEvent.addListener(Q,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){Q.value=Editor.toUnit(Editor.fromUnit(Q.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;L(K,!0);mxEvent.consume(K)});L(null,!0);return{set:function(K){l=K;M(null,null,!0)},get:function(){return l},widthInput:Q,heightInput:c}};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,f,l,u,y,q,B,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";+var FilenameDialog=function(b,f,l,u,y,q,C,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))S&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-y||null==B)if(null!=Q?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=g.parentNode;if(null!=I){var M=null;mxEvent.addListener(I,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor=+y||null==C)if(null!=Q?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=g.parentNode;if(null!=I){var M=null;mxEvent.addListener(I,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor="#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(L){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),F.click());L.stopPropagation();L.preventDefault()}))}}};m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.gap="4px";m.style.whiteSpace="nowrap";m.appendChild(x);g.appendChild(m);-null==y&&null!=B||null==Q||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),-f.style.width="100%",m.appendChild(f));null!=B&&g.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=Q?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=E&&E()});m.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));+null==y&&null!=C||null==Q||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),+f.style.width="100%",m.appendChild(f));null!=C&&g.appendChild(C);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=Q?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=E&&E()});m.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));b.editor.cancelFirst&&row.appendChild(m);mxEvent.addListener(x,"keypress",function(I){13==I.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(m);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;-FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var B=f.value.lastIndexOf(".drawio.");B=0<B?B:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<B?f.value.substring(0,B+1)+q:f.value+"."+q;"createEvent"in-document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var B=0,H=0;H<l.length;H++){var S=l[H].extension,E=null;"drawio"!=S&&(E=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=E&&q.substring(q.length-E.length-1)=="."+E){B=H;break}}u.value=B};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};-var WrapperWindow=function(b,f,l,u,y,q,B,H){H=null!=H?H:document.createElement("div");this.window=new mxWindow(f,H,l,u,y,q,!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);B(H)};-(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(E){B.dblClick(E)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(E){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){null!=-B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(E)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(E))})))}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 E=this.graph;B=null!=B?B:1;var Q=mxUtils.getLightDarkColor(null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background).cssText,c=mxUtils.getLightDarkColor(E.defaultPageBorderColor).cssText,g=null!=Q&&this.gridColor!=Q.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==E.getAdaptiveColors()&&E.background!=mxConstants.NONE&&null!=E.background&&(Q=E.background);if(E.isGridEnabled()||E.gridVisible){n=-10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,B))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=E.gridSize*this.scale*this.gridSteps*B):m="url("+this.gridImage+")";var x=g=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=E.gridSize*this.scale*this.gridSteps,I=H%F;F=S%F;null!=E.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*-this.scale-g+H,n)+I*B)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*B)+"px"}B=E.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);g=!Editor.isDarkMode()&&E.enableDiagramBackground;null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=n,E.view.backgroundPageShape.node.style.backgroundImage=m,E.view.backgroundPageShape.node.style.backgroundColor=Q,E.view.backgroundPageShape.node.style.borderColor=c,E.view.backgroundPageShape.node.style.colorScheme=-"none"==E.getAdaptiveColors()?"light":"",B.style.backgroundImage="none",B.style.backgroundColor="",E.container.style.backgroundColor=g?E.diagramBackgroundColor:""):(B.style.backgroundPosition=n,B.style.backgroundImage=m,"1"==urlParams.transparent?E.container.style.background="transparent":!g||null!=E.background&&E.background!=mxConstants.NONE?B.style.backgroundColor=Q:(B.style.backgroundColor=E.diagramBackgroundColor,E.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 E=[],Q=1;Q<this.gridSteps;Q++){var c=Q*S;E.push("M 0 "+c+" L "+H+" "+c+" M "+c+" 0 L "+c+" "+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="'+E.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 E=this.gridSize*this.view.scale*this.view.gridSteps;E=-Math.round(E-mxUtils.mod(this.view.translate.x*this.view.scale+B,E))+"px "+-Math.round(E-mxUtils.mod(this.view.translate.y*this.view.scale+H,E))+"px";S.style.backgroundPosition=E}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var E=this.view.scale,Q=this.view.translate,c=this.pageFormat,g=E*this.pageScale,m=this.view.getBackgroundPageBounds();-H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ja=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),+FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var C=f.value.lastIndexOf(".drawio.");C=0<C?C:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<C?f.value.substring(0,C+1)+q:f.value+"."+q;"createEvent"in+document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,H=0;H<l.length;H++){var S=l[H].extension,E=null;"drawio"!=S&&(E=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=E&&q.substring(q.length-E.length-1)=="."+E){C=H;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};+var WrapperWindow=function(b,f,l,u,y,q,C,H){H=null!=H?H:document.createElement("div");this.window=new mxWindow(f,H,l,u,y,q,!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);C(H)};+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=C.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(C.container),S.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(E){C.dblClick(E)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(E){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){null!=+C.tooltipHandler&&C.tooltipHandler.isHideOnHover()&&C.tooltipHandler.hide();C.isMouseDown&&!mxEvent.isConsumed(E)&&C.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){C.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(E))})))}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(C,H,S){var E=this.graph;C=null!=C?C:1;var Q=mxUtils.getLightDarkColor(null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background).cssText,c=mxUtils.getLightDarkColor(E.defaultPageBorderColor).cssText,g=null!=Q&&this.gridColor!=Q.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==E.getAdaptiveColors()&&E.background!=mxConstants.NONE&&null!=E.background&&(Q=E.background);if(E.isGridEnabled()||E.gridVisible){n=+10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=E.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=E.gridSize*this.scale*this.gridSteps,I=H%F;F=S%F;null!=E.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*+this.scale-g+H,n)+I*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*C)+"px"}C=E.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&E.enableDiagramBackground;null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=n,E.view.backgroundPageShape.node.style.backgroundImage=m,E.view.backgroundPageShape.node.style.backgroundColor=Q,E.view.backgroundPageShape.node.style.borderColor=c,E.view.backgroundPageShape.node.style.colorScheme=+"none"==E.getAdaptiveColors()?"light":"",C.style.backgroundImage="none",C.style.backgroundColor="",E.container.style.backgroundColor=g?E.diagramBackgroundColor:""):(C.style.backgroundPosition=n,C.style.backgroundImage=m,"1"==urlParams.transparent?E.container.style.background="transparent":!g||null!=E.background&&E.background!=mxConstants.NONE?C.style.backgroundColor=Q:(C.style.backgroundColor=E.diagramBackgroundColor,E.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(C,+H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var E=[],Q=1;Q<this.gridSteps;Q++){var c=Q*S;E.push("M 0 "+c+" L "+H+" "+c+" M "+c+" 0 L "+c+" "+H)}C=mxUtils.getLightDarkColor(C);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="'+E.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,H){b.apply(this,arguments);+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var E=this.gridSize*this.view.scale*this.view.gridSteps;E=-Math.round(E-mxUtils.mod(this.view.translate.x*this.view.scale+C,E))+"px "+-Math.round(E-mxUtils.mod(this.view.translate.y*this.view.scale+H,E))+"px";S.style.backgroundPosition=E}};mxGraph.prototype.updatePageBreaks=function(C,H,S){var E=this.view.scale,Q=this.view.translate,c=this.pageFormat,g=E*this.pageScale,m=this.view.getBackgroundPageBounds();+H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=C?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ja=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(aa+1)*n.height)),new mxPoint(Math.round(I),Math.round(m.y+(aa+1)*n.height))]:[new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(M))];null!=L[aa]?(L[aa].points=ja,L[aa].redraw()):(ja=new mxPolyline(ja,this.pageBreakColor),ja.dialect=this.dialect,ja.isDashed=this.pageBreakDashed,ja.pointerEvents=!1,ja.init(this.view.backgroundPane),ja.redraw(),L[aa]=ja)}for(aa=K;aa<L.length;aa++)null!=L[aa]&&L[aa].destroy();L.splice(K,L.length--K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var E=0;E<H.length;E++){if(this.graph.isTableCell(H[E])||this.graph.isTableRow(H[E]))return!1;if(this.graph.getModel().isVertex(H[E])){var Q=this.graph.getCellGeometry(H[E]);if(null!=Q&&Q.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=-function(){var B=l.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,E=this.graph.pageFormat,-Q=this.graph.pageScale,c=E.width*Q;E=E.height*Q;Q=Math.floor(Math.min(0,H)/c);var g=Math.floor(Math.min(0,S)/E);return new mxRectangle(this.scale*(this.translate.x+Q*c),this.scale*(this.translate.y+g*E),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/c)-Q)*c,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/E)-g)*E)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){u.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 y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,E,Q,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=-function(B,H,S){var E=this.graph.model.getParent(B);if(H){var Q=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);Q=!this.graph.model.isEdge(E)&&!this.graph.isSiblingSelected(B)&&(null!=Q&&Q.relative||!this.graph.isContainer(E)||this.graph.isPart(B))}else if(Q=q.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))Q=E,this.graph.isTable(Q)||(Q=this.graph.model.getParent(Q)),Q=!this.graph.selectionCellsHandler.isHandled(Q)||this.graph.isCellSelected(Q)&&this.graph.isToggleEvent(S.getEvent())||-this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(B);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var Y=q.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ha=this.view.translate,Z=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((ha.x+da.x)*Z,(ha.y+da.y)*Z,da.width*Z,da.height*Z))}return Y};y.useCssTransforms&&+K)}});C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,H,S){for(var E=0;E<H.length;E++){if(this.graph.isTableCell(H[E])||this.graph.isTableRow(H[E]))return!1;if(this.graph.getModel().isVertex(H[E])){var Q=this.graph.getCellGeometry(H[E]);if(null!=Q&&Q.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=+function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),H=0<C.width?C.x/this.scale-this.translate.x:0,S=0<C.height?C.y/this.scale-this.translate.y:0,E=this.graph.pageFormat,+Q=this.graph.pageScale,c=E.width*Q;E=E.height*Q;Q=Math.floor(Math.min(0,H)/c);var g=Math.floor(Math.min(0,S)/E);return new mxRectangle(this.scale*(this.translate.x+Q*c),this.scale*(this.translate.y+g*E),this.scale*(Math.ceil(Math.max(1,H+C.width/this.scale)/c)-Q)*c,this.scale*(Math.ceil(Math.max(1,S+C.height/this.scale)/E)-g)*E)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,H){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,H,S,E,Q,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=+function(C,H,S){var E=this.graph.model.getParent(C);if(H){var Q=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);Q=!this.graph.model.isEdge(E)&&!this.graph.isSiblingSelected(C)&&(null!=Q&&Q.relative||!this.graph.isContainer(E)||this.graph.isPart(C))}else if(Q=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))Q=E,this.graph.isTable(Q)||(Q=this.graph.model.getParent(Q)),Q=!this.graph.selectionCellsHandler.isHandled(Q)||this.graph.isCellSelected(Q)&&this.graph.isToggleEvent(S.getEvent())||+this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var H=this.graph.getModel(),S=H.getParent(C),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(C);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=S;S=H.getParent(S)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var Y=q.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ha=this.view.translate,Z=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((ha.x+da.x)*Z,(ha.y+da.y)*Z,da.width*Z,da.height*Z))}return Y};y.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(Y,da){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=-function(){return!1};y.panningHandler.isForcePanningEvent=function(Y){for(var da=Y.getSource();null!=da&&da!=y.container;){if("foreignObject"===da.nodeName||"text"===da.nodeName)return!1;da=da.parentNode}return!mxEvent.isPopupTrigger(Y.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(Y){try{y.getModel().isEdge(Y)?+function(){return!1};y.panningHandler.isForcePanningEvent=function(Y){for(var da=Y.getSource();null!=da&&da!=y.container;){if("foreignObject"===da.nodeName||"text"===da.nodeName)return!1;da=da.parentNode}return!mxEvent.isPopupTrigger(Y.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(Y){try{y.getModel().isEdge(Y)?S=y.pasteEdgeStyle=!1:H=!1;var da=y.getCellStyle(Y,!1),ha=[],Z=[],k;for(k in da)ha.push(da[k]),Z.push(k);y.getModel().isEdge(Y)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",ha,"cells",[Y],"force",!0));y.getModel().isEdge(Y)?S=y.pasteEdgeStyle=!0:H=!0}catch(v){this.handleError(v)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);H=S=y.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(Y,da){y.pasteCellStyles(y.includeDescendants(da.getProperty("cells")))});y.addListener("textInserted",function(Y,da){y.pasteCellStyles(da.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var E=mxUtils.bind(this,function(Y){null==Y&&(Y=window.event);return y.isEditing()||null!=Y&&this.isSelectionAllowed(Y)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=E,this.menubarContainer.onmousedown=E,this.toolbarContainer.onselectstart=E,this.toolbarContainer.onmousedown=E,this.diagramContainer.onselectstart=E,this.diagramContainer.onmousedown=E,this.sidebarContainer.onselectstart=E,this.sidebarContainer.onmousedown=E,this.formatContainer.onselectstart=E,this.formatContainer.onmousedown=E,null!=this.tabContainer&&(this.tabContainer.onselectstart=E),mxClient.IS_IOS&&(f=function(){var Y=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var da=@@ -2075,10 +2075,10 @@ this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.Format.linkEdgeImage.src):"flexArrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):"filledEdge"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.filledEdgeImage.src):"pipe"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.pipeEdgeImage.src):"wire"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var Y=y.currentVertexStyle.fontFamily||"Helvetica",da=String(y.currentVertexStyle.fontSize||"12"),ha=y.getView().getState(y.getSelectionCell());null!=ha&&(Y=ha.style[mxConstants.STYLE_FONTFAMILY]||Y,da=ha.style[mxConstants.STYLE_FONTSIZE]||da,10<Y.length&&(Y=Y.substring(0,8)+"..."));this.toolbar.setFontName(Y);this.toolbar.setFontSize(da)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(Y,da){Y=da.getProperty("cells");da=da.getProperty("parent");null!=da&&y.getModel().isLayer(da)&&!y.isCellVisible(da)&&null!=Y&&0<Y.length&&y.getModel().setVisible(da,!0)});Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var Y=y.getLayerForCells(y.getSelectionCells());-null!=Y&&y.setDefaultParent(Y)}});this.gestureHandler=mxUtils.bind(this,function(Y){null!=this.currentMenu&&mxEvent.getSource(Y)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=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(){y.view.validateBackground()}));-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;-EditorUi.parsePng=function(b,f,l){function u(H,S){var E=q;q+=S;return H.substring(E,q)}function y(H){H=u(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var B=u(b,4);if(null!=f&&f(q-8,B,l))break;value=u(b,l);u(b,4);if("IEND"==B)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);+null!=Y&&y.setDefaultParent(Y)}});this.gestureHandler=mxUtils.bind(this,function(Y){this.isHideCurrentMenuEvent(Y)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=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(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",+mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;+EditorUi.parsePng=function(b,f,l){function u(H,S){var E=q;q+=S;return H.substring(E,q)}function y(H){H=u(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);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 u=b.getRubberband();null!=u&&u.cancel()}));mxEvent.addListener(b.container,@@ -2086,33 +2086,33 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"arguments);l.updateActionStates()};b.showLinkDialog=mxUtils.bind(l,l.showLinkDialog);b.editLink=l.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,f=b.getSelectionCells(),l=this.initSelectionState(),u=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(l,f[y],f,u),u=!1)}this.updateSelectionStateForTableCells(l);if(Editor.enableCustomProperties&&null!=this.format){l.customProperties={};b=l.vertices;f=l.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],l.customProperties,0==y,l);for(y=0;y<f.length;y++)this.findCommonProperties(f[y],l.customProperties,0==b.length&&0==y,l)}return l};-EditorUi.prototype.findCommonProperties=function(b,f,l,u){if(null!=f){var y=mxUtils.bind(this,function(B){if(null!=B)if(l)for(var H=0;H<B.length;H++){if("function"!==typeof B[H].isVisible||B[H].isVisible(u,this.format))f[B[H].name]=B[H]}else for(var S in f){var E=!1;for(H=0;H<B.length;H++)if(B[H].name==S&&B[H].type==f[S].type){E=!0;break}E||delete f[S]}}),q=this.editor.graph.view.getState(b);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)),y(q.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{y(JSON.parse(b))}catch(B){}}};+EditorUi.prototype.findCommonProperties=function(b,f,l,u){if(null!=f){var y=mxUtils.bind(this,function(C){if(null!=C)if(l)for(var H=0;H<C.length;H++){if("function"!==typeof C[H].isVisible||C[H].isVisible(u,this.format))f[C[H].name]=C[H]}else for(var S in f){var E=!1;for(H=0;H<C.length;H++)if(C[H].name==S&&C[H].type==f[S].type){E=!0;break}E||delete f[S]}}),q=this.editor.graph.view.getState(b);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)),y(q.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{y(JSON.parse(b))}catch(C){}}};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 f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),B=y.getIndex(u),H=null,S=1,E=1,Q=0,c=B<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,B+1),q):null;Q<f.length-1;){var g=f[++Q];null==c||c!=g||null!=H&&S!=H||(H=S,S=0,E++,u=l.getParent(c),c=B+E<y.getChildCount()?l.getChildAt(l.getChildAt(y,B+E),q):null);var m=this.editor.graph.view.getState(g);+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),H=null,S=1,E=1,Q=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;Q<f.length-1;){var g=f[++Q];null==c||c!=g||null!=H&&S!=H||(H=S,S=0,E++,u=l.getParent(c),c=C+E<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+E),q):null);var m=this.editor.graph.view.getState(g);if(g==l.getChildAt(u,q+S)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))S++;else break}Q==E*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=E)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};-EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(H){y.clear()&&(u=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(H):this.handleError(H))}),B=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(B);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};+EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(H){y.clear()&&(u=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(H):this.handleError(H))}),C=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(C);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(l){null!=f?f(l):this.handleError(l)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(u.model.isEdge(b[B])||u.model.isVertex(b[B])){var H=u.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<y.length;S++)try{var E=H[y[S]];if(mxUtils.isLightDarkColor(E)){var Q=mxUtils.getLightDarkColor(E);u.setCellStyles(y[S],Q.light,[b[B]])}}catch(g){}f&&u.isHtmlLabel(b[B])&&-"0"!=mxUtils.getValue(H,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[B])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[B],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){Q=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,Q.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var H=u.getCellStyle(b[C],!1);if(null!=H)for(var S=0;S<y.length;S++)try{var E=H[y[S]];if(mxUtils.isLightDarkColor(E)){var Q=mxUtils.getLightDarkColor(E);u.setCellStyles(y[S],Q.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&+"0"!=mxUtils.getValue(H,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[C])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[C],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){Q=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,Q.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,f,l,u){l=this.editor.graph;b.cells.push(f);if(l.getModel().isVertex(f)){b.connections=0<l.model.getEdgeCount(f);b.unlocked=b.unlocked&&!l.isCellLocked(f);b.resizable=b.resizable&&l.isCellResizable(f);b.rotatable=b.rotatable&&l.isCellRotatable(f);b.movable=b.movable&&l.isCellMovable(f)&&!l.isTableRow(f)&&!l.isTableCell(f);b.swimlane=b.swimlane||l.isSwimlane(f);b.table=b.table||l.isTable(f);b.cell=b.cell||l.isTableCell(f);b.row=b.row||l.isTableRow(f);b.vertices.push(f);var y=l.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else l.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);q=l.view.getState(f);null!=q&&(b.html=b.html&&l.isHtmlLabel(f),b.autoSize=b.autoSize||l.isAutoSizeState(q),b.glass=b.glass&&l.isGlassState(q),b.rounded=b.rounded&&l.isRoundedState(q),b.lineJumps=b.lineJumps&&l.isLineJumpState(q),b.image=b.image||l.isImageState(q),b.shadow=b.shadow&&l.isShadowState(q),b.fill=b.fill&&l.isFillState(q),b.gradient=b.fill&&l.isGradientState(q),b.stroke=b.stroke&&l.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==f,l.mergeStyle(q.style,b.style,u))};EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,E){"mouseDown"==E.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,E){if(this.isEnabled())if(null!=E||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(Q.x,Q.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,E,Q){var c=Q.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?B.apply(this,arguments):this.graph.connectVertex(S.cell,E,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(Q.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=+l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(S,E,Q){var c=Q.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(S.cell,E,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(Q.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(Q.getGraphX(),Q.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),E)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,E){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var Q=E.getProperty("arrow"),c=E.getProperty("direction"),g=E.getProperty("event");Q=Q.getBoundingClientRect();var m=mxUtils.getOffset(b.container),n=b.container.scrollLeft+Q.x-m.x;m=b.container.scrollTop+Q.y-m.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,m,x,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(M,L,K){K(I);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(I))},function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,Q,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,E){null!=H&&window.clearTimeout(H)}))}};EditorUi.prototype.centerShapePicker=function(b,f,l,u,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(l-=q.width/2-10,u-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(l-=q.width/2-10,u+=f.height+6):y==mxConstants.DIRECTION_WEST?(l-=q.width+6,u-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(l+=f.width+6,u-=q.height/2-10);b.style.left=l+"px";b.style.top=u+"px"};-EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,B,H,S){var E=null;this.editor.graph.freehand.isDrawing()||(H=H||null==l,E=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,H),q,B,H,S),null!=E&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=E));return E};-EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,B,H,S,E,Q){Q=null!=Q?Q:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,I=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,I=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-I))};if(null!=B&&0<B.length){var m=this;c=this.editor.graph;g=document.createElement("div");+EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,H,S){var E=null;this.editor.graph.freehand.isDrawing()||(H=H||null==l,E=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,H),q,C,H,S),null!=E&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=E));return E};+EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,H,S,E,Q){Q=null!=Q?Q:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,I=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,I=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-I))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");y=c.view.getState(l);var n=null==l||null!=y&&c.isTransparentState(y)?null:c.copyStyle(l);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");H||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var I=x.geometry;c.model.isEdge(x)&&(I=I.getTerminalPoint(!1),I=new mxRectangle(0,0,I.x,I.y));null!=I&&(I=this.sidebar.createVertexTemplateFromCells([x],I.width,I.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=S([L]);c.model.isEdge(L)?L.geometry.translate(K.x,K.y):(L.geometry.x=K.x,L.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);Q&&c.startEditing(L);null!=m.hoverIcons&&m.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=l?[l]:c.getSelectionCells()),c.updateShapes(x,L);null!=q&&q(M);mxEvent.consume(M)}}),25,25,null,null,l),I.style.display="flex",I.style.alignItems=-"center",I.style.justifyContent="center",F.appendChild(I))});for(E=0;E<(H?Math.min(B.length,4):B.length);E++)y(B[E]);B=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<B&&(g.style.top=Math.max(c.container.scrollTop+22,f-B)+"px");B=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<B&&(g.style.left=Math.max(c.container.scrollLeft+22,b-B)+"px")}return g};-EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,B,H,S){return u.createVertex(null,null,S||"",0,0,B||120,H||60,q,!1)});f=mxUtils.bind(this,function(q,B,H){q=new mxCell(H||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=B?B:0),!1);q.geometry.points=null!=B?[new mxPoint(q.geometry.width/2,B)]:[];q.geometry.relative=!0;q.edge=+"center",I.style.justifyContent="center",F.appendChild(I))});for(E=0;E<(H?Math.min(C.length,4):C.length);E++)y(C[E]);C=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<C&&(g.style.top=Math.max(c.container.scrollTop+22,f-C)+"px");C=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<C&&(g.style.left=Math.max(c.container.scrollLeft+22,b-C)+"px")}return g};+EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,H,S){return u.createVertex(null,null,S||"",0,0,C||120,H||60,q,!1)});f=mxUtils.bind(this,function(q,C,H){q=new mxCell(H||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=!0;return q});if(null!=b)try{b=u.cloneCell(b),u.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(u.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",u.vertexFontSize),40,20,"Text"),u.model.isVertex(b)&&u.isAutoSizeCell(b)&&Graph.createOffscreenGraph(u.getStylesheet()).updateCellSize(b));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),y("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),y("triangle;whiteSpace=wrap;html=1;",60,80),y("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),y("shape=tape;whiteSpace=wrap;html=1;",120,100),y("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),y("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];l&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),@@ -2127,17 +2127,17 @@ EditorUi.prototype.getImageForMarker=function(b,f,l){return"flexArrow"==l?null!=b?"1"!=f?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=f?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,f=this.actions.get("paste"),l=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));l.setEnabled(f.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var B=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||q.getSelectionCells();B=q.getExportableCells(q.model.getTopmostCells(B));for(var H={},S=q.createCellLookup(B),E=q.cloneCells(B,null,H),Q=new mxGraphModel,c=Q.getChildAt(Q.getRoot(),-0),g=0;g<E.length;g++){Q.add(c,E[g]);var m=q.view.getState(B[g]);if(null!=m){var n=q.getCellGeometry(E[g]);null!=n&&n.relative&&!Q.isEdge(B[g])&&null==S[mxObjectIdentity.get(Q.getParent(B[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(H,S),E);mxClipboard.insertCount=1;mxClipboard.setCells(E)}b.updatePasteActionStates();return B};var l=mxClipboard.paste;mxClipboard.paste=function(q){var B=-null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=l.apply(this,arguments);b.updatePasteActionStates();return B};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,B){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};+EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var H={},S=q.createCellLookup(C),E=q.cloneCells(C,null,H),Q=new mxGraphModel,c=Q.getChildAt(Q.getRoot(),+0),g=0;g<E.length;g++){Q.add(c,E[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(E[g]);null!=n&&n.relative&&!Q.isEdge(C[g])&&null==S[mxObjectIdentity.get(Q.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(H,S),E);mxClipboard.insertCount=1;mxClipboard.setCells(E)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=+null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):C=l.apply(this,arguments);b.updatePasteActionStates();return C};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,C){y.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 U=this.graph.getPageLayout(),X=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*X.width),this.scale*(this.translate.y+U.y*X.height),this.scale*U.width*X.width,this.scale*U.height*X.height)};b.getPreferredPageSize=function(U,X,fa){U=this.getPageLayout();X=this.getPageSize();return new mxRectangle(0,0,U.width*X.width,U.height*X.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,X,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,-Ja=mxRectangle.fromRectangle(la);Ja.x=Ja.x/wa-ya.x;Ja.y=Ja.y/wa-ya.y;Ja.width/=wa;Ja.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(X||1,Ga/Ja.width)):wa;X=(Ga-U*Ja.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ja.height)/this.lightboxVerticalDivider/U;qa&&(X=Math.max(X,0),Ma=Math.max(Ma,-0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(X-Ja.x),Math.floor(Ma-Ja.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+Ia=mxRectangle.fromRectangle(la);Ia.x=Ia.x/wa-ya.x;Ia.y=Ia.y/wa-ya.y;Ia.width/=wa;Ia.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(X||1,Ga/Ia.width)):wa;X=(Ga-U*Ia.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ia.height)/this.lightboxVerticalDivider/U;qa&&(X=Math.max(X,0),Ma=Math.max(Ma,+0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(X-Ia.x),Math.floor(Ma-Ia.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",u)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=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 q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,X,fa){B++;+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var C=0;q=mxUtils.bind(this,function(U,X,fa){C++;var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",X);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var H=Graph.sanitizeLink(y.backBtn.url);null!=H&&q(mxUtils.bind(this,function(U){window.location.href=H;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),E=document.createElement("div");E.style.fontFamily=Editor.defaultHtmlFont;E.style.display="inline-block";E.style.verticalAlign="top";E.style.fontWeight="bold";E.style.marginTop="8px";E.style.fontSize="14px";E.style.cursor="default";E.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(E);var Q=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){E.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(E,U+1+" / "+this.pages.length);E.setAttribute("title",mxResources.get("currentPage")+@@ -2157,16 +2157,16 @@ F():I(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"moub.container.scrollLeft)<ja&&Math.abs(this.scrollTop-b.container.scrollTop)<ja&&Math.abs(this.startX-X.getGraphX())<ja&&Math.abs(this.startY-X.getGraphY())<ja&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ca=b.view.validate,ba=new mxPoint,oa=!1,Y=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&Y!=l.currentPage){Y=l.currentPage;oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var X=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(X.x!=this.translate.x||X.y!=this.translate.y)this.invalidate(),this.translate.x=X.x,this.translate.y=X.y}X=b.getPagePadding();var fa=b.getPageSize();U=X.x-(this.x0||0)*fa.width;X=X.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=X)this.invalidate(),this.translate.x=U,this.translate.y=X}ca.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var X=this.getPageLayout(),fa=this.getDefaultTranslate(X),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=X.x;this.view.y0=X.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;-U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=window.setTimeout(mxUtils.bind(this,+U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,O=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||O)k=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)),Z.style.transformOrigin="",ha.style.transformOrigin="",mxClient.IS_SF?(Z.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){Z.style.transform="";ha.style.transform=""},0)):(Z.style.transform="",ha.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var X=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=J&&(la+=X.x-J.x,qa+=X.y-J.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor--1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,X,fa,na){na=null!=na?na:this.zoomFactor;(X=X||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop++1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=O=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,X,fa,na){na=null!=na?na:this.zoomFactor;(X=X||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=Z.getAttribute("filter")&&(T=Z.getAttribute("filter"),Z.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=X||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-b.container.offsetLeft;var la=X||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;Z.style.transformOrigin=na+"px "+la+"px";Z.style.transform="scale("+U+")";ha.style.transformOrigin=na+"px "+la+"px";ha.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(X||null==v?b.container.clientWidth/2+b.container.scrollLeft-na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+"px")+" "+(X||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",U))}V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,X,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),-na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(X?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(X?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):+na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(X?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(X?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),O=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),na=-1),b.lazyZoom(X,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),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;if(null!=this.format){var f=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+f+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,@@ -2175,11 +2175,11 @@ EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();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,f){try{var l=mxUtils.parseXml(b);this.editor.setGraphXml(l.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=f&&(this.editor.setFilename(f),this.updateDocumentTitle())}catch(u){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+u.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,f){this.showDialog((new PrintDialog(this,b,f)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,f,l,u){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(b);y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});y.popup(f,l,null,u);this.setCurrentMenu(y)};-EditorUi.prototype.setCurrentMenu=function(b,f){this.currentMenuElt=f;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 f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(l){}};-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,f){this.replaceDiagramData(xUtils.getXml(f))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};-EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,l;for(l in urlParams)b=0==f?b+"?":b+"&",b+=l+"="+urlParams[l],f++;return b};-EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,l=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();l!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};+EditorUi.prototype.isHideCurrentMenuEvent=function(b){b=mxEvent.getSource(b);if(null!=this.currentMenu){if(b==this.currentMenu.div)return!1;for(var f=this.currentMenu.activeRow;null!=f;){if(b==f.div)return!1;f=f.activeRow}return!0}return!1};EditorUi.prototype.setCurrentMenu=function(b,f){this.currentMenuElt=f;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 f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(l){}};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,f){this.replaceDiagramData(xUtils.getXml(f))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};+EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,l;for(l in urlParams)b=0==f?b+"?":b+"&",b+=l+"="+urlParams[l],f++;return b};EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,l=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();l!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,f=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),l=b.view.translate,u=b.view.scale;f.x=f.x/u-l.x;f.y=f.y/u-l.y;f.width/=u;f.height/=u;null!=b.backgroundImage&&f.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==f.width||0==f.height?(b.zoomTo(1),this.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(f.x-=l.x,f.y-=l.y,f.width+=l.width+l.x,f.height+=l.height+l.y),b.fitWindow(f))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,f=b.container;if(!this.editor.extendCanvas)f.scrollTop=0,f.scrollLeft=0,mxUtils.hasScrollbars(f)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(f))if(b.pageVisible){var l=b.getPagePadding();f.scrollTop=Math.floor(l.y);f.scrollLeft=Math.floor(Math.min(l.x,(f.scrollWidth-f.clientWidth)/2));l=b.getGraphBounds();0<l.width&&0<l.height&&(l.x>f.scrollLeft+.9*f.clientWidth&&(f.scrollLeft=Math.min(l.x+@@ -2187,8 +2187,8 @@ l.width-f.clientWidth,l.x-10)),l.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=M(f.clientHeight-u)/4)))}else{l=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());u=b.view.translate;var y=b.view.scale;l.x=l.x/y-u.x;l.y=l.y/y-u.y;l.width/=y;l.height/=y;b.view.setTranslate(Math.floor(Math.max(0,(f.clientWidth-l.width)/2)-l.x+2),Math.floor((b.pageVisible?0:Math.max(0,(f.clientHeight-l.height)/4))-l.y+1))}};EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,l=mxUtils.hasScrollbars(f.container),u=0,y=0;l&&(u=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(l){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();l&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-u,f.container.scrollTop=f.view.translate.y*f.view.scale-y);f.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};-EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){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),E=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,B-S));q=Math.max(0,Math.min(q,H-E));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,E)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,+EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,C-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var C=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,+H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),E=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-S));q=Math.max(0,Math.min(q,H-E));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,E)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,"resize",u);b.window.destroy();null!=l&&l()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,l,u,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=l;this.previousFormat=this.format=u;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var l=this.previousImage;null!=l&&Graph.isPageLink(l.src)&&(l=this.ui.createImageForPageLink(l.src,this.ui.currentPage));this.ui.setBackgroundImage(l);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,f=b.pageFormat,this.previousFormat.width!=f.width||this.previousFormat.height!=f.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=f);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))};@@ -2217,17 +2217,17 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(l,100);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setOpacity(l,0);window.setTimeout(mxUtils.bind(this,function(){null!=l.parentNode&&l.parentNode.removeChild(l)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var f=document.createElement("div");f.className="geStatusDiv";f.setAttribute("title",b);f.innerText=b;return f};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.createDiv=function(b){var f=document.createElement("div");f.className=b;return f};-EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=B){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,H+(f?g.x-B.x:B.y-g.y)-l));mxEvent.consume(c);H!=Q()&&(S=!0,E=null)}}function q(c){y(c);B=H=null}var B=null,H=null,S=!0,E=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var Q=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){B=new mxPoint(mxEvent.getClientX(c),+EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,H+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);H!=Q()&&(S=!0,E=null)}}function q(c){y(c);C=H=null}var C=null,H=null,S=!0,E=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var Q=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));H=Q();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=E?E-l:0;E=Q();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};EditorUi.prototype.prompt=function(b,f,l){b=new FilenameDialog(this,f,mxResources.get("apply"),function(u){l(parseFloat(u))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};EditorUi.prototype.handleError=function(b,f,l,u,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,l,null,null,null,null,null,null,null,null,u?l:null)}else null!=l&&l()};-EditorUi.prototype.showError=function(b,f,l,u,y,q,B,H,S,E,Q,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,B,c,H,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,E||340,Q||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,B,H,S,E){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,B,H,S,E);this.dialogs.push(this.dialog)};+EditorUi.prototype.showError=function(b,f,l,u,y,q,C,H,S,E,Q,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,H,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,E||340,Q||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,H,S,E){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,H,S,E);this.dialogs.push(this.dialog)};EditorUi.prototype.hideDialog=function(b,f,l){var u=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){u=this.dialogs[y];break}null==u||null!=l&&l!=this.dialog.container.firstChild||(u.closing=!0,0==u.close(b,f)?delete u.closing:(delete u.closing,b=mxUtils.lastIndexOf(this.dialogs,u),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",u)),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 f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(B){this.handleError(B)}};-EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,B=q.cellEditor.saveSelection(),H=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(B);f(S)},function(){q.cellEditor.restoreSelection(B)},l,u,y);this.showDialog(b.container,230,H,!0,!1);b.init()};+EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(C){this.handleError(C)}};+EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),H=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(C);f(S)},function(){q.cellEditor.restoreSelection(C)},l,u,y);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,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var B=1024*q,H=Math.min(B+1024,l),S=Array(H-B),E=0;B<H;++E,++B)S[E]=b[B].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};+EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,H=Math.min(C+1024,l),S=Array(H-C),E=0;C<H;++E,++C)S[E]=b[C].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var l=b.indexOf("<mxGraphModel ");if(0<=l){var u=b.lastIndexOf("</mxGraphModel>");u>l&&(f=b.substring(l,u+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(y){}return f};EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,l=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(l=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==l||0==l.length)&&(l=b.getData("text/plain")),null!=l&&(l=Graph.zapGremlins(mxUtils.trim(l)),b=this.extractGraphModelFromHtml(l),null!=b&&(l=b))));null!=l&&this.isCompatibleString(l)&&(f=l);return f};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(f){this.save(f)}),null,mxUtils.bind(this,function(f){if(null!=f&&0<f.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};@@ -2235,16 +2235,16 @@ EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&t"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(f))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(f);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(l){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};EditorUi.prototype.executeLayouts=function(b,f){this.executeLayout(mxUtils.bind(this,function(){var l=new mxCompositeLayout(this.editor.graph,b),u=this.editor.graph.getSelectionCells();l.execute(this.editor.graph.getDefaultParent(),0==u.length?null:u)}),!0,f)};EditorUi.prototype.executeLayout=function(b,f,l){var u=this.editor.graph;u.getModel().beginUpdate();try{b()}catch(y){throw y;}finally{this.allowAnimation&&f&&u.isEnabled()?(b=new mxMorphing(u),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=l&&l()})),b.startAnimation()):(u.getModel().endUpdate(),null!=l&&l())}};-EditorUi.prototype.showImageDialog=function(b,f,l,u){u=this.editor.graph.cellEditor;var y=u.saveSelection(),q=mxUtils.prompt(b,f);u.restoreSelection(y);if(null!=q&&0<q.length){var B=new Image;B.onload=function(){l(q,B.width,B.height)};B.onerror=function(){l(null);mxUtils.alert(mxResources.get("fileNotFound"))};B.src=q}else l(null)};EditorUi.prototype.showLinkDialog=function(b,f,l){b=new LinkDialog(this,b,f,l);this.showDialog(b.container,420,90,!0,!0);b.init()};+EditorUi.prototype.showImageDialog=function(b,f,l,u){u=this.editor.graph.cellEditor;var y=u.saveSelection(),q=mxUtils.prompt(b,f);u.restoreSelection(y);if(null!=q&&0<q.length){var C=new Image;C.onload=function(){l(q,C.width,C.height)};C.onerror=function(){l(null);mxUtils.alert(mxResources.get("fileNotFound"))};C.src=q}else l(null)};EditorUi.prototype.showLinkDialog=function(b,f,l){b=new LinkDialog(this,b,f,l);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,null,new mxRectangle(0,0,440,220)),b.init())};EditorUi.prototype.showBackgroundImageDialog=function(b,f){b=null!=b?b:mxUtils.bind(this,function(u){u=new ChangePageSetup(this,null,u);u.ignoreColor=!0;this.editor.graph.model.execute(u)});var l=mxUtils.prompt(mxResources.get("backgroundImage"),null!=f?f.src:"");null!=l&&0<l.length?(f=new Image,f.onload=function(){b(new mxImage(l,f.width,f.height),!1)},f.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},f.src=l):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,f,l){mxUtils.confirm(b)?null!=f&&f():null!=l&&l()};EditorUi.prototype.createOutline=function(b){var f=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){f.update(!1)});return f};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",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};EditorUi.prototype.createKeyHandler=function(b){function f(c,g,m){if(!u.isSelectionEmpty()&&u.isEnabled()){g=null!=g?g:1;var n=u.getCompositeParents(u.getSelectionCells()),x=0<n.length?n[0]:null;if(null!=x)if(m){u.getModel().beginUpdate();try{for(x=0;x<n.length;x++)if(u.getModel().isVertex(n[x])&&u.isCellResizable(n[x])){var F=u.getCellGeometry(n[x]);null!=F&&(F=F.clone(),37==c?F.width=Math.max(0,F.width-g):38==c?F.height=Math.max(0,F.height-g):39==c?F.width+=g:40==c&&(F.height+=g),u.getModel().setGeometry(n[x],F))}}finally{u.getModel().endUpdate()}}else{F=u.model.getParent(x);var I=u.getView().scale;m=null;1==u.getSelectionCount()&&u.model.isVertex(x)&&null!=u.layoutManager&&!u.isCellLocked(x)&&(m=u.layoutManager.getLayout(F));if(null!=m&&m.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?u.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&u.model.add(F,x,Math.min(u.model.getChildCount(F),g+1));else{var M=u.graphHandler;null!=M&&(null==M.first&&M.start(x,0,0,u.getMovableCells(n)),null!=M.first&&(x=-n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*I,M.currentDy+=x*I,M.checkPreview(),M.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/I),K=M.roundLength(M.currentDy/I);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||+n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*I,M.currentDy+=x*I,M.checkPreview(),M.updatePreview()),null!=C&&window.clearTimeout(C),C=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/I),K=M.roundLength(M.currentDy/I);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&-(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?+(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=l.actions.get(l.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var m=document.getElementById("geOmniSearch");null!=m&&30<m.clientWidth&&m.focus()};if(null!=H[c.keyCode]&&!u.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(u.model.isVertex(u.getSelectionCell()))return function(){var m=u.connectVertex(u.getSelectionCell(),H[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(c,g,m,n){var x=this.actions.get(m);null!=x&&(m=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,m):y.bindControlKey(c,m):n?y.bindShiftKey(c,m):y.bindKey(c,m))});var E=this,Q=y.escape;y.escape=function(c){Q.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){u.exitGroup()});y.bindControlShiftKey(35,function(){u.enterGroup()});y.bindShiftKey(36,function(){u.home()});y.bindKey(35,function(){u.refresh()});@@ -2253,57 +2253,57 @@ y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zy.bindAction(65,!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){u.isEnabled()&&u.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,l){var u=document.createElement("a");this.addMenuHandler(u,f,l);mxUtils.write(u,b);u.className="geItem";return u};-EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,B=mxUtils.bind(this,function(H){null!=l&&l(H);if(!mxEvent.isConsumed(H)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();-var E=mxUtils.getOffset(b);S.popup(E.x,E.y+b.offsetHeight,null,H);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(H)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(H){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&B(H)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(H){!this.menus.autoPopup&&-null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(H)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(H).nodeName?H.preventDefault():H.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(H){B(H);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(H){B(H);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(H){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,-function(H){this.hideCurrentMenu();13!=H.keyCode&&27!=H.keyCode&&(B(H),q=!0)})))}};+EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(H){null!=l&&l(H);if(!mxEvent.isConsumed(H)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();+var E=mxUtils.getOffset(b);S.popup(E.x,E.y+b.offsetHeight,null,H);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(H)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(H){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(H)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(H){!this.menus.autoPopup&&+null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(H)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(H).nodeName?H.preventDefault():H.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(H){C(H);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(H){C(H);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(H){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,+function(H){this.hideCurrentMenu();13!=H.keyCode&&27!=H.keyCode&&(C(H),q=!0)})))}};EditorUi.prototype.addShapePicker=function(b,f){var l=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(u){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(u)}))};EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var l=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,-function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),-mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var q=mxUtils.bind(this,function(B,H,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(B){if(27==B.keyCode||13==B.keyCode||9==B.keyCode)27==B.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),-this.hideCurrentMenu(),mxEvent.consume(B)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(B,H){q(B,H,H.getProperty("factor"))}))})(f);return f};+function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),+mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,H,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),+this.hideCurrentMenu(),mxEvent.consume(C)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(C,H){q(C,H,H.getProperty("factor"))}))})(f);return f};EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(l){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(l)}));return f};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 f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,B){return l(Graph.sanitizeHtml(u),y,q,B)}})();+null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,C){return l(Graph.sanitizeHtml(u),y,q,C)}})();Date.prototype.toISOString||function(){function b(f){f=String(f);1===f.length&&(f="0"+f);return f}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,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=-arguments[2])}var H=Number(y.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),l);for(var S=f(this)?Object(new this(H)):Array(H),E=0,Q;E<H;)Q=y[E],S[E]=q?"undefined"===typeof B?q(Q,E):q.call(B,Q,E):Q,E+=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(" ");+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,C;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(C=+arguments[2])}var H=Number(y.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),l);for(var S=f(this)?Object(new this(H)):Array(H),E=0,Q;E<H;)Q=y[E],S[E]=q?"undefined"===typeof C?q(Q,E):q.call(C,Q,E):Q,E+=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(f){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";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,f,l){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),this.clippedImage=b;b=this.clippedSvg}return b};(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,l,u,y,q){return"default"==y&&null!=q?"fillcolor"==u.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,l,u){null==u&&(u=f);return b.apply(this,[f,l,u])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,B,H,S){var E=b.apply(this,arguments);if(null!=l){var Q=E.getElementsByTagName("img");0<Q.length&&(Q[0].className="geButton")}return E}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,H,S){var E=b.apply(this,arguments);if(null!=l){var Q=E.getElementsByTagName("img");0<Q.length&&(Q[0].className="geButton")}return E}})();Graph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);-return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,E=null,Q=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(J.cell);-if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),V=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=V+2;T.grow(V);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+-N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){V*=v;var X=2*V;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,X))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,X,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,X))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,X,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,-k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(V=N.getHandleForEvent(k),null!=V&&(N.start(k.getGraphX(),k.getGraphY(),V),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(N=this.getActualStartSize(J.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(N.x-N.width-1)*v+(0==N.x?J.width:0),J.y,1,J.height))||(0<N.y||-0<N.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(N.y-N.height-1)*v+(0==N.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(J.cell),null!=N&&null!=N.customHandles&&(V=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),V),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&-this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(B=new mxPoint(k.getGraphX(),k.getGraphY()),Q=this.isCellSelected(J.cell),S=J,H=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?E=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(E=v.getHandleForEvent(k))))}}));-this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=B&&null!=S&&null!=H){if(J=S,null!=E||Math.abs(B.x-v.getGraphX())>N||Math.abs(B.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=-T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),X=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=N&&(V=E,null==V&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?V=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?V=T.bends.length-1:null!=N&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&-(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,B.x,B.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!X&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?-this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());Q=!1;B=H=S=E=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==-k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=J.absolutePoints,null!=N)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&-U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(J.x,-J.y-2,J.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(J.x,J.y+J.height-2,J.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(J.x-2,J.y,4,J.height))&&this.model.getChildAt(v,0)!=J.cell||mxUtils.intersects(k,new mxRectangle(J.x+J.width-2,J.y,4,J.height)))T="col-resize";for(v=J;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),-V=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*V+(0==N.x?v.width*V:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*V+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){E=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=+return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,H=null,S=null,E=null,Q=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var O=this.selectionCellsHandler.getHandler(J.cell);+if(null==O||null==O.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),V=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;O=V+2;T.grow(V);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-O,k.getGraphY()-O)&&mxUtils.contains(J,k.getGraphX()-O,k.getGraphY()+O)&&mxUtils.contains(J,k.getGraphX()+O,k.getGraphY()+O)&&mxUtils.contains(J,k.getGraphX()++O,k.getGraphY()-O))){var U=this.model.getParent(J.cell);O=this.model.getParent(U);if(!this.isCellSelected(O)){V*=v;var X=2*V;if(this.model.getChildAt(O,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,X))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,X,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,X))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,X,J.height)))U=this.selectionCellsHandler.isHandled(O),this.selectCellForEvent(O,+k.getEvent()),O=this.selectionCellsHandler.getHandler(O),null!=O&&(V=O.getHandleForEvent(k),null!=V&&(O.start(k.getGraphX(),k.getGraphY(),V),O.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(O=this.getActualStartSize(J.cell),(0<O.x||0<O.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(O.x-O.width-1)*v+(0==O.x?J.width:0),J.y,1,J.height))||(0<O.y||+0<O.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(O.y-O.height-1)*v+(0==O.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),O=this.selectionCellsHandler.getHandler(J.cell),null!=O&&null!=O.customHandles&&(V=mxEvent.CUSTOM_HANDLE-O.customHandles.length+1,O.start(k.getGraphX(),k.getGraphY(),V),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&+this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),Q=this.isCellSelected(J.cell),S=J,H=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?E=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(E=v.getHandleForEvent(k))))}}));+this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var O=this.tolerance;if(null!=C&&null!=S&&null!=H){if(J=S,null!=E||Math.abs(C.x-v.getGraphX())>O||Math.abs(C.y-v.getGraphY())>O){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=+T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),X=U==mxEdgeStyle.EntityRelation;O=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=O&&(V=E,null==V&&(k=new mxRectangle(C.x,C.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,O[0].x,O[0].y)?V=0:mxUtils.contains(k,O[O.length-1].x,O[O.length-1].y)?V=T.bends.length-1:null!=O&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&+(null!=U&&(2==O.length||3==O.length&&(0==Math.round(O[0].x-O[1].x)&&0==Math.round(O[1].x-O[2].x)||0==Math.round(O[0].y-O[1].y)&&0==Math.round(O[1].y-O[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,C.x,C.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!X&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?+this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());Q=!1;C=H=S=E=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==+k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),O=J.absolutePoints,null!=O)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,O[0].x,O[0].y)||mxUtils.contains(k,O[O.length-1].x,O[O.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&+U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<O.length-1&&0<=v&&(T=0==Math.round(O[v].x-O[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){O=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(O);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),O=this.model.getParent(v),!this.isCellSelected(O)))if(mxUtils.intersects(k,new mxRectangle(J.x,+J.y-2,J.width,4))&&this.model.getChildAt(O,0)!=v||mxUtils.intersects(k,new mxRectangle(J.x,J.y+J.height-2,J.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(J.x-2,J.y,4,J.height))&&this.model.getChildAt(v,0)!=J.cell||mxUtils.intersects(k,new mxRectangle(J.x+J.width-2,J.y,4,J.height)))T="col-resize";for(v=J;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(O=this.getActualStartSize(v.cell),+V=this.view.scale,(0<O.x||0<O.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(O.x-O.width-1)*V+(0==O.x?v.width*V:0),v.y,1,v.height))?T="col-resize":(0<O.y||0<O.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(O.y-O.height-1)*V+(0==O.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){E=C=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};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(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)v.push(new mxRectangle(((U.x+X)*T+N.x)*V,(U.y*J+N.y)*V,T*V,J*V));for(X=1;X<U.height;X++)v.push(new mxRectangle((U.x*T+N.x)*V,((U.y+X)*J+N.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,N=[],T=0;T<v.length;T++){var V=-this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==V||J.get(V)||(J.put(V,!0),N.push(V))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&-this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,N,T,V){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};+this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,O=this.graph.pageScale,T=J.width*O;J=J.height*O;O=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)v.push(new mxRectangle(((U.x+X)*T+O.x)*V,(U.y*J+O.y)*V,T*V,J*V));for(X=1;X<U.height;X++)v.push(new mxRectangle((U.x*T+O.x)*V,((U.y+X)*J+O.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,O=[],T=0;T<v.length;T++){var V=+this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==V||J.get(V)||(J.put(V,!0),O.push(V))}return O};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,O){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&+this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,O,T,V){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=O&&this.graph.applyNewEdgeStyle(O,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),M=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;L.apply(this,arguments);k!=this.currentState?(I=(new Date).getTime(),M=0):M=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<M||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(k){return aa.apply(this,arguments)||mxEvent.isShiftDown(k)};var ja=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ja=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=-ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):+ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var O=this.getClickableLinkForCell(J);null!=O?this.isCustomLink(O)?this.customLinkClicked(O,J):this.openLink(O):v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(k,v){var J=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,J,null,!0);if(this.isToggleEvent(v))for(J=0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var Y=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:Y.apply(this,arguments)};var da=this.updateMouseEvent;this.updateMouseEvent=function(k){k=da.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),-k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ha=this.isCellSelectable;this.isCellSelectable=function(k){return ha.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var Z=null;+k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,O){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ha=this.isCellSelectable;this.isCellSelectable=function(k){return ha.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var Z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),Z=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var J=v.getProperty("cell");null==J?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,k.y)):null!=Z?this.addSelectionCells(Z):1<this.getSelectionCount()&&this.isCellSelected(J)&&this.removeSelectionCell(J);Z=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var J=k.view.graph;return v&&(J.isCellSelected(k.cell)||J.isTableRow(k.cell)&&J.selectionCellsHandler.isHandled(J.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var k=this.connectionHandler.constraintHandler;null!=k.currentFocus&&k.isStateIgnored(k.currentFocus,!0)&&(k.currentFocus=null,k.constraints=null,k.destroyIcons());k.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;@@ -2317,14 +2317,14 @@ Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveGraph.createOffscreenGraph=function(b){var f=new Graph(document.createElement("div"));f.stylesheet.styles=mxUtils.clone(b.styles);f.resetViewOnRootChange=!1;f.setConnectable(!1);f.gridEnabled=!1;f.autoScroll=!1;f.setTooltips(!1);f.setEnabled(!1);f.container.style.visibility="hidden";f.container.style.position="absolute";f.container.style.overflow="hidden";f.container.style.height="1px";f.container.style.width="1px";return f};Graph.createSvgImage=function(b,f,l,u,y){l=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+f+'px" '+(null!=u&&null!=y?'viewBox="0 0 '+u+" "+y+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+l+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0)),b,f)};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,f,l,u,y){var q=mxUtils.createXmlDocument(),B=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&B.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.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",-l+"px");B.setAttribute("height",u+"px");B.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(B);return B};-Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=f*q;B.height=l*q;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var E=B.getContext("2d");E.scale(q,q);E.drawImage(H,0,0);u(B.toDataURL())}catch(Q){u(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=+Graph.createSvgNode=function(b,f,l,u,y){var q=mxUtils.createXmlDocument(),C=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&C.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);C.setAttribute("version","1.1");C.setAttribute("width",+l+"px");C.setAttribute("height",u+"px");C.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(C);return C};+Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var E=C.getContext("2d");E.scale(q,q);E.drawImage(H,0,0);u(C.toDataURL())}catch(Q){u(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(E){u(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==B&&null!=f&&(B={}),null!=B&&(B[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){B=null;for(var E=0;E<q[S].style.length;E++){var Q=q[S].style.item(E),c=q[S].style.getPropertyValue(Q);H=y(q[S],Q,c)||H}"FONT"==q[S].nodeName&&-""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),H=y(q[S],"color",c)||H);null!=f&&null!=B&&q[S].setAttribute(f,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),B;for(B in q){var H=q[B];""==H?(b[u].style[B]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[B]=H;l=!0}}}catch(S){}return l};+Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,H=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){C=null;for(var E=0;E<q[S].style.length;E++){var Q=q[S].style.item(E),c=q[S].style.getPropertyValue(Q);H=y(q[S],Q,c)||H}"FONT"==q[S].nodeName&&+""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),H=y(q[S],"color",c)||H);null!=f&&null!=C&&q[S].setAttribute(f,JSON.stringify(C))}return H};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var H=q[C];""==H?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=H;l=!0}}}catch(S){}return l};Graph.getGivenColor=function(b,f){var l=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var u=b.getAttribute(Graph.backupStyleAttribute);if(null!=u){var y=JSON.parse(u);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?l=b.getAttribute("color"):""!=y[f]&&(l=y[f]))}}catch(q){}null==l&&""!=b.style[f]&&(l=b.style[f])}return l};-Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),B=[],H=0;H<q.length;H++)B.push({node:q[H],value:q[H].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);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[y]&&""==b[H].style[y])try{if(q=b[H].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=+Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],H=0;H<q.length;H++)C.push({node:q[H],value:q[H].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<C.length&&C[H].node==b[H]&&C[H].value!=b[H].style[y]&&""==b[H].style[y])try{if(q=b[H].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]="";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(E){}if(l&&b[H].getAttribute("color")==u||b[H].style[y]==u){l&&b[H].getAttribute("color")==u&&b[H].removeAttribute("color");b[H].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[H].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(E){}if(l&&mxClient.IS_FF){f=b[H];l=f.firstChild;if(null!=l&&"A"==l.nodeName&&null==l.nextSibling&&null!=l.firstChild){f.parentNode.insertBefore(l,f);for(u=l.firstChild;null!=u;)y=u.nextSibling,f.appendChild(u),u=y;l.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=b.charCodeAt(l);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=String.fromCharCode(b[l]);return f.join("")};Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,l){return String.fromCharCode(parseInt(l,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};@@ -2332,7 +2332,7 @@ Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var l=b.bGraph.arrayBufferIndexOfString=function(b,f,l){var u=f.charCodeAt(0),y=1,q=-1;for(l=l||0;l<b.byteLength;l++)if(b[l]==u){q=l;break}for(l=q+1;-1<q&&l<b.byteLength&&l<q+f.length-1;l++){if(b[l]!=f.charCodeAt(y))return Graph.arrayBufferIndexOfString(b,f,q+1);y++}return y==f.length-1?q:-1};Graph.compress=function(b,f){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=f?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,f,l){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));f=decodeURIComponent(f?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return l?f:Graph.zapGremlins(f)};Graph.fadeNodes=function(b,f,l,u,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,f);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+y+"ms ease-in-out");Graph.setOpacityForNodes(b,l);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=u&&u()},y)},0)};-Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function B(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=+Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function C(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=l&&null!=l.pageSize?l.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=u.model.getCell(x.sourceCellId),I=u.getEdges(F,null,!0,!0,!1,!0),M=[],L=0;L<I.length;L++)null!=I[L].getTerminal(!0)&&null!=I[L].getTerminal(!1)&&u.isCellVisible(I[L])&&!u.isEdgeIgnored(I[L])&&u.isCellVisible(I[L].getTerminal(!0))&&u.isCellVisible(I[L].getTerminal(!1))&&u.isCellVisible(u.getLayerForCell(I[L]))&&M.push(I[L]);M=I=M;if(null!=g.startIndex||0<pageSize&&I.length>pageSize){var K=g.startIndex||0;M=I.slice(Math.max(0,K),Math.min(I.length,K+pageSize))}M=u.getOpposites(M,F).concat(M);var aa=c.cloneCells(M);for(L=0;L<M.length;L++)if(aa[L].sourceCellId=M[L].id,c.model.isEdge(aa[L]))for(aa[L].geometry.x=0,aa[L].geometry.y=0,aa[L].geometry.points=null,aa[L].setStyle(aa[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),aa[L].setTerminal(x,null==aa[L].getTerminal(!0)),F=0;F<aa[L].getChildCount();F++){var ja=aa[L].getChildAt(F);null!=ja.geometry&&ja.geometry.relative&&(ja.setStyle(ja.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ja.geometry.offset=new mxPoint(0,0),ja.geometry.y=0,ja.geometry.x=.5>ja.geometry.x?-.8:.5<ja.geometry.x?.8:0)}if(0<g.startIndex){var ca=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(I.length/pageSize)+")",@@ -2341,49 +2341,49 @@ c.getModel().getCell(oa);Y!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,Y)&&2,da.y=n-da.height/2));var ha=g.length,Z=2*Math.PI/ha,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ha;m++)da=c.getModel().getGeometry(g[m]),null!=da&&(da=da.clone(),da.x+=k*Math.sin(m*Z),da.y+=k*Math.cos(m*Z),c.getModel().setGeometry(g[m],da))}finally{c.getModel().endUpdate()}}}var H=document.createElement("div");H.style.position="absolute";H.style.display="block";H.style.overflow="auto";H.style.width="100%";H.style.height="100%";H.style.left="0px";H.style.top="0px";H.style.zIndex=2;H.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";H.appendChild(S);var E=document.createElement("div");E.style.position="absolute";E.style.cursor="pointer";E.style.right="38px";E.style.top="14px";E.style.textAlign="right";E.style.verticalAlign="top";mxUtils.write(E,mxResources.get("close"));H.appendChild(E);document.body.appendChild(H);var Q=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",Q);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,-"keydown",Q);c.parentNode.removeChild(c);u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(E,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?B(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-+"keydown",Q);c.parentNode.removeChild(c);u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(E,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var I=!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){I||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,I=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var aa=K.layout;K.layout=function(ja){K.spacing=Math.min(60,Math.max(30,60-5*ja.length));aa.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();-g.refresh();q(g);I=!1}))});B(g,F)})(H)})(b,f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};+g.refresh();q(g);I=!1}))});C(g,F)})(H)})(b,f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=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 u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(u=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,u.outerHTML))}b=l}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var f=document.createElement("a");f.setAttribute("href",b);Graph.sanitizeNode(f);return f.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,f){window.DOM_PURIFY_CONFIG.IN_PLACE=f;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),B=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length--1)?parseFloat(q):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=y[0].getAttribute("viewBox");if(null!=H&&!isNaN(q)&&!isNaN(B)){var S=H.split(" ");4<=H.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var E=y[0].getBBox();if(0<E.width&&0<E.height){q=0;var Q=y[0].querySelectorAll("[stroke-width]");for(B=0;B<Q.length;B++)q=Math.max(q,parseFloat(Q[B].getAttribute("stroke-width")));E=new mxRectangle(E.x,+Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),C=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-+1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var H=y[0].getAttribute("viewBox");if(null!=H&&!isNaN(q)&&!isNaN(C)){var S=H.split(" ");4<=H.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/C,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var E=y[0].getBBox();if(0<E.width&&0<E.height){q=0;var Q=y[0].querySelectorAll("[stroke-width]");for(C=0;C<Q.length;C++)q=Math.max(q,parseFloat(Q[C].getAttribute("stroke-width")));E=new mxRectangle(E.x,E.y,E.width,E.height);E.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",E.x+" "+E.y+" "+E.width+" "+E.height);f.getElementsByTagName("svg")[0].setAttribute("width",E.width/l);f.getElementsByTagName("svg")[0].setAttribute("height",E.height/u)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};Graph.createRemoveIcon=function(b,f){var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.clearImage);l.setAttribute("title",b);l.setAttribute("width","13");l.setAttribute("height","10");l.style.marginLeft="4px";l.style.marginBottom="-1px";l.style.cursor="pointer";mxEvent.addListener(l,"click",f);return l};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};-Graph.rewritePageLinks=function(b,f){function l(y,q){var B=y.getAttribute(q);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=q;f&&"xlink:href"==q&&(y.removeAttribute(q),H="href");y.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"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,f){function l(y,q){var C=y.getAttribute(q);if(null!=C){Graph.isPageLink(C)&&(C="#"+C.substring(C.indexOf(":")+1));var H=q;f&&"xlink:href"==q&&(y.removeAttribute(q),H="href");y.setAttribute(H,C)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"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, #000000)";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(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,B=null,H=mxUtils.bind(this,function(Q){q=!0;B=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q))}),S=mxUtils.bind(this,function(Q){q=q&&null!=B&&Math.abs(B.x-mxEvent.getClientX(Q))<y&&Math.abs(B.y-mxEvent.getClientY(Q))<y}),E=mxUtils.bind(this,function(Q){if(q)for(var c=mxEvent.getSource(Q);null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,H=mxUtils.bind(this,function(Q){q=!0;C=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q))}),S=mxUtils.bind(this,function(Q){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(Q))<y&&Math.abs(C.y-mxEvent.getClientY(Q))<y}),E=mxUtils.bind(this,function(Q){if(q)for(var c=mxEvent.getSource(Q);null!=c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,Q);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,H,S,E);mxEvent.addListener(u.node,"click",function(Q){mxEvent.consume(Q)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=u&&this.graph.isCustomLink(u)&&(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&this.graph.customLinkClicked(u)&&mxEvent.consume(l))}))}}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(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==H||"pipe"==H||"wire"==H||"filledEdge"==H||"flexArrow"==H||"mxgraph.arrows2.wedgeArrow"==-H)};Graph.prototype.isGradientState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(B)&&"wire"!=H&&"pipe"!=H};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=H?"color":"background-color",E=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,S);null==E&&null!=B&&B!=this.cellEditor.textarea.parentNode;)E=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,S),B=B.parentNode;-if("rgba(0, 0, 0, 0)"==E||"transparent"==E)E=mxConstants.NONE;return E};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(E){return B&&S.isVertex(E)||H&&S.isEdge(E)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var E=JSON.parse(B),Q;for(Q in E)this.setCellStyles(Q,E[Q],H),"edgeStyle"==-Q&&"elbowEdgeStyle"==E[Q]&&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 E=this.view.getState(B[S]);null!=E&&this.mergeStyle(E.style,H,0==S)}return H};Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var E={},Q;for(Q in B){var c=B[Q];null!=c&&(E[Q]=!0,null==H[Q]&&S?H[Q]=c:H[Q]!=c&&delete H[Q])}for(Q in H)E[Q]||-delete H[Q]}};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,E){null!=B&&(E||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(Q){return 0>mxUtils.indexOf(S,Q)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,S,E,Q,c,g){var m=!1,n=!1;if(0<B.length)for(var x=0;x<B.length&&(m=this.getModel().isVertex(B[x])||m,!(n=this.getModel().isEdge(B[x])||-n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<H.length;x++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[x]),"strokeColor"!=H[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,H[x])||"shape"==H[x])if("shape"!=H[x]&&(m||B)&&(null==S[x]?delete E[H[x]]:E[H[x]]=S[x]),n||B)null==S[x]?delete Q[H[x]]:Q[H[x]]=S[x]};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,E,Q){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;Q=null!=Q?Q:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<B.length;c++){var g=B[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!E)for(var F=null!=m?m.split(";"):[],I=0;I<F.length;I++){var M=F[I],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),aa=mxUtils.indexOf(x,K);0<=aa&&x.splice(aa,+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(C){var H=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(C.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(C.style,"lineShape",null)&&(this.model.isVertex(C.cell)||"arrow"==H||"pipe"==H||"wire"==H||"filledEdge"==H||"flexArrow"==H||"mxgraph.arrows2.wedgeArrow"==+H)};Graph.prototype.isGradientState=function(C){var H=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=H&&"pipe"!=H};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,H){for(var S=H?"color":"background-color",E=C==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(C,S);null==E&&null!=C&&C!=this.cellEditor.textarea.parentNode;)E=C==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(C,S),C=C.parentNode;+if("rgba(0, 0, 0, 0)"==E||"transparent"==E)E=mxConstants.NONE;return E};Graph.prototype.isSpecialColor=function(C){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],C)};Graph.prototype.isGlassState=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return"label"==C||"rectangle"==C||"internalStorage"==C||"ext"==C||"umlLifeline"==C||"swimlane"==C||"process"==C};Graph.prototype.isRoundedState=function(C){return null!=+C.shape?C.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(C){var H=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(C.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==H)};Graph.prototype.isAutoSizeState=function(C){return"1"==mxUtils.getValue(C.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(C){return null!=+mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,H){C=null!=C?C:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(E){return C&&S.isVertex(E)||H&&S.isEdge(E)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,H,S){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var E=JSON.parse(C),Q;for(Q in E)this.setCellStyles(Q,E[Q],H),"edgeStyle"==+Q&&"elbowEdgeStyle"==E[Q]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var H={},S=0;S<C.length;S++){var E=this.view.getState(C[S]);null!=E&&this.mergeStyle(E.style,H,0==S)}return H};Graph.prototype.mergeStyle=function(C,H,S){if(null!=C){var E={},Q;for(Q in C){var c=C[Q];null!=c&&(E[Q]=!0,null==H[Q]&&S?H[Q]=c:H[Q]!=c&&delete H[Q])}for(Q in H)E[Q]||+delete H[Q]}};Graph.prototype.getStartEditingCell=function(C,H){H=this.getCellStyle(C);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==H)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),H=this.getCellStyle(C),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==H)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(H=0;H<this.model.getChildCount(C);H++){var S=+this.model.getChildAt(C,H);if(this.isCellEditable(S)){C=S;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,H,S,E){null!=C&&(E||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(C,function(Q){return 0>mxUtils.indexOf(S,Q)})),this.updateCellStyles(C,H))};Graph.prototype.copyCellStyles=function(C,H,S,E,Q,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||+n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<H.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,H[x]),"strokeColor"!=H[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,H[x])||"shape"==H[x])if("shape"!=H[x]&&(m||C)&&(null==S[x]?delete E[H[x]]:E[H[x]]=S[x]),n||C)null==S[x]?delete Q[H[x]]:Q[H[x]]=S[x]};Graph.prototype.includeDescendants=function(C){for(var H=[],S=0;S<C.length;S++)H=H.concat(this.model.getDescendants(C[S]));return H};Graph.prototype.pasteCellStyles=function(C,+H,S,E,Q){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;Q=null!=Q?Q:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!E)for(var F=null!=m?m.split(";"):[],I=0;I<F.length;I++){var M=F[I],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),aa=mxUtils.indexOf(x,K);0<=aa&&x.splice(aa,1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ja=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ja,K))for(var ca=0;ca<ja.length;ca++){var ba=mxUtils.indexOf(x,ja[ca]);0<=ba&&x.splice(ba,1)}}}}var oa=this.model.isEdge(g);n=oa?S:H;for(I=0;I<x.length;I++){K=x[I];var Y=n[K];null!=Y&&("edgeStyle"!=K||Q)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,Y),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==Y&&null==n.curved&&-(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}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 E=this.getCellStyle(H[S],!1),Q=E[mxConstants.STYLE_PERIMETER],c=!1;for(m in B){var g=B[m];if(E[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==+(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,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 E=this.getCellStyle(H[S],!1),Q=E[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(E[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==E[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[H[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,Q,[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,E,Q,c){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,E,Q,c){E=null!=E?E:!0;Q=null!=Q?Q:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(B,H,m,E,Q,-c);if(null!=n)return n;if(this.isCellVisible(m)&&(Q&&this.model.isEdge(m)||E&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,B,H))&&this.intersects(n,B,H)))return m}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=[],E=0;E<B.length;E++){var Q=this.getCompositeParent(B[E]);this.isTableCell(Q)&&(Q=this.graph.model.getParent(Q));this.isTableRow(Q)&&(Q=this.graph.model.getParent(Q));-null==Q||H.get(Q)||(H.put(Q,!0),S.push(Q))}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=[],E=0;E<H.length;E++)B(H[E])||S.push(H[E]);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 f=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);f.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 l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(B){B=l.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 u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=u.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 y=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);y.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var E=this.useCssTransforms,Q=this.view.scale,c=this.view.translate;E&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);E&&(this.view.scale=+Graph.prototype.getCellAt=function(C,H,S,E,Q,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,H,S,E,Q,c){E=null!=E?E:!0;Q=null!=Q?Q:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(C,H,m,E,Q,+c);if(null!=n)return n;if(this.isCellVisible(m)&&(Q&&this.model.isEdge(m)||E&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,C,H))&&this.intersects(n,C,H)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(C){return!this.isSwimlane(C.cell)&&0<this.model.getChildCount(C.cell)&&!this.isCellCollapsed(C.cell)&&"1"==mxUtils.getValue(C.style,"recursiveResize","1")&&null==mxUtils.getValue(C.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(C){for(var H=+this.getCellGeometry(C);null!=H&&H.relative;)C=this.getModel().getParent(C),H=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var H=new mxDictionary,S=[],E=0;E<C.length;E++){var Q=this.getCompositeParent(C[E]);this.isTableCell(Q)&&(Q=this.graph.model.getParent(Q));this.isTableRow(Q)&&(Q=this.graph.model.getParent(Q));+null==Q||H.get(Q)||(H.put(Q,!0),S.push(Q))}return S};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var H=this.getCellGeometry(C);null!=H&&H.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var H=this.model.getParent(C);if(!this.model.isVertex(H))break;C=H}return C};Graph.prototype.filterSelectionCells=function(C){var H=+this.getSelectionCells();if(null!=C){for(var S=[],E=0;E<H.length;E++)C(H[E])||S.push(H[E]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;C=new mxRectangle((C.x+2*S.x)*H-S.x,(C.y+2*S.y)*H-S.y,C.width*H,C.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);+return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,S=this.graph.currentScale;C=new mxRectangle((C.x+H.x)*S,(C.y+H.y)*S,C.width*S,C.height*S)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){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);f.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 l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var H=[],S=+0;S<C.length;S++)this.isTableRow(C[S])||this.isTableCell(C[S])||H.push(C[S]);return H};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var H=[],S=0;S<C.length;S++)this.isTable(C[S])||this.isTableRow(C[S])||this.isTableCell(C[S])||H.push(C[S]);return H};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var H=C.getAttribute("transform");C.setAttribute("transformOrigin",+"0 0");var S=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=+function(){var C=this.graph.useCssTransforms,H=this.scale,S=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=H,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,H,S){var E=this.useCssTransforms,Q=this.view.scale,c=this.view.translate;E&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);E&&(this.view.scale=Q,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,f,l){var u=f.getAttribute("href");u!=Graph.sanitizeLink(u)&&Graph.sanitizeNode(f);if(null!=u&&!this.isCustomLink(u)&&(mxEvent.isLeftMouseButton(l)&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(u)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(u),b);mxEvent.consume(l)}};Graph.prototype.openLink=function(b,f,l){var u=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)u=window.open(b,null!=f?f:"_blank",l?null:"noopener,noreferrer"),null==u||l||(u.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return u};@@ -2396,13 +2396,13 @@ b.childLayout)return f=new mxCompactTreeLayout(this.graph),f.horizontal="1"==mxUf.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),f;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(u){null!=window.console&&console.error(u)}}return null}};Graph.prototype.createLayouts=function(b){for(var f=[],l=0;l<b.length;l++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[l].layout)){var u="mxOrgChartLayout"==b[l].layout&&null!=b[l].config?new window[b[l].layout](this,b[l].config.branchOptimizer):new window[b[l].layout](this);if(null!=b[l].config)for(var y in b[l].config)if("mxOrgChartLayout"!=b[l].layout||"branchOptimizer"!=y)u[y]=b[l].config[y];f.push(u)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[l].layout]));return f};-Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var B=0;B<q.length;B++)y[q[B].nodeName]=q[B].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};+Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var C=0;C<q.length;C++)y[q[C].nodeName]=q[C].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};Graph.prototype.getNodesForCells=function(b){for(var f=[],l=0;l<b.length;l++){var u=this.view.getState(b[l]);if(null!=u){for(var y=this.cellRenderer.getShapesForState(u),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=u.control&&null!=u.control.node&&f.push(u.control.node)}}return f};Graph.prototype.createWipeAnimations=function(b,f){for(var l=[],u=0;u<b.length;u++){var y=this.view.getState(b[u]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?l.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&l.push(this.createVertexWipeAnimation(y,f)))}return l};-Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[l[0]];H=B/H;f||(H=1-H);for(var E=y*H,Q=1;Q<q;Q++)if(E<=u[Q-1]){S.push(new mxPoint(l[Q-1].x+(l[Q].x-l[Q-1].x)*E/u[Q-1],l[Q-1].y+(l[Q].y-l[Q-1].y)*E/u[Q-1]));break}else E-=u[Q-1],S.push(l[Q]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,H){if(null!=b.shape){var S=[l[0]];H=C/H;f||(H=1-H);for(var E=y*H,Q=1;Q<q;Q++)if(E<=u[Q-1]){S.push(new mxPoint(l[Q-1].x+(l[Q].x-l[Q-1].x)*E/u[Q-1],l[Q-1].y+(l[Q].y-l[Q-1].y)*E/u[Q-1]));break}else E-=u[Q-1],S.push(l[Q]);b.shape.points=S;b.shape.redraw();0==C&&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=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.createVertexWipeAnimation=function(b,f){var l=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(u,y){null!=b.shape&&(y=u/y,f||(y=1-y),b.shape.bounds=new mxRectangle(l.x,l.y,l.width*y,l.height),b.shape.redraw(),0==u&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,B=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var H=0;H<b.length;H++)b[H].stop();null!=f&&f()}else for(H=0;H<b.length;H++)b[H].execute(q,l);q++});y=window.setInterval(B,u);B()};+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,C=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var H=0;H<b.length;H++)b[H].stop();null!=f&&f()}else for(H=0;H<b.length;H++)b[H].execute(q,l);q++});y=window.setInterval(C,u);C()};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,f,l){b=null!=b?b:this.getGraphBounds();f=null!=f?f:this.view.translate;l=null!=l?l:this.view.scale;var u=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var y=Math.floor(Math.ceil(b.x/l-f.x)/u.width),q=Math.floor(Math.ceil(b.y/l-f.y)/u.height);return new mxRectangle(y,q,Math.ceil((Math.floor((b.x+b.width)/l)-f.x)/u.width)-y,Math.ceil((Math.floor((b.y+b.height)/l)-f.y)/u.height)-q)};Graph.prototype.getDefaultTranslate=function(b){var f=this.getPagePadding(),l=this.getPageSize();return new mxPoint(f.x-b.x*l.width,f.y-b.y*l.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),f=this.getPagePadding(),l=this.getPageSize(),u=Math.ceil(2*f.x+b.width*l.width);b=Math.ceil(2*f.y+b.height*l.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=u||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,u,b)};@@ -2413,32 +2413,32 @@ Graph.prototype.isSplitTarget=function(b,f,l){return!this.model.isEdge(f[0])&&!mGraph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(f,"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 f=this.getLinkForCell(b);if(null!=f)return f;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var f=null;"date"==b?f=(new Date).toLocaleDateString():"time"==b?f=(new Date).toLocaleTimeString():"timestamp"==b?f=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),f=this.formatDate(new Date,b));return f};Graph.prototype.formatDate=function(b,f,l){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 u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,B=function(I,M){I=String(I);for(M=M||2;I.length<M;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var H=l?"getUTC":"get",S=b[H+"Date"](),E=b[H+"Day"](),Q=b[H+"Month"](),c=b[H+"FullYear"](),g=b[H+"Hours"](),m=b[H+"Minutes"](),n=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:B(S),ddd:u.i18n.dayNames[E],dddd:u.i18n.dayNames[E+7],m:Q+1,mm:B(Q+1),mmm:u.i18n.monthNames[Q],mmmm:u.i18n.monthNames[Q+-12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:B(g%12||12),H:g,HH:B(g),M:m,MM:B(m),s:n,ss:B(n),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+B(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in F?F[I]:I.slice(1,+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 u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,C=function(I,M){I=String(I);for(M=M||2;I.length<M;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||+/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var H=l?"getUTC":"get",S=b[H+"Date"](),E=b[H+"Day"](),Q=b[H+"Month"](),c=b[H+"FullYear"](),g=b[H+"Hours"](),m=b[H+"Minutes"](),n=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:C(S),ddd:u.i18n.dayNames[E],dddd:u.i18n.dayNames[E+7],m:Q+1,mm:C(Q+1),mmm:u.i18n.monthNames[Q],mmmm:u.i18n.monthNames[Q++12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(H,3),L:C(99<H?Math.round(H/10):H),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in F?F[I]:I.slice(1,I.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 f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var l=1;l<b.length;l++)if(!this.model.isAncestor(f,b[l])){f=null;break}}return f};-Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(B){function H(){u.isVisible(B)?(Q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(E,75)):(Q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(E,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",E=document.createElement("div");E.style.overflow=-"hidden";E.style.textOverflow="ellipsis";E.style.padding="2px";E.style.whiteSpace="nowrap";E.style.cursor="pointer";E.setAttribute("title",mxResources.get(u.isVisible(B)?"hideIt":"show",[S]));var Q=document.createElement("img");Q.setAttribute("draggable","false");Q.setAttribute("align","absmiddle");Q.setAttribute("border","0");Q.style.position="relative";Q.style.width="16px";Q.style.padding="0px 6px 0 4px";f&&(Q.style.filter="invert(100%)",Q.style.top="-2px");E.appendChild(Q);mxUtils.write(E,S);l.appendChild(E);-mxEvent.addListener(E,"click",function(){u.setVisible(B,!u.isVisible(B));H();null!=b&&b(B)});H()})(u.getChildAt(u.root,q));return l};-Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var B=null;if(match.index>y&&"%"==f.charAt(match.index-1))B=q.substring(1);else{var H=q.substring(1,q.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 E=this.getCellGeometry(b);-null!=E&&(B=E.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))E=this.getCellGeometry(b),null!=E&&(B=E.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(E=b;null!=E&&!this.model.isEdge(E);)E=this.model.getParent(E);E=this.view.getState(E);null!=E&&(B=Math.round(E.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!=l&&(B=l[H])}u.push(f.substring(y,match.index)+(null!=B?B:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};+Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function H(){u.isVisible(C)?(Q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(E,75)):(Q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(E,25))}var S=this.convertValueToString(C)||mxResources.get("background")||"Background",E=document.createElement("div");E.style.overflow=+"hidden";E.style.textOverflow="ellipsis";E.style.padding="2px";E.style.whiteSpace="nowrap";E.style.cursor="pointer";E.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[S]));var Q=document.createElement("img");Q.setAttribute("draggable","false");Q.setAttribute("align","absmiddle");Q.setAttribute("border","0");Q.style.position="relative";Q.style.width="16px";Q.style.padding="0px 6px 0 4px";f&&(Q.style.filter="invert(100%)",Q.style.top="-2px");E.appendChild(Q);mxUtils.write(E,S);l.appendChild(E);+mxEvent.addListener(E,"click",function(){u.setVisible(C,!u.isVisible(C));H();null!=b&&b(C)});H()})(u.getChildAt(u.root,q));return l};+Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var H=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)C=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var E=this.getCellGeometry(b);+null!=E&&(C=E.width,5<H.length&&(C=Editor.toUnit(C,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))E=this.getCellGeometry(b),null!=E&&(C=E.height,6<H.length&&(C=Editor.toUnit(C,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(E=b;null!=E&&!this.model.isEdge(E);)E=this.model.getParent(E);E=this.view.getState(E);null!=E&&(C=Math.round(E.length/this.view.scale),6<H.length&&(C=Editor.toUnit(C,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==C&&null!=+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==C&&(C=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==C&&(C=this.getGlobalVariable(H));null==C&&null!=l&&(C=l[H])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],l=0;l<b.length;l++){var u=this.model.getCell(b[l].id);null!=u&&f.push(u)}this.setSelectionCells(f)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};-Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var B=q.getIndex(f),H=y.getIndex(q);q=Math.max(u,H);f=Math.min(b,B);b=Math.max(b,B);B=[];for(u=Math.min(u,H);u<=q;u++){H=this.model.getChildAt(y,u);for(var S=f;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),l=!0)}}return l};+Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),H=y.getIndex(q);q=Math.max(u,H);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,H);u<=q;u++){H=this.model.getChildAt(y,u);for(var S=f;S<=b;S++)C.push(this.model.getChildAt(H,S))}0<C.length&&(1<C.length||1<this.getSelectionCount()||+!this.isCellSelected(C[0]))&&(this.setSelectionCells(C),l=!0)}}return l};Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var l=0;l<b.length;l++){var u=b[l],y=this.getCellGeometry(u);if(null!=y){y=y.clone();if(this.getModel().isVertex(u))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(u)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(u,y)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var f=this.model.getChildCount(b);0<=f;f--)this.model.remove(this.model.getChildAt(b,f))}finally{this.model.endUpdate()}};Graph.prototype.updateShapes=function(b,f,l){this.model.beginUpdate();try{var u=this.model.getStyle(b),y=l?this.stylesheet.getCellStyle(u,{},!1):null;null!=y&&null==y[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var q=0;q<f.length;q++){if(this.model.isVertex(b)&&this.model.isVertex(f[q])||-this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var B=this.model.getStyle(f[q]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(f[q],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};+this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var C=this.model.getStyle(f[q]);if(null!=C){var H=C.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(f[q],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,f,l){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=l&&(mxEvent.isTouchEvent(f)?l.update(l.getState(this.view.getState(b[1]))):l.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var l=f;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=b.parent;)l=this.model.getParent(l);null!=l&&null!=l.parent&&l.parent==b.parent&&(f=l.parent.getIndex(l),this.model.add(l.parent,b,f))};-Graph.prototype.connectVertex=function(b,f,l,u,y,q,B,H){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),E=S?b:this.getCompositeParent(b),Q=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(E.geometry.x,E.geometry.y);f==mxConstants.DIRECTION_NORTH?(Q.x+=E.geometry.width/2,Q.y-=l):f==+Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,H){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),E=S?b:this.getCompositeParent(b),Q=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(E.geometry.x,E.geometry.y);f==mxConstants.DIRECTION_NORTH?(Q.x+=E.geometry.width/2,Q.y-=l):f==mxConstants.DIRECTION_SOUTH?(Q.x+=E.geometry.width/2,Q.y+=E.geometry.height+l):(Q.x=f==mxConstants.DIRECTION_WEST?Q.x-l:Q.x+(E.geometry.width+l),Q.y+=E.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;E=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(E=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(Q.x+=b.parent.geometry.x,Q.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(E+Q.x*l,g+Q.y*l)).grow(40*l);q=null!=q?this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var I=-!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;I&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?Q.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=b.geometry.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-b.geometry.width/2:Q.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==B||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&I){var aa=this.getAbsoluteParent(null!=K?K:b);aa=S?b:this.getCompositeParent(aa);L=null!=K?K:this.duplicateCells([aa],+!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;I&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?Q.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=b.geometry.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-b.geometry.width/2:Q.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&I){var aa=this.getAbsoluteParent(null!=K?K:b);aa=S?b:this.getCompositeParent(aa);L=null!=K?K:this.duplicateCells([aa],!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ja=this.getCellGeometry(L);null!=ja&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?Q.y-=ja.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=ja.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-ja.width/2:Q.x+ja.width/2),ja.x=Q.x-ja.width/2,ja.y=Q.y-ja.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):I&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&mxEvent.isShiftDown(u)&&I||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(Q,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==B||null!=L||!I||null==n&&S)return y(L);B(E+Q.x*l,g+Q.y*l,y)};+"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==C||null!=L||!I||null==n&&S)return y(L);C(E+Q.x*l,g+Q.y*l,y)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),null==l&&(l=f.getAttribute("label")||"");return l||""}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,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2450,10 +2450,10 @@ Graph.prototype.getDefaultColor=function(b,f,l){f="default"+f.charAt(0).toUpperCGraph.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,f,l){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var u=this.layoutManager.getLayout(this.model.getParent(b));null!=u&&u.constructor==mxStackLayout&&(u.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var l=!0,u=0;u<b.length&&l;u++)l=l&&this.model.isEdge(b[u]);u=null;if(1==b.length&&l){var y=this.getCellGeometry(b[0]);null!=y&&(u=y.getTerminalPoint(!0))}u=null!=u?u:this.getBoundingBoxFromGeometry(b,l);null!=u&&(l=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,l-u.x,f-u.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var B=this.view.getState(l[q]),H=this.getCellGeometry(l[q]);if(null!=B&&null!=H){var S=0,E=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,E=H.height-H.alternateBounds.height;else{var Q=this.useCssTransforms?1:this.view.scale;-S=Math.round(H.width-B.width/Q);E=Math.round(H.height-B.height/Q)}if(0!=E||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,B)&&this.moveSiblings(B,c,S,E):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,E)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};-Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),B=this.getCellGeometry(y[f]);null!=q&&null!=B&&(B=B.clone(),B.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],B))}}finally{this.model.endUpdate()}};-Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,B.width/this.view.scale-q.width):q.height+=u+Math.min(0,B.height/this.view.scale-q.height),this.model.setGeometry(b,+Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),H=this.getCellGeometry(l[q]);if(null!=C&&null!=H){var S=0,E=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,E=H.height-H.alternateBounds.height;else{var Q=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-C.width/Q);E=Math.round(H.height-C.height/Q)}if(0!=E||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,S,E):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,E)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};+Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),C=this.getCellGeometry(y[f]);null!=q&&null!=C&&(C=C.clone(),C.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],C))}}finally{this.model.endUpdate()}};+Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),C=this.view.getState(b);null!=C&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,C.width/this.view.scale-q.width):q.height+=u+Math.min(0,C.height/this.view.scale-q.height),this.model.setGeometry(b,q));b=this.model.getParent(b);f=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var f=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=f.container:"1"==f.container};Graph.prototype.isCellConnectable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=f.connectable?"0"!=f.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return null!=f.movableLabel?"0"!=f.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,f,l){l=l||this.getDefaultParent();this.isCellLocked(l)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(b,f,l){var u=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(u)&&(u=null);return u};Graph.prototype.isCellFoldable=function(b){var f=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&("1"==f.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=f.collapsible||!this.isContainer(b)&&"1"==f.collapsible))};@@ -2463,10 +2463,10 @@ Graph.prototype.fitPages=function(b,f){var l=1;null==b&&(l=this.getPageLayout(),this.view.scale,(this.container.scrollHeight-this.container.clientHeight)/2)))};Graph.prototype.fitWindow=function(b,f){f=null!=f?f:10;var l=this.container.clientWidth-f,u=this.container.clientHeight-f;this.zoomTo(Math.floor(20*Math.min(l/b.width,u/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var y=this.view.translate;this.container.scrollLeft=(b.x+y.x)*this.view.scale-Math.max((l-b.width*this.view.scale)/2+f/2,0);this.container.scrollTop=(b.y+y.y)*this.view.scale-Math.max((u-b.height*this.view.scale)/2+f/2,0)}),0)};Graph.prototype.convertValueToTooltip=function(b){var f=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==f&&(f=b.value.getAttribute("tooltip")),null!=f&&(null!=f&&this.isReplacePlaceholders(b)&&(f=this.replacePlaceholders(b,f)),f=Graph.sanitizeHtml(f)));return f};-Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var l=this.builtInProperties;b=b.value.attributes;var u=[];f="";this.isEnabled()&&(l.push("linkTarget"),l.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(l,b[y].nodeName))&&0<b[y].nodeValue.length&&u.push({name:b[y].nodeName,value:b[y].nodeValue});u.sort(function(q,B){return q.name<B.name?-1:q.name>B.name?1:0});for(y=+Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var l=this.builtInProperties;b=b.value.attributes;var u=[];f="";this.isEnabled()&&(l.push("linkTarget"),l.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(l,b[y].nodeName))&&0<b[y].nodeValue.length&&u.push({name:b[y].nodeName,value:b[y].nodeValue});u.sort(function(q,C){return q.name<C.name?-1:q.name>C.name?1:0});for(y=0;y<u.length;y++)"link"==u[y].name&&this.isCustomLink(u[y].value)||(f+=("link"!=u[y].name?"<b>"+mxUtils.htmlEntities(u[y].name)+":</b> ":"")+mxUtils.htmlEntities(u[y].value)+"\n");0<f.length&&(f=f.substring(0,f.length-1),mxClient.IS_SVG&&(f='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+f+"</div>"))}return f};-Graph.prototype.addFlowAnimationToNode=function(b,f,l,u){if(null!=b&&null!=u){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var B=0;B<q.length;B++)q[B]=Math.round(Number(q[B])*l*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<-q.length){for(B=y=0;B<q.length;B++){var H=parseFloat(q[B]);isNaN(H)||(y+=parseFloat(q[B]))}0!=q.length%2&&(y*=2);l=Math.round(y/l/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=u+" "+l+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};+Graph.prototype.addFlowAnimationToNode=function(b,f,l,u){if(null!=b&&null!=u){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var C=0;C<q.length;C++)q[C]=Math.round(Number(q[C])*l*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<+q.length){for(C=y=0;C<q.length;C++){var H=parseFloat(q[C]);isNaN(H)||(y+=parseFloat(q[C]))}0!=q.length%2&&(y*=2);l=Math.round(y/l/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=u+" "+l+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var f=document.createElement("style");f.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(f)}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,f){return Graph.compress(b,f)};Graph.prototype.decompress=function(b,f){return Graph.decompress(b,f)};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";HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');@@ -2494,8 +2494,8 @@ HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentStatvar f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var l=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(H,S,E){if(null!=l){var Q=new mxRectangle(S,E,H.clientWidth,H.clientHeight);mxUtils.intersects(Q,l)&&(H==this.arrowUp?E-=Q.y+Q.height-l.y:H==this.arrowRight?S+=l.x+l.width-Q.x:H==this.arrowDown?E+=l.y+l.height-Q.y:H==this.arrowLeft&&(S-=Q.x+Q.width-l.x))}H.style.left=S+"px";H.style.top=E+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-this.triangleUp.height-this.tolerance));f(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));f(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));f(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){f=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());-var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=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!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var E=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,-this.currentState.cell)||this.graph.isSwimlane(H)||!(null==E||null==q||E.height<3*q.height&&E.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(f,this.arrowRight);B(u,this.arrowLeft);B(y,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")),+var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=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!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(H,S){var E=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,+this.currentState.cell)||this.graph.isSwimlane(H)||!(null==E||null==q||E.height<3*q.height&&E.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(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(f){null!=f.parentNode&&(f=new mxRectangle(f.offsetLeft,f.offsetTop,f.offsetWidth,f.offsetHeight),null==b?b=f:b.add(f))});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 f=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(b=f)}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};@@ -2504,29 +2504,29 @@ window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMoub||null==this.bbox||null==f||null==l||!mxUtils.contains(this.bbox,f,l))&&(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,f){var l=this.getCurrentCellStyle(b),u=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(l,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(l,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);u=!0}f&&(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 u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var B=this.cloneCell(f),H=this.getCellGeometry(B);null!=H&&(H.x+=q*u,H.y+=q*y);b.insert(B)}return b};-Graph.prototype.createTable=function(b,f,l,u,y,q,B,H,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q: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!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=B?B:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,H),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};-Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),B=0;B<q.length;B++)null!=f[y][B]&&(q[B].value=f[y][B]);return b};-Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,B,H,S){l=null!=l?l:120;u=null!=u?u: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;";+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 u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var C=this.cloneCell(f),H=this.getCellGeometry(C);null!=H&&(H.x+=q*u,H.y+=q*y);b.insert(C)}return b};+Graph.prototype.createTable=function(b,f,l,u,y,q,C,H,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q: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!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,H),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};+Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),C=0;C<q.length;C++)null!=f[y][C]&&(q[C].value=f[y][C]);return b};+Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,H,S){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"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;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=-q;B=this.createVertex(null,null,"",0,q,f*l+q,u,B);y.insert(this.createParent(B,this.createVertex(null,null,"",q,0,l,u,H),f,l,0));return 1<b?(B.geometry.y=u+q,this.createParent(y,this.createParent(B,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};-Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),B=this.model.getChildCells(u[y],!0),H=this.getCellStyle(u[y],!0),S=null,E=[],Q=0;Q<B.length;Q++){var c=this.getCellGeometry(B[Q]),g={cell:B[Q],rospan:1,colspan:1,row:y,col:Q,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=-l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[Q]&&1<l[Q].rowspan?(g.rowspan=l[Q].rowspan-1,g.colspan=l[Q].colspan,g.actual=l[Q].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(B[Q],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.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;f(g,B.length,-u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));E.push(g);S=g}l=E}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,B,H,S,E){f&&q.row<H-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<B-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,E)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};+q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,H),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};+Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),H=this.getCellStyle(u[y],!0),S=null,E=[],Q=0;Q<C.length;Q++){var c=this.getCellGeometry(C[Q]),g={cell:C[Q],rospan:1,colspan:1,row:y,col:Q,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=+l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[Q]&&1<l[Q].rowspan?(g.rowspan=l[Q].rowspan-1,g.colspan=l[Q].colspan,g.actual=l[Q].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(C[Q],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.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;f(g,C.length,+u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));E.push(g);S=g}l=E}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,H,S,E){f&&q.row<H-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,E)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};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,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),B=u.getChildCells(q,!0);if(!l){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],E=this.getCellGeometry(S);null!=E&&(E=E.clone(),E.y+=f,E.height-=f,u.setGeometry(S,E))}}var Q=this.getCellGeometry(q);null!=Q&&(l||(l=b==B[B.length-1]),l&&(Q=Q.clone(),Q.height+=f,u.setGeometry(q,Q)))}}finally{u.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),B=u.getChildCells(y,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),E=0;E<S.length;E++){y=S[E];B=u.getChildCells(y,!0);var Q=B[b],c=this.getCellGeometry(Q);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(Q,c));b<B.length-1&&(Q=B[b+1],c=this.getCellGeometry(Q),null!=c&&(c=c.clone(),+Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var H=mxUtils.indexOf(C,b);if(H<C.length-1){var S=C[H+1],E=this.getCellGeometry(S);null!=E&&(E=E.clone(),E.y+=f,E.height-=f,u.setGeometry(S,E))}}var Q=this.getCellGeometry(q);null!=Q&&(l||(l=b==C[C.length-1]),l&&(Q=Q.clone(),Q.height+=f,u.setGeometry(q,Q)))}}finally{u.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var H=b==C.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),E=0;E<S.length;E++){y=S[E];C=u.getChildCells(y,!0);var Q=C[b],c=this.getCellGeometry(Q);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(Q,c));b<C.length-1&&(Q=C[b+1],c=this.getCellGeometry(Q),null!=c&&(c=c.clone(),c.x+=f,l||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),u.setGeometry(Q,c)))}if(H||l){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,u.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{u.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,f){for(var l=0,u=0;u<b.length;u++)if(!this.isVertexIgnored(b[u])){var y=this.graph.getCellGeometry(b[u]);null!=y&&(l+=f?y.width:y.height)}return l};-TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var B=this.graph.getCellGeometry(l[q]);null!=B&&(u+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*f/b,y.push(Math.round(u)))}return y};-TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var E=this.graph.getCellGeometry(q[S]);null!=E&&(E=E.clone(),E.y=b.y,E.height=l-b.y-b.height,null!=f?(E.x=f[S],E.width=f[S+1]-E.x,S==q.length-1&&S<f.length-2&&(E.width=u-E.x-b.x-b.width)):(E.x=B,B+=E.width,S==q.length-1?E.width=u-b.x-b.width-H:H+=E.width),E.alternateBounds=new mxRectangle(0,+TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var C=this.graph.getCellGeometry(l[q]);null!=C&&(u+=(null!=C.alternateBounds?C.alternateBounds.width:C.width)*f/b,y.push(Math.round(u)))}return y};+TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,H=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var E=this.graph.getCellGeometry(q[S]);null!=E&&(E=E.clone(),E.y=b.y,E.height=l-b.y-b.height,null!=f?(E.x=f[S],E.width=f[S+1]-E.x,S==q.length-1&&S<f.length-2&&(E.width=u-E.x-b.x-b.width)):(E.x=C,C+=E.width,S==q.length-1?E.width=u-b.x-b.width-H:H+=E.width),E.alternateBounds=new mxRectangle(0,0,E.width,E.height),y.setGeometry(q[S],E))}return H};-TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=l.height-f.y-f.height,E=l.width-f.x-f.width,Q=B.getChildCells(b,!0),c=0;c<Q.length;c++)B.setVisible(Q[c],!0);var g=this.getSize(Q,!1);if(0<S&&0<E&&0<-Q.length&&0<g){if(y){var m=this.graph.getCellGeometry(Q[Q.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,B.setGeometry(Q[Q.length-1],m))}var n=q?null:this.getRowLayout(Q[0],E),x=[],F=f.y;for(c=0;c<Q.length;c++)m=this.graph.getCellGeometry(Q[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=E,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,B.setGeometry(Q[c],m)),H=Math.max(H,this.layoutRow(Q[c],n,m.height,E,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,B.setGeometry(b,-l));q&&E<H+Graph.minTableColumnWidth&&(l=l.clone(),l.width=H+f.width+f.x+Graph.minTableColumnWidth,B.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){B.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=M.width}I.actual.col==I.col&&(M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=M.height)}}))}else for(c=0;c<Q.length;c++)B.setVisible(Q[c],-!1)}finally{B.endUpdate()}}};+TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),H=0;C.beginUpdate();try{for(var S=l.height-f.y-f.height,E=l.width-f.x-f.width,Q=C.getChildCells(b,!0),c=0;c<Q.length;c++)C.setVisible(Q[c],!0);var g=this.getSize(Q,!1);if(0<S&&0<E&&0<+Q.length&&0<g){if(y){var m=this.graph.getCellGeometry(Q[Q.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,C.setGeometry(Q[Q.length-1],m))}var n=q?null:this.getRowLayout(Q[0],E),x=[],F=f.y;for(c=0;c<Q.length;c++)m=this.graph.getCellGeometry(Q[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=E,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,C.setGeometry(Q[c],m)),H=Math.max(H,this.layoutRow(Q[c],n,m.height,E,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,+l));q&&E<H+Graph.minTableColumnWidth&&(l=l.clone(),l.width=H+f.width+f.x+Graph.minTableColumnWidth,C.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){C.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=M.width}I.actual.col==I.col&&(M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=M.height)}}))}else for(c=0;c<Q.length;c++)C.setVisible(Q[c],+!1)}finally{C.endUpdate()}}};(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var m=this.getState(c);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&!m.invalid&&this.updateLineJumps(m)&&this.graph.cellRenderer.redraw(m,!1,this.isRendering());m=f.apply(this,arguments);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(m);return m};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(c){var g=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=g)for(var m=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=m&&m!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==m&&(m=g[n].getAttribute("d"));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 l=mxShape.prototype.paint;mxShape.prototype.paint=function(c){l.apply(this,@@ -2534,8 +2534,8 @@ arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var u=var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var m=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(Z,k,v){var J=new mxPoint(k,v);J.type=Z;n.push(J);J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=Z||J.x!=k||J.y!=v},F=.5*this.scale;m=!1;n=[];for(var I=0;I<g.length-1;I++){for(var M=g[I+1],L=g[I],K=[],aa=g[I+2];I<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,aa.x,aa.y,M.x,M.y)<1*this.scale*this.scale;)M=aa,I++,aa=g[I+2];m=x(0,L.x,L.y)||m;for(var ja=0;ja<this.validEdges.length;ja++){var ca=this.validEdges[ja],ba=ca.absolutePoints;if(null!=ba&&mxUtils.intersects(c,ca)&&"1"!=ca.style.noJump){var oa=null;for(ca=0;ca<ba.length-1;ca++){var Y=ba[ca+1],da=ba[ca];for(aa=ba[ca+2];ca<ba.length-2&&mxUtils.ptSegDistSq(da.x,da.y,aa.x,aa.y,Y.x,Y.y)<1*this.scale*this.scale;)Y=aa,ca++,aa=ba[ca+2];var ha=mxUtils.intersection(L.x,L.y,M.x,M.y,da.x,da.y,Y.x,Y.y);if(null!=ha&&(Math.abs(ha.x-L.x)>F||Math.abs(ha.y-L.y)>F)&&(Math.abs(ha.x-M.x)>F||Math.abs(ha.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,da.x,da.y)>F)&&(null==aa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,aa.x,aa.y)>F||mxUtils.ptLineDist(L.x,-L.y,M.x,M.y,Y.x,Y.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=da}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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 n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var ca=+L.y,M.x,M.y,Y.x,Y.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=da}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var C=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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)C.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var ca=this.state.routedPoints[ja],ba=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ja?ba=g[0]:ja==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var Y=this.state.routedPoints[ja+1];ca=Y.x/this.scale-ba.x;Y=Y.y/this.scale-ba.y;ca=ca*ca+Y*Y;null==aa&&(aa=new mxPoint(ba.x-M.x,ba.y-M.y),L=Math.sqrt(aa.x*aa.x+aa.y*aa.y),0<L?(aa.x=aa.x*x/L,aa.y=aa.y*x/L):aa=null);ca>x*x&&0<L&&(ca=M.x-ba.x,Y=M.y-ba.y,ca=ca*ca+Y*Y,ca>x*x&&(oa=new mxPoint(ba.x-aa.x,ba.y-aa.y),ca=new mxPoint(ba.x+aa.x,ba.y+aa.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,I),K=0>Math.round(aa.x)||0==Math.round(aa.x)&&0>=Math.round(aa.y)?1:-1,I=!1,"sharp"==F?(c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.lineTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+aa.y*K,oa.y-aa.x*K),c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.moveTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x+aa.y*K,ca.y-aa.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-aa.y*K,oa.y+aa.x*K,ca.x-aa.y*K,ca.y+aa.x*K,ca.x,ca.y)):(c.moveTo(ca.x,ca.y),I=!0),K=[ca],oa=!0))}else aa=null;oa||(K.push(ba),M=ba)}this.addPoints(c,K,m,n,!1,null,I);c.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==@@ -2545,222 +2545,222 @@ var E=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateText8))try{var m=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(m));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return Q.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 f=mxStencilRegistry.stencils[b];if(null==f&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var l=mxStencilRegistry.getBasenameForStencil(b);if(null!=l){f=mxStencilRegistry.libraries[l];if(null!=f){if(null==mxStencilRegistry.packages[l]){for(var u=0;u<f.length;u++){var y=f[u];if(!mxStencilRegistry.isFileLoaded(y))if(mxStencilRegistry.setFileLoaded(y),".xml"==y.toLowerCase().substring(y.length-4,y.length))mxStencilRegistry.loadStencilSet(y,-null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,l,f,y,B)}}mxStencilRegistry.packages[l]=1}}else l=l.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+l+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};+null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(C){null!=window.console&&console.log("error in getStencil:",b,l,f,y,C)}}mxStencilRegistry.packages[l]=1}}else l=l.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+l+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};mxStencilRegistry.getBasenameForStencil=function(b){var f=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){f=b[1];for(var l=2;l<b.length-1;l++)f+="/"+b[l]}return f};-mxStencilRegistry.loadStencilSet=function(b,f,l,u){var y=mxStencilRegistry.packages[b];if(null!=l&&l||null==y){var q=!1;if(null==y)try{if(u){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(B){null!=B&&null!=B.documentElement&&(mxStencilRegistry.packages[b]=B,q=!0,mxStencilRegistry.parseStencilSet(B.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(B){null!=window.console&&console.log("error in loadStencilSet:",b,B)}null!=y&&null!=+mxStencilRegistry.loadStencilSet=function(b,f,l,u){var y=mxStencilRegistry.packages[b];if(null!=l&&l||null==y){var q=!1;if(null==y)try{if(u){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(C){null!=C&&null!=C.documentElement&&(mxStencilRegistry.packages[b]=C,q=!0,mxStencilRegistry.parseStencilSet(C.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(C){null!=window.console&&console.log("error in loadStencilSet:",b,C)}null!=y&&null!=y.documentElement&&mxStencilRegistry.parseStencilSet(y.documentElement,f,q)}};mxStencilRegistry.loadStencil=function(b,f){if(null!=f)mxUtils.get(b,mxUtils.bind(this,function(l){f(200<=l.getStatus()&&299>=l.getStatus()?l.getXml():null)}),mxUtils.bind(this,function(l){f(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var f=0;f<b.length;f++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[f]).documentElement)};-mxStencilRegistry.parseStencilSet=function(b,f,l){if("stencils"==b.nodeName)for(var u=b.firstChild;null!=u;)"shapes"==u.nodeName&&mxStencilRegistry.parseStencilSet(u,f,l),u=u.nextSibling;else{l=null!=l?l:!0;u=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=u.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");l&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(u));if(null!=f){var B=u.getAttribute("w"),-H=u.getAttribute("h");B=null==B?80:parseInt(B,10);H=null==H?80:parseInt(H,10);f(y,q,b,B,H)}}u=u.nextSibling}}};-"undefined"!==typeof mxVertexHandler&&function(){function b(){var C=document.createElement("div");C.className="geHint";C.style.whiteSpace="nowrap";C.style.position="absolute";return C}function f(C,P){switch(P){case mxConstants.POINTS:return C;case mxConstants.MILLIMETERS:return(C/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(C/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(C/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";+mxStencilRegistry.parseStencilSet=function(b,f,l){if("stencils"==b.nodeName)for(var u=b.firstChild;null!=u;)"shapes"==u.nodeName&&mxStencilRegistry.parseStencilSet(u,f,l),u=u.nextSibling;else{l=null!=l?l:!0;u=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=u.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");l&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(u));if(null!=f){var C=u.getAttribute("w"),+H=u.getAttribute("h");C=null==C?80:parseInt(C,10);H=null==H?80:parseInt(H,10);f(y,q,b,C,H)}}u=u.nextSibling}}};+"undefined"!==typeof mxVertexHandler&&function(){function b(){var B=document.createElement("div");B.className="geHint";B.style.whiteSpace="nowrap";B.style.position="absolute";return B}function f(B,P){switch(P){case mxConstants.POINTS:return 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(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(C){return!mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(C){return l.apply(this,arguments)||this.graph.isTableRow(C)||this.graph.isTableCell(C)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=-function(C){return u.apply(this,arguments)||this.graph.isEdgeIgnored(C)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(C){return this.graph.isCloneEvent(C)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var C=new mxEllipse(null,this.highlightColor,this.highlightColor,0);C.opacity=mxConstants.HIGHLIGHT_OPACITY;return C};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var P in this.graph.currentEdgeStyle)C.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)C.style[P]=W[P]}catch(ia){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};-var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var C=q.apply(this,arguments);C.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return C};mxConnectionHandler.prototype.updatePreview=function(C){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var C=B.apply(this,arguments),P=C.getCell;C.getCell=mxUtils.bind(this,function(R){var W=P.apply(this,arguments);this.error=null;return W});-return C};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var C="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",P="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<P.length;R++)null!=-this.currentEdgeStyle[P[R]]&&(C+=P[R]+"="+this.currentEdgeStyle[P[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?C+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(C+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?C+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(C+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(C+="elbow="+this.currentEdgeStyle.elbow+";");return C=null!=this.currentEdgeStyle.html?C+("html="+this.currentEdgeStyle.html+";"):C+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var C=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,P){P=null!=P?P:{};for(var R=0;R<C.length;R++){var W=C[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ia=this.model.getChildCount(W),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(C,P,R){R=null!=R?R:{};for(var W in C){var ia=P[W];null==R[ia]&&(R[ia]=C[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,-P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ia=new mxCodec(C.ownerDocument),ka=new mxGraphModel;ia.decode(C,ka);C=[];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++)ua=this.model.getChildren(this.moveCells([xa[ka]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=-ka.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ia,ta,pa),this.updateCustomLinks(pa,C),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ia=this.getBoundingBoxFromGeometry(C,!0);null!=Ia&&this.moveCells(C,P-Ia.x,R-Ia.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var P={},R=this.cloneCells(C,null,P),W=-new mxDictionary,ia=0;ia<C.length;ia++)W.put(C[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ta=this.view.getState(C[ia]);if(null!=ta){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(C[ia])&&null==W.get(this.model.getParent(C[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(P,-this.createCellLookup(C)),R);return ka.encode(pa)};Graph.prototype.isSwimlane=function(C,P){var R=null;null==C||this.model.isEdge(C)||this.model.getParent(C)==this.model.getRoot()||(R=this.getCurrentCellStyle(C,P)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(C){return null!=C&&H.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellEditable(this.model.getParent(C)):-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(C){return null!=C&&S.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellMovable(this.model.getParent(C)):!0:!1};var E=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(C){var P=this.model.getParent(C);if(null!=P){var R=this.getCurrentCellStyle(P);if(null!=R.expand)return"0"!=R.expand}return E.apply(this,arguments)&&(null==P||!this.isTable(P))};var Q=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(C,P,R,W,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{R=Q.apply(this,[C,P,R,W,ia,ka,pa,xa]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(P=0;P<ta.length;P++){var ua=this.getCellGeometry(ta[P]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[P])}var Ia=this.getChildCells(C,!0);for(P=0;P<Ia.length;P++)ua=this.getCellGeometry(Ia[P]),-null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Ia[P]);var Va=this.model.getTerminal(R,!1);if(null!=Va){var Wa=this.getCurrentCellStyle(Va);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(C,-P,R){if(P||R)c.apply(this,arguments);else{var W=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==W)ia=ka.length-1;else if(C&&null==W&&0<ka.length||null!=ia&&C&&ka.length>ia||!C&&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+(C?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};-Graph.prototype.swapShapes=function(C,P){if(this.model.isVertex(C)&&this.model.isVertex(P)&&2==this.getMovableCells([C,P]).length){var R=this.getCellGeometry(C),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ia=R.clone(),ka=W.clone();this.model.beginUpdate();try{ia.x=W.getCenterX()-R.width/2,ia.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(C,ia),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(C,P,R,W,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<C.length;ta++)this.isTable(C[ta])?xa=xa.concat(this.model.getChildCells(C[ta],!0).reverse()):xa.push(C[ta]);C=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<C.length;ta++)if(null!=ia&&this.isTableRow(C[ta])){var ua=this.model.getParent(C[ta]),Ia=this.getCellGeometry(C[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ia&&this.isTable(ua)&&this.isTable(ia)&&(W||ua!=ia)){if(!W){var Va=-this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ia.height,this.model.setGeometry(ua,Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ia.height,this.model.setGeometry(ia,Va));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){C[ta]=W?this.cloneCell(C[ta]):C[ta];var Ta=this.model.getChildCells(C[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Pa=ab.length-Ta.length;if(0<Pa)for(var Sa=0;Sa<Pa;Sa++){var gb=this.cloneCell(Ta[Ta.length-1]);null!=gb&&(gb.value="",this.model.add(C[ta],-gb))}else if(0>Pa)for(Sa=0;Sa>Pa;Sa--)this.model.remove(Ta[Ta.length+Sa-1]);Ta=this.model.getChildCells(C[ta],!0);for(Sa=0;Sa<ab.length;Sa++){var fb=this.getCellGeometry(ab[Sa]),cb=this.getCellGeometry(Ta[Sa]);null!=fb&&null!=cb&&(cb=cb.clone(),cb.width=fb.width,this.model.setGeometry(Ta[Sa],cb))}}}}var eb=g.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!W&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);W&&this.updateCustomLinks(this.createCellMapping(pa,-this.createCellLookup(C)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(C,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<C.length;W++)if(this.isTableCell(C[W])){var ia=this.model.getParent(C[W]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(C[W],"")}else{if(this.isTableRow(C[W])&&(ka=this.model.getParent(C[W]),-0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka))){for(var pa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<pa.length;ta++)0<=mxUtils.indexOf(C,pa[ta])&&xa++;xa==pa.length&&R.push(ka)}R.push(C[W])}R=m.apply(this,[R,P])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(C,P,R){R=null!=R?R:new Graph;for(var W=0;W<P.length;W++)null!=P[W]&&R.updateCustomLinksForCell(C,P[W],R)};Graph.prototype.updateCustomLinksForCell=function(C,P){this.doUpdateCustomLinksForCell(C,P);for(var R=-this.model.getChildCount(P),W=0;W<R;W++)this.updateCustomLinksForCell(C,this.model.getChildAt(P,W))};Graph.prototype.doUpdateCustomLinksForCell=function(C,P){};Graph.prototype.getAllConnectionConstraints=function(C,P){if(null!=C){P=mxUtils.getValue(C.style,"points",null);if(null!=P){C=[];try{var R=JSON.parse(P);for(P=0;P<R.length;P++){var W=R[P];C.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return C}if(null!=-C.shape&&null!=C.shape.bounds){W=C.shape.direction;P=C.shape.bounds;var ia=C.shape.scale;R=P.width/ia;P=P.height/ia;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=C.shape.getConstraints(C.style,R,P);if(null!=P)return P;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var P=this.getCurrentCellStyle(C);P=-mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[C])}};Graph.prototype.isValidRoot=function(C){for(var P=this.model.getChildCount(C),R=0,W=0;W<P;W++){var ia=this.model.getChildAt(C,W);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,P,-R){for(var W=this.getCurrentCellStyle(C),ia=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ia=ia&&this.isTable(P[pa]),ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ka||ia))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,-arguments);C.setStyle("group");return C};Graph.prototype.isExtendParentsOnAdd=function(C){var P=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(P&&null!=C&&null!=this.layoutManager){var R=this.model.getParent(C);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(P=!1))}return P};Graph.prototype.getPreferredSizeForCell=function(C,P,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=-10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(C,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ia=0;ia<C.length;ia++){var ka=C[ia];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Ia=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,-!1);ta.setTerminalPoint(Ia,!0);R.setGeometry(ka,ta);var Va=this.view.getState(ka),Wa=this.view.getState(pa),Ta=this.view.getState(xa);if(null!=Va){var ab=null!=Wa?this.getConnectionConstraint(Va,Wa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ka,pa,!0,Pa);this.setConnectionConstraint(ka,xa,!1,ab);var Sa=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Sa,[ka])}W.push(ka)}}else if(R.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 gb=ta.width;ta.width=ta.height;ta.height=gb;R.setGeometry(ka,ta)}var fb=this.view.getState(ka);if(null!=fb){var cb=[mxConstants.DIRECTION_EAST,-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(fb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,cb[mxUtils.mod(mxUtils.indexOf(cb,eb)+(P?-1:1),cb.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(C){if(null!=C&&null!=C.fgNode)for(C=C.fgNode.firstChild;null!=C;){if("text"==C.nodeName&&"1"==C.getAttribute("placeholders"))return!0;-C=C.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(C){if(C instanceof mxGeometryChange&&(this.isTableCell(C.cell)||this.isTableRow(C.cell))&&(null==C.previous&&null!=C.geometry||null!=C.previous&&!C.previous.equals(C.geometry))){var P=C.cell;this.isTableCell(P)&&(P=this.model.getParent(P));this.isTableRow(P)&&(P=this.model.getParent(P));var R=this.view.getState(P);null!=R&&null!=R.shape&&(this.view.invalidate(P),R.shape.bounds=null)}n.apply(this,arguments);-C instanceof mxValueChange&&null!=C.cell&&null!=C.cell.value&&"object"==typeof C.cell.value&&this.invalidateDescendantsWithPlaceholders(C.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(C){C=this.model.getDescendants(C);if(0<C.length)for(var P=0;P<C.length;P++){var R=this.view.getState(C[P]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(C[P]):this.isReplacePlaceholders(C[P])&&this.view.invalidate(C[P],!1,!1)}};-Graph.prototype.replaceElement=function(C,P){P=C.ownerDocument.createElement(null!=P?P:"span");for(var R=Array.prototype.slice.call(C.attributes);attr=R.pop();)P.setAttribute(attr.nodeName,attr.nodeValue);P.innerHTML=C.innerHTML;C.parentNode.replaceChild(P,C)};Graph.prototype.processElements=function(C,P){if(null!=C){C=C.getElementsByTagName("*");for(var R=0;R<C.length;R++)null!=C[R]&&P(C[R])}};Graph.prototype.updateLabelElements=function(C,P,R){C=null!=C?C:this.getSelectionCells();for(var W=document.createElement("div"),-ia=0;ia<C.length;ia++){var ka=this.getCurrentCellStyle(C[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(C[ia]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(C[ia],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&-null!=C.getAttribute("placeholder"))for(var W=C.getAttribute("placeholder"),ia=C;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(W)){this.setAttributeForCell(ia,W,P);break}ia=this.model.getParent(ia)}var ka=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var P=new mxDictionary,R=0;R<C.length;R++)P.put(C[R],!0);var W=[];for(R=0;R<C.length;R++){var ia=this.model.getParent(C[R]);null==ia||P.get(ia)||(P.put(ia,!0),W.push(ia))}for(R=0;R<W.length;R++)if(ia=this.view.getState(W[R]),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++)P.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&C.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var P=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&P.push(C[R]);C=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,P){this.setAttributeForCell(C,"link",P)};Graph.prototype.setTooltipForCell=function(C,-P){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(C.value)&&C.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(C,R,P)};Graph.prototype.getAttributeForCell=function(C,P,R){C=null!=C.value&&"object"===typeof C.value?C.value.getAttribute(P):null;return null!=C?C:R};Graph.prototype.setAttributeForCell=function(C,P,R){if(null!=C.value&&"object"==typeof C.value)var W=C.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),-W.setAttribute("label",C.value||"");null!=R?W.setAttribute(P,R):W.removeAttribute(P);this.model.setValue(C,W)};Graph.prototype.isTargetShape=function(C,P,R){C=mxUtils.getValue(this.getCurrentCellStyle(C),mxConstants.STYLE_SHAPE,"");for(R=0;R<P.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(P[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,C))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(C,P,R,W){if(mxEvent.isAltDown(P))return null;-for(var ia=0;ia<C.length;ia++){var ka=this.model.getParent(C[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(C,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ia=0;ia<C.length&&pa;ia++)pa=pa&&this.isTableRow(C[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(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};-Graph.prototype.dblClick=function(C,P){this.isEnabled()&&(P=this.insertTextForEvent(C,P),mxGraph.prototype.dblClick.call(this,C,P))};Graph.prototype.insertTextForEvent=function(C,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ia=mxEvent.getSource(C);this.firstClickState!=W||this.firstClickSource!=ia||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&-(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(C)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var C=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ia=this.getPageSize();P=Math.max(P,W.x*ia.width);R=Math.max(R,W.y*ia.height)}return new mxPoint(this.snap(P+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(){var C=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/C.scale-C.translate.x+(0==P.width?2*this.gridSize:0))));C=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/C.scale--C.translate.y+2*this.gridSize)));return new mxPoint(W,C)};Graph.prototype.getCenterInsertPoint=function(C){C=null!=C?C: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-C.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-C.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/-2/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-C.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(C,P){C=null!=C?C:"";null!=P&&(0<C.length&&";"!=C.charAt(C.length-1)&&(C+=";"),C+="fontSize="+P+";");return C};Graph.prototype.addText=function(C,P,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ia=this.view.getRelativePoint(R,C,P);W.geometry.x=Math.round(1E4*ia.x)/1E4;W.geometry.y=Math.round(ia.y);W.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((C-ia.x)/ka),Math.round((P-ia.y)/ka))}else ia=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(C/this.view.scale)-ia.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ia.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(C,P,R){var W=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Ia=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Ia&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Ia),null!=P&&mxEvent.addGestureListeners(ta[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&-C!=mxConstants.NONE?new mxCellHighlight(pa,C,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ta=pa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Ia,Va,Wa){return null==pa.getLinkForCell(Ia.cell)}),ua=null==ua||pa.model.isAncestor(ta,ua.cell)?pa.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=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(pa.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!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Ia=ua.getSource();for(ta=ua.getEvent();null!=Ia&&"a"!=Ia.nodeName.toLowerCase();)Ia=Ia.parentNode;null==-Ia&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.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?(Ia=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ia||null==P||P(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||-(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Ia?pa.linkTarget:"_top",pa.openLink(this.currentLink,ta),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&R(ua.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(C,P){C=null!=C?C:this.getSelectionCells();P=null!=P?P:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var W=this.getModel(),ia=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ta=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=W.getParent(C[R]);if(null!=ua){var Ia=this.moveCells([ta[R]],ia,ia,!1)[0];ka.push(Ia);if(P)W.add(ua,ta[R]);else{var Va=ua.getIndex(C[R]);W.add(ua,ta[R],Va+-1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[R]),Ta=this.getCellGeometry(ua);null!=Wa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Wa.height,W.setGeometry(ua,Ta))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(C,P,R){if(null!=C&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ia=-[],ka=0;ka<W.length;ka++)ia.push(W[ka]);document.execCommand("insertimage",!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ia.length+1)for(ka=C.length-1;0<=ka;ka--)if(0==ka||C[ka]!=ia[ka-1]){C[ka].setAttribute("width",P);C[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=-0;W<P.length;W++)R.push(P[W]);document.execCommand("createlink",!1,mxUtils.trim(C));P=this.cellEditor.textarea.getElementsByTagName("a");if(P.length==R.length+1)for(W=P.length-1;0<=W;W--)if(P[W]!=R[W-1]){for(P=P[W].getElementsByTagName("a");0<P.length;){for(R=P[0].parentNode;null!=P[0].firstChild;)R.insertBefore(P[0].firstChild,P[0]);R.removeChild(P[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(C))};Graph.prototype.isCellResizable=function(C){var P=mxGraph.prototype.isCellResizable.apply(this,-arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&!this.isTableRow(C)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ia=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ta=this.view.getState(P[xa]);if(null!=ta){var ua=C?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,-ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=C?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Pa){return C?ab.x-Pa.x:ab.y-Pa.y});R&&(pa-=C?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(C?ta.x:ta.y);ia=ia/ua-(C?ta.x:ta.y);this.getModel().beginUpdate();try{var Ia=(ia-ka-pa)/(W.length-1),Va=ka+(R?C?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Wa=this.view.getState(this.model.getParent(W[xa].cell)),-Ta=this.getCellGeometry(W[xa].cell);Va+=Ia;null!=Ta&&null!=Wa&&(Ta=Ta.clone(),C?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Wa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Wa.origin.y,this.getModel().setGeometry(W[xa].cell,Ta));R&&(Va+=C?W[xa].width:W[xa].height)}}finally{this.getModel().endUpdate()}}}return P};Graph.prototype.isCloneEvent=function(C){return mxClient.IS_MAC&&mxEvent.isMetaDown(C)||mxEvent.isControlDown(C)};Graph.prototype.createSvgImageExport=function(C){C=new mxImageExport;C.addCellData=-function(R,W,ia){W.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=0;ia<R.value.attributes.length;ia++){var ka=R.value.attributes[ia];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=C.visitStatesRecursive;C.visitStatesRecursive=function(R,W,ia){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,-null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(W.root);P.apply(this,arguments);W.root=ka}};C.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});C.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return C};Graph.prototype.parseBackgroundImage=function(C){var P=null;null!=C&&0<C.length&&(C=JSON.parse(C),P=new mxImage(C.src,-C.width,C.height));return P};Graph.prototype.getBackgroundImageObject=function(C){return C};Graph.prototype.getSvg=function(C,P,R,W,ia,ka,pa,xa,ta,ua,Ia,Va,Wa,Ta,ab,Pa){var Sa=null;if(null!=Ta)for(Sa=new mxDictionary,Ia=0;Ia<Ta.length;Ia++)Sa.put(Ta[Ia],!0);Ta=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:-!0;ua=null!=ua?ua:!1;var fb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Sa||W||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),cb=this.backgroundImage,eb=this.view.translate,lb=this.view.scale;"diagram"==Wa&&null!=cb&&null!=cb.width&&null!=cb.height&&(fb=mxRectangle.fromRectangle(fb),fb.add(new mxRectangle((eb.x+cb.x)*lb,(eb.y+cb.y)*lb,cb.width*lb,cb.height*lb)));if(null==fb)throw Error(mxResources.get("drawingEmpty"));W=P/lb;var kb=Math.max(1,Math.ceil(fb.width*-W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);ia=ia?-.5:0;var hb=mxUtils.getLightDarkColor(C),pb=Graph.createSvgNode(ia,ia,kb,ob,hb),sb=pb.ownerDocument;if(null!=C){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,-"g");pb.appendChild(mb);var nb=this.createSvgCanvas(mb);nb.translate(Math.floor(R/P-fb.x/lb),Math.floor(R/P-fb.y/lb));nb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=nb.getAlternateText;nb.getAlternateText=function(bb,yb,tb,xb,vb,rb,Db,Fb,d,p,A,t,z){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var D=Math.ceil(2*xb/this.state.fontSize),G=[],ea=0,O=0;(0==D||ea<D)&&O<-rb.length;){var sa=rb.charCodeAt(O);if(10==sa||13==sa){if(0<ea)break}else G.push(rb.charAt(O)),255>sa&&ea++;O++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(C=lb/P,ia=new mxRectangle((cb.x+eb.x)*C,(cb.y+eb.y)*C,cb.width*C,cb.height*C),mxUtils.intersects(fb,ia)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);-nb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var zb=xa.getLinkForCellState;xa.getLinkForCellState=function(bb,yb){var tb=bb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==tb||bb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(bb,yb){return bb.view.graph.getLinkTargetForCell(bb.cell)};var Cb=xa.drawCellState,Ab=null,Bb=mxUtils.bind(this,function(){if(null==Ab){Ab="ge-flow-animation-"+Editor.guid();var bb=null!=sb.createElementNS?sb.createElementNS(mxConstants.NS_SVG,-"style"):sb.createElement("style");bb.innerHTML=this.createFlowAnimationCss(Ab);sb.getElementsByTagName("defs")[0].appendChild(bb)}return Ab});xa.drawCellState=function(bb,yb){for(var tb=bb.view.graph,xb=null!=Sa?Sa.get(bb.cell):tb.isCellSelected(bb.cell),vb=tb.model.getParent(bb.cell);!(ka&&null==Sa||xb)&&null!=vb;)xb=null!=Sa?Sa.get(vb):tb.isCellSelected(vb),vb=tb.model.getParent(vb);if(null!=bb.shape)try{var rb=bb.shape.isFlowAnimationEnabled,Db=bb.shape.addFlowAnimationToShape;bb.shape.isFlowAnimationEnabled=-function(){return gb&&tb.model.isEdge(bb.cell)&&"1"==mxUtils.getValue(bb.style,"flowAnimation","0")};bb.shape.addFlowAnimationToShape=function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),bb.style,P,Bb())};if(ka&&null==Sa||xb)tb.view.redrawEnumerationState(bb),Cb.apply(this,arguments),this.doDrawShape(bb.secondLabel,yb)}finally{bb.shape.isFlowAnimationEnabled=rb,bb.shape.addFlowAnimationToShape=Db}};var wb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(wb),-nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ta,!0);return pb}finally{this.enableFlowAnimation=gb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),W=C.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=-C.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||P.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"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x",-"50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(W);ia.appendChild(C);R.appendChild(ia);P.appendChild(R)}};Graph.prototype.disableSvgLinks=function(C,P){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var W=C[R].getAttribute("href");null==W&&(W=C[R].getAttribute("xlink:href"));null!=W&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));P&&P(C[R])}};Graph.prototype.updateSvgLinks=function(C,P,R){C=C.getElementsByTagName("a");for(var W=-0;W<C.length;W++)if(null==C[W].getAttribute("target")){var ia=C[W].getAttribute("href");null==ia&&(ia=C[W].getAttribute("xlink:href"));null!=ia&&(null!=P&&/^https?:\/\//.test(ia)?C[W].setAttribute("target",P):R&&this.isCustomLink(ia)&&C[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=-function(){var C=null;if(window.getSelection){var P=window.getSelection();P.getRangeAt&&P.rangeCount&&(C=P.getRangeAt(0).commonAncestorContainer)}else document.selection&&(C=document.selection.createRange().parentElement());return C};Graph.prototype.getSelectedEditingElement=function(){var C=null;if(null!=this.cellEditor.textarea)for(C=this.getSelectedElement();null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.parentNode;return C};Graph.prototype.getParentByName=function(C,P,R){for(;null!=C&&-C.nodeName!=P;){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.getParentByNames=function(C,P,R){for(;null!=C&&!(0<=mxUtils.indexOf(P,C.nodeName));){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.selectNode=function(C){var P=null;if(window.getSelection){if(P=window.getSelection(),P.getRangeAt&&P.rangeCount){var R=document.createRange();R.selectNode(C);P.removeAllRanges();P.addRange(R)}}else(P=document.selection)&&"Control"!=P.type&&(C=P.createRange(),C.collapse(!0),R=P.createRange(),-R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,P,R){var W=this.getCellGeometry(C);if(null!=W){W=W.clone();if(null!=W.points)for(var ia=0;ia<W.points.length;ia++)P?W.points[ia].x=R+(R-W.points[ia].x):W.points[ia].y=R+(R-W.points[ia].y);ia=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ia(W.getTerminalPoint(!0));ia(W.getTerminalPoint(!1));this.model.setGeometry(C,W)}};Graph.prototype.flipChildren=function(C,P,R){this.model.beginUpdate();try{for(var W=-this.model.getChildCount(C),ia=0;ia<W;ia++){var ka=this.model.getChildAt(C,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,P){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],W=0;W<C.length;W++)if(this.model.isEdge(C[W])){var ia=this.view.getState(C[W]);-null!=ia&&this.flipEdgePoints(C[W],P,(P?ia.getCenterX():ia.getCenterY())/this.view.scale-(P?ia.origin.x:ia.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(C[W]);null!=ka&&this.flipChildren(C[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(C[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,P){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();-try{for(var W=0;W<C.length;W++){var ia=this.model.getParent(C[W]);if(this.isTable(ia)){var ka=this.getCellGeometry(C[W]),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(C):null;this.removeCells(C,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};-Graph.prototype.insertTableColumn=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=0;if(this.isTableCell(C)){var ka=R.getParent(C);W=R.getParent(ka);ia=mxUtils.indexOf(R.getChildCells(ka,!0),C)}else this.isTableRow(C)?W=R.getParent(C):C=R.getChildCells(W,!0)[0],P||(ia=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ta=R.getChildCells(pa[C],!0)[ia],ua=R.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Ia=-this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ia){null!=Ia.alternateBounds&&(Ia.width=Ia.alternateBounds.width,Ia.height=Ia.alternateBounds.height,Ia.alternateBounds=null);xa=Ia.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ia.height=Va.height)}R.add(pa[C],ua,ia+(P?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=xa,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=-function(C){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:P.getParent(C);var W=P.getChildCells(R,!0);0==W.length?P.remove(R):(R==C&&(C=W[W.length-1]),P.remove(C))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){W=C;var ia=R.getChildCells(W,!0);C=ia[P?0:ia.length-1]}else W=R.getParent(C);var ka=W.getIndex(C);-C=R.cloneCell(C,!1);C.value=null;R.add(W,C,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=C;if(this.isTableCell(C))ia=R.getParent(C),W=R.getParent(ia);else if(this.isTableRow(C))W=R.getParent(C);else{var ka=R.getChildCells(W,!0);ia=ka[P?0:ka.length-1]}var pa=R.getChildCells(ia,!0),xa=W.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);if(null!=ta){for(ka=0;ka<pa.length;ka++){C=R.cloneCell(pa[ka],-!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(C)}R.add(W,ia,xa+(P?0:1));var Ia=this.getCellGeometry(W);null!=Ia&&(Ia=Ia.clone(),Ia.height+=ta.height,R.setGeometry(W,Ia))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var P=this.getModel();-P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(W=P.getParent(C));this.isTableRow(W)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(0==ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ka,C));for(W=C=0;W<ia.length;W++){var xa=P.getChildCells(ia[W],!0)[pa];P.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(C=Math.max(C,ta.width))}var ua=this.getCellGeometry(R);-null!=ua&&(ua=ua.clone(),ua.width-=C,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var P=this.getModel();P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(C=W=P.getParent(C));this.isTableRow(C)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(1>=ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[ia.length-1]);P.remove(W);C=0;var ka=this.getCellGeometry(W);null!=ka&&(C=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=-C,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(C,P){for(var R=C.tBodies[0],W=R.rows[0].cells,ia=C=0;ia<W.length;ia++){var ka=W[ia].getAttribute("colspan");C+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ia=0;ia<C;ia++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(C,P){C.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(C,P){var R=C.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ia=document.createElement("th");-R.rows[W].appendChild(ia);mxUtils.br(ia)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)W=C.rows[R].insertCell(P),mxUtils.br(W);return C.rows[0].cells[0<=P?P:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(C,P){if(0<=P){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>P&&C[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");-R.innerHTML=C;C=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=C.appendChild(W);P.insertNode(C)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(C)};Graph.prototype.createLinkForHint=function(C,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}C=null!=C?C:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(C)?this.getLinkTitle(C):C;var ia=document.createElement("a");-ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(C));ia.setAttribute("title",W(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,W(P,40));this.isCustomLink(C)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(C,R);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 C=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=C.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 P=!1,R=!1,W=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=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||!W&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||P&&this.isCellSelected(pa.getCell())));xa=!P||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+-ua.x+1,pa.getY()+ua.y+1,ta,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};mxCellEditor.prototype.isContentEditing=function(){var C=this.graph.view.getState(this.editingCell);return null!=C&&1==C.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=-function(){var C="";window.getSelection?C=window.getSelection():document.getSelection?C=document.getSelection():document.selection&&(C=document.selection.createRange().text);return""!=C};mxCellEditor.prototype.insertTab=function(C){var P=this.textarea.ownerDocument.defaultView.getSelection(),R=P.getRangeAt(0);C=Graph.createTabNode(C);R.insertNode(C);R.setStartAfter(C);R.setEndAfter(C);P.removeAllRanges();P.addRange(R)};mxCellEditor.prototype.alignText=function(C,P){var R=this.graph.getView().getState(this.editingCell);-if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ia=null!=P&&mxEvent.isShiftDown(P);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(C)}W||document.execCommand("justify"+-C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var C=window.getSelection();if(C.getRangeAt&&C.rangeCount){for(var P=[],R=0,W=C.rangeCount;R<W;++R)P.push(C.getRangeAt(R));return P}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(C){try{if(C)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var P=0,R=C.length;P<-R;++P)sel.addRange(C[P])}else document.selection&&C.select&&C.select()}catch(W){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(C){null!=C.text&&(C.text.replaceLinefeeds="0"!=mxUtils.getValue(C.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(C,P){this.isKeepFocusEvent(C)||!mxEvent.isAltDown(C.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=-function(C){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(C,P){C=this.graph.getStartEditingCell(C,P);M.apply(this,arguments);var R=this.graph.view.getState(C);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(C)};mxCellEditor.prototype.toggleViewMode=function(){var C=this.graph.view.getState(this.editingCell);if(null!=C){var P=null!=C&&"0"!=mxUtils.getValue(C.style,"nl2Br","1"),R=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(P?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);P=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(C.style,-mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&pa.push("underline");(mxUtils.getValue(C.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=P;this.textarea.style.textAlign=W;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(P?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=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(C,P){if(null!=this.textarea)if(C=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=C){var R=C.view.scale;this.bounds=mxRectangle.fromRectangle(C);if(0==this.bounds.width&&-0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var W=null!=C.text?C.text.margin:null;null==W&&(W=mxUtils.getAlignmentAsPoint(mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(C.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=W.x*this.bounds.width;this.bounds.y+=W.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height--4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*-R);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("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(C,P){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);-var R=this.graph.getEditingValue(C.cell,P);"1"==mxUtils.getValue(C.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(C,P){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(C.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;-mxCellEditor.prototype.getCurrentValue=function(C){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var P=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(C.style,"nl2Br","1")?(P=P.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<P.length&&("<br/>"==P.substring(P.length-5)||"<br>"==P.substring(P.length-4))&&(P=P.substring(0,P.lastIndexOf("<br"))+"<div><br/></div>")):-P=P.replace(/\r\n/g,"").replace(/\n/g,"");return P};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(C){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(C){}};var aa=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(C,P){this.graph.getModel().beginUpdate();try{aa.apply(this,arguments),""==P&&this.graph.isCellDeletable(C.cell)&&-0==this.graph.model.getChildCount(C.cell)&&this.graph.isTransparentState(C)&&this.graph.removeCells([C.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getBorderColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getMinimumSize=-function(C){var P=this.graph.getView().scale;return new mxRectangle(0,0,null==C.text?30:C.text.size*P+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(C,P){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(P.getEvent)};mxGraphView.prototype.formatUnitText=function(C){return C?f(C,this.unit):C};mxGraphHandler.prototype.updateHint=function(C){if(null!=this.pBounds&&(null!=this.shape||-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var P=this.graph.view.translate,R=this.graph.view.scale;C=this.roundLength((this.bounds.x+this.currentDx)/R-P.x);P=this.roundLength((this.bounds.y+this.currentDy)/R-P.y);R=this.graph.view.unit;this.hint.innerHTML=f(C,R)+", "+f(P,R);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 ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,P){ja.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var W=this.graph.model.getParent(C),ia=null!=W?this.graph.getCellGeometry(W):null;if(null!=ia&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=-parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);ia=ia.clone();R?ia.height=P.height+pa.y+pa.height+2*ka:ia.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var P=ca.apply(this,-arguments),R=new mxDictionary,W=this.graph.model,ia=[],ka=0;ka<P.length;ka++){var pa=P[ka];this.graph.isTableCell(pa)?C(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&C(W.getParent(pa));C(pa)}return ia};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=-function(){return oa.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 Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var P=Y.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var da=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=-function(C){var P=da.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var C=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+C.x/2,this.bounds.y+this.rotationHandleVSpacing-C.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(C,P){return this.graph.isRecursiveVertexResize(C)&&!mxEvent.isAltDown(P.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(C,P){return mxEvent.isControlDown(P.getEvent())||mxEvent.isMetaDown(P.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 Z=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(C){return C.tableHandle||k.apply(this,arguments)&&-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var C=0;this.graph.isTableRow(this.state.cell)?C=1:this.graph.isTableCell(this.state.cell)&&(C=2);return C};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,N=mxVertexHandler.prototype.createCustomHandles;-mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var C=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(ab,Pa,Sa){for(var gb=[],fb=0;fb<ab.length;fb++){var cb=ab[fb];gb.push(null==cb?null:new mxPoint((ta+cb.x+Pa)*ka,(ua+cb.y+Sa)*ka))}return gb},R=this,W=this.graph,ia=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,-ua=this.state.origin.y+W.view.translate.y;null==C&&(C=[]);var Ia=W.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ia.length){var Va=ia.getChildCells(Ia[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Ta=W.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Ia.length;ia++)mxUtils.bind(this,function(ab){var Pa=Ia[ab],Sa=null;if(W.isCellMovable(Pa.cell)){Sa=ab<Ia.length-1?Ia[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa.cell):null;var gb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:-Sa;Sa=null!=Ta[ab]?new J(Ta[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Sa=new mxHandle(Pa,"row-resize",null,Sa);Sa.tableHandle=!0;var fb=0;Sa.shape.node.parentNode.insertBefore(Sa.shape.node,Sa.shape.node.parentNode.firstChild);Sa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==fb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Ta[ab],0,fb),this.shape.updateBoundsFromLine();else{var eb=-W.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+fb*ka;this.shape.bounds.x=pa.x+(ab==Ia.length-1?0:eb.x*ka);this.shape.bounds.width=pa.width-(ab==Ia.length-1?0:eb.width+eb.x+ka)}this.shape.redraw()}};var cb=!1;Sa.setPosition=function(eb,lb,kb){fb=Math.max(Graph.minTableRowHeight-eb.height,lb.y-eb.y-eb.height);cb=mxEvent.isShiftDown(kb.getEvent());null!=gb&&cb&&(fb=Math.min(fb,gb.height-Graph.minTableRowHeight))};Sa.execute=function(eb){if(0!=-fb)W.setTableRowHeight(this.state.cell,fb,!cb);else if(!R.blockDelayedSelection){var lb=W.getCellAt(eb.getGraphX(),eb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Sa.reset=function(){fb=0}}C.push(Sa)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,function(ab){var Pa=W.view.getState(Va[ab]),Sa=W.getCellGeometry(Va[ab]),gb=null!=Sa.alternateBounds?Sa.alternateBounds:Sa;null==Pa&&(Pa=new mxCellState(W.view,Va[ab],W.getCellStyle(Va[ab])),Pa.x=pa.x+Sa.x*ka,Pa.y=pa.y+Sa.y*ka,-Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Sa=ab<Va.length-1?Va[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa):null;var fb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Wa[ab]?new J(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Sa);Pa.tableHandle=!0;var cb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);-Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Wa[ab],cb,0),this.shape.updateBoundsFromLine();else{var lb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(gb.width+cb)*ka;this.shape.bounds.y=pa.y+(ab==Va.length-1?0:lb.y*ka);this.shape.bounds.height=pa.height-(ab==Va.length-1?0:(lb.height+lb.y)*ka)}this.shape.redraw()}};var eb=!1;Pa.setPosition=function(lb,kb,ob){cb=-Math.max(Graph.minTableColumnWidth-gb.width,kb.x-lb.x-gb.width);eb=mxEvent.isShiftDown(ob.getEvent());null==fb||eb||(cb=Math.min(cb,fb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};C.push(Pa)})(ia)}}return null!=C?C.reverse():null};var T=-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=0;P<this.moveHandles.length;P++)null!=this.moveHandles[P]&&(this.moveHandles[P].node.style.visibility=C?"":"hidden");if(null!=this.cornerHandles)for(P=0;P<this.cornerHandles.length;P++)this.cornerHandles[P].node.style.visibility=C?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&-this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var C=this.isMoveHandlesVisible();C&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=-this.graph,P=C.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ia){if(null!=ia&&P.isVertex(ia.cell)&&C.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))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(P.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var C=0;C<this.cornerHandles.length;C++)null!=this.cornerHandles[C]&&null!=this.cornerHandles[C].node&&null!=this.cornerHandles[C].node.parentNode&&this.cornerHandles[C].node.parentNode.removeChild(this.cornerHandles[C].node);this.cornerHandles=null}};var V=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){V.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 C=0;4>C;C++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-C=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=-this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ia=this.customHandles[W].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){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),C.x=-this.sizers[0].bounds.width+P,C.y=this.sizers[0].bounds.height+P):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=function(C){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{C=this.state.view.scale;var P=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/C),P)+" x "+f(this.roundLength(this.bounds.height/-C),P)}C=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=C.y+C.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 X=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){X.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var fa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(C,P){fa.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 na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(C,P){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(C,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(P.x/ia-W.x);W=this.roundLength(P.y/ia-W.y);var pa=-this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*-R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(C.getGraphY(),P.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="'+-HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',+mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(B){return!mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(B){return l.apply(this,arguments)||this.graph.isTableRow(B)||this.graph.isTableCell(B)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=+function(B){return u.apply(this,arguments)||this.graph.isEdgeIgnored(B)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(B){return this.graph.isCloneEvent(B)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var B=new mxEllipse(null,this.highlightColor,this.highlightColor,0);B.opacity=mxConstants.HIGHLIGHT_OPACITY;return B};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var P in this.graph.currentEdgeStyle)B.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)B.style[P]=W[P]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};+var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),P=B.getCell;B.getCell=mxUtils.bind(this,function(R){var W=P.apply(this,arguments);this.error=null;return W});+return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",P="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<P.length;R++)null!=+this.currentEdgeStyle[P[R]]&&(B+=P[R]+"="+this.currentEdgeStyle[P[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize++";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(B+="elbow="+this.currentEdgeStyle.elbow+";");return B=null!=this.currentEdgeStyle.html?B+("html="+this.currentEdgeStyle.html+";"):B+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var B=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=+B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,P){P=null!=P?P:{};for(var R=0;R<B.length;R++){var W=B[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ia=this.model.getChildCount(W),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(B,P,R){R=null!=R?R:{};for(var W in B){var ia=P[W];null==R[ia]&&(R[ia]=B[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(B,+P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ia=new mxCodec(B.ownerDocument),ka=new mxGraphModel;ia.decode(B,ka);B=[];ia={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=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]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=+ka.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ja=this.getBoundingBoxFromGeometry(B,!0);null!=Ja&&this.moveCells(B,P-Ja.x,R-Ja.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var P={},R=this.cloneCells(B,null,P),W=+new mxDictionary,ia=0;ia<B.length;ia++)W.put(B[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==W.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(P,+this.createCellLookup(B)),R);return ka.encode(pa)};Graph.prototype.isSwimlane=function(B,P){var R=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(R=this.getCurrentCellStyle(B,P)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&H.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&S.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var E=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var P=this.model.getParent(B);if(null!=P){var R=this.getCurrentCellStyle(P);if(null!=R.expand)return"0"!=R.expand}return E.apply(this,arguments)&&(null==P||!this.isTable(P))};var Q=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(B,P,R,W,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==P.length&&this.model.isVertex(P[0])){var ua=this.getCellGeometry(P[0]);if(null!=ua&&!ua.relative){var Ja=new mxRectangle(ua.x+W,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ja.intersectsPoint(Va[Oa].x,+Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}R=Q.apply(this,[B,P,R,W,ia,ka,pa,xa]);this.model.setValue(R,"");var Sa=this.getChildCells(R,!0);for(Oa=0;Oa<Sa.length;Oa++)ra=this.getCellGeometry(Sa[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Sa[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);+if(null!=Pa){var Qa=this.getCurrentCellStyle(Pa);null!=Qa&&"1"==Qa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,P,R){if(P||R)c.apply(this,arguments);else{var W=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==W)ia=ka.length-1;else if(B&&null==W&&0<ka.length||null!=ia&&B&&ka.length>ia||!B&&0<ia)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(B?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};Graph.prototype.swapShapes=function(B,P){if(this.model.isVertex(B)&&this.model.isVertex(P)&&+2==this.getMovableCells([B,P]).length){var R=this.getCellGeometry(B),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ia=R.clone(),ka=W.clone();this.model.beginUpdate();try{ia.x=W.getCenterX()-R.width/2,ia.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,P,R,W,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=+[],ra=0;ra<B.length;ra++)this.isTable(B[ra])?xa=xa.concat(this.model.getChildCells(B[ra],!0).reverse()):xa.push(B[ra]);B=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<B.length;ra++)if(null!=ia&&this.isTableRow(B[ra])){var ua=this.model.getParent(B[ra]),Ja=this.getCellGeometry(B[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ja&&this.isTable(ua)&&this.isTable(ia)&&(W||ua!=ia)){if(!W){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ja.height,this.model.setGeometry(ua,+Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ja.height,this.model.setGeometry(ia,Va));var Oa=this.model.getChildCells(ia,!0);if(0<Oa.length){B[ra]=W?this.cloneCell(B[ra]):B[ra];var Sa=this.model.getChildCells(B[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Sa.length;if(0<Pa)for(var Qa=0;Qa<Pa;Qa++){var gb=this.cloneCell(Sa[Sa.length-1]);null!=gb&&(gb.value="",this.model.add(B[ra],gb))}else if(0>Pa)for(Qa=0;Qa>Pa;Qa--)this.model.remove(Sa[Sa.length+Qa-1]);Sa=this.model.getChildCells(B[ra],+!0);for(Qa=0;Qa<Za.length;Qa++){var fb=this.getCellGeometry(Za[Qa]),cb=this.getCellGeometry(Sa[Qa]);null!=fb&&null!=cb&&(cb=cb.clone(),cb.width=fb.width,this.model.setGeometry(Sa[Qa],cb))}}}}var eb=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!W&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);W&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(B)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;+Graph.prototype.removeCells=function(B,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<B.length;W++)if(this.isTableCell(B[W])){var ia=this.model.getParent(B[W]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(B,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(B[W],"")}else{if(this.isTableRow(B[W])&&(ka=this.model.getParent(B[W]),0>mxUtils.indexOf(B,ka)&&0>mxUtils.indexOf(R,ka))){for(var pa=this.model.getChildCells(ka,+!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&R.push(ka)}R.push(B[W])}R=m.apply(this,[R,P])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(B,P,R){R=null!=R?R:new Graph;for(var W=0;W<P.length;W++)null!=P[W]&&R.updateCustomLinksForCell(B,P[W],R)};Graph.prototype.updateCustomLinksForCell=function(B,P){this.doUpdateCustomLinksForCell(B,P);for(var R=this.model.getChildCount(P),W=0;W<R;W++)this.updateCustomLinksForCell(B,this.model.getChildAt(P,+W))};Graph.prototype.doUpdateCustomLinksForCell=function(B,P){};Graph.prototype.getAllConnectionConstraints=function(B,P){if(null!=B){P=mxUtils.getValue(B.style,"points",null);if(null!=P){B=[];try{var R=JSON.parse(P);for(P=0;P<R.length;P++){var W=R[P];B.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return B}if(null!=B.shape&&null!=B.shape.bounds){W=B.shape.direction;P=B.shape.bounds;var ia=B.shape.scale;R=P.width/+ia;P=P.height/ia;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=B.shape.getConstraints(B.style,R,P);if(null!=P)return P;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var P=this.getCurrentCellStyle(B);P=mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?+mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[B])}};Graph.prototype.isValidRoot=function(B){for(var P=this.model.getChildCount(B),R=0,W=0;W<P;W++){var ia=this.model.getChildAt(B,W);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,P,R){for(var W=this.getCurrentCellStyle(B),ia=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ia=ia&&this.isTable(P[pa]),+ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ka||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var P=+mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(P&&null!=B&&null!=this.layoutManager){var R=this.model.getParent(B);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(P=!1))}return P};Graph.prototype.getPreferredSizeForCell=function(B,P,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=+function(B,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ka=B[ia];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ra=R.getGeometry(ka);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ja=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ja,!0);R.setGeometry(ka,ra);var Va=this.view.getState(ka),Oa=this.view.getState(pa),Sa=+this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Sa?this.getConnectionConstraint(Va,Sa,!1):null;this.setConnectionConstraint(ka,pa,!0,Pa);this.setConnectionConstraint(ka,xa,!1,Za);var Qa=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,+Qa,[ka])}W.push(ka)}}else if(R.isVertex(ka)&&(ra=this.getCellGeometry(ka),null!=ra)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var gb=ra.width;ra.width=ra.height;ra.height=gb;R.setGeometry(ka,ra)}var fb=this.view.getState(ka);if(null!=fb){var cb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(fb.style,+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,cb[mxUtils.mod(mxUtils.indexOf(cb,eb)+(P?-1:1),cb.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof+mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var P=B.cell;this.isTableCell(P)&&(P=this.model.getParent(P));this.isTableRow(P)&&(P=this.model.getParent(P));var R=this.view.getState(P);null!=R&&null!=R.shape&&(this.view.invalidate(P),R.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};+Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var P=0;P<B.length;P++){var R=this.view.getState(B[P]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(B[P]):this.isReplacePlaceholders(B[P])&&this.view.invalidate(B[P],!1,!1)}};Graph.prototype.replaceElement=function(B,P){P=B.ownerDocument.createElement(null!=P?P:"span");for(var R=Array.prototype.slice.call(B.attributes);attr=+R.pop();)P.setAttribute(attr.nodeName,attr.nodeValue);P.innerHTML=B.innerHTML;B.parentNode.replaceChild(P,B)};Graph.prototype.processElements=function(B,P){if(null!=B){B=B.getElementsByTagName("*");for(var R=0;R<B.length;R++)null!=B[R]&&P(B[R])}};Graph.prototype.updateLabelElements=function(B,P,R){B=null!=B?B:this.getSelectionCells();for(var W=document.createElement("div"),ia=0;ia<B.length;ia++){var ka=this.getCurrentCellStyle(B[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(B[ia]),+null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(B[ia],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var W=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||+null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(W)){this.setAttributeForCell(ia,W,P);break}ia=this.model.getParent(ia)}var ka=B.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(B){if(null!=B){for(var P=new mxDictionary,+R=0;R<B.length;R++)P.put(B[R],!0);var W=[];for(R=0;R<B.length;R++){var ia=this.model.getParent(B[R]);null==ia||P.get(ia)||(P.put(ia,!0),W.push(ia))}for(R=0;R<W.length;R++)if(ia=this.view.getState(W[R]),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++)P.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,+arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var P=[],R=0;R<B.length;R++)this.isCellDeletable(B[R])&&this.isTransparentState(this.view.getState(B[R]))&&P.push(B[R]);B=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,P){this.setAttributeForCell(B,"link",P)};Graph.prototype.setTooltipForCell=function(B,P){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"++Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,R,P)};Graph.prototype.getAttributeForCell=function(B,P,R){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(P):null;return null!=B?B:R};Graph.prototype.setAttributeForCell=function(B,P,R){if(null!=B.value&&"object"==typeof B.value)var W=B.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),W.setAttribute("label",B.value||"");null!=R?W.setAttribute(P,R):W.removeAttribute(P);+this.model.setValue(B,W)};Graph.prototype.isTargetShape=function(B,P,R){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(R=0;R<P.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(P[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,P,R,W){if(mxEvent.isAltDown(P))return null;for(var ia=0;ia<B.length;ia++){var ka=this.model.getParent(B[ia]);if(this.model.isEdge(ka)&&+0>mxUtils.indexOf(B,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ia=0;ia<B.length&&pa;ia++)pa=pa&&this.isTableRow(B[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(B){mxGraph.prototype.click.call(this,B);this.firstClickState=B.getState();this.firstClickSource=B.getSource()};Graph.prototype.dblClick=function(B,P){this.isEnabled()&&(P=this.insertTextForEvent(B,+P),mxGraph.prototype.dblClick.call(this,B,P))};Graph.prototype.insertTextForEvent=function(B,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ia=mxEvent.getSource(B);this.firstClickState!=W||this.firstClickSource!=ia||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(B)))||+(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var B=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),+ia=this.getPageSize();P=Math.max(P,W.x*ia.width);R=Math.max(R,W.y*ia.height)}return new mxPoint(this.snap(P+B),this.snap(R+B))};Graph.prototype.getFreeInsertPoint=function(){var B=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/B.scale-B.translate.x+(0==P.width?2*this.gridSize:0))));B=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/B.scale-B.translate.y+2*this.gridSize)));return new mxPoint(W,B)};Graph.prototype.getCenterInsertPoint=function(B){B=+null!=B?B: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-B.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-B.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round(this.container.clientHeight/+2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,P){B=null!=B?B:"";null!=P&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+P+";");return B};Graph.prototype.addText=function(B,P,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ia=this.view.getRelativePoint(R,B,P);W.geometry.x=Math.round(1E4*ia.x)/1E4;W.geometry.y=Math.round(ia.y);W.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((B-ia.x)/ka),Math.round((P-ia.y)/ka))}else ia=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),W.geometry.width=+40,W.geometry.height=20,W.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ia.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(B,P,R){var W=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");+if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ja=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ja&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ja),null!=P&&mxEvent.addGestureListeners(ra[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=B&&""!=B&&B!=mxConstants.NONE?new mxCellHighlight(pa,B,4):null,startX:0,+startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ua=ra.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ra=pa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ja,Va,Oa){return null==pa.getLinkForCell(Ja.cell)}),ua=null==ua||pa.model.isAncestor(ra,ua.cell)?pa.view.getState(ra):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ua){this.startX=+ua.getGraphX();this.startY=ua.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(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ka||ua>ka)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;+null!=ra?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ra,ua){var Ja=ua.getSource();for(ra=ua.getEvent();null!=Ja&&"a"!=Ja.nodeName.toLowerCase();)Ja=Ja.parentNode;null==Ja&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<+ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ja=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ja||null==P||P(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:+mxEvent.isMiddleMouseButton(ra)?"_blank":Ja?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),+pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},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(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(B,P){B=null!=B?B:this.getSelectionCells();+P=null!=P?P:!0;for(var R=0;R<B.length;R++)this.isTableCell(B[R])&&(B[R]=this.model.getParent(B[R]));B=this.model.getTopmostCells(B);var W=this.getModel(),ia=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(R=0;R<B.length;R++){var ua=W.getParent(B[R]);if(null!=ua){var Ja=this.moveCells([ra[R]],ia,ia,!1)[0];ka.push(Ja);if(P)W.add(ua,ra[R]);else{var Va=ua.getIndex(B[R]);W.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),+Sa=this.getCellGeometry(ua);null!=Oa&&null!=Sa&&(Sa=Sa.clone(),Sa.height+=Oa.height,W.setGeometry(ua,Sa))}}else ka.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(B,P,R){if(null!=B&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ka=0;ka<W.length;ka++)ia.push(W[ka]);document.execCommand("insertimage",+!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ka=B.length-1;0<=ka;ka--)if(0==ka||B[ka]!=ia[ka-1]){B[ka].setAttribute("width",P);B[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=0;W<P.length;W++)R.push(P[W]);document.execCommand("createlink",!1,mxUtils.trim(B));+P=this.cellEditor.textarea.getElementsByTagName("a");if(P.length==R.length+1)for(W=P.length-1;0<=W;W--)if(P[W]!=R[W-1]){for(P=P[W].getElementsByTagName("a");0<P.length;){for(R=P[0].parentNode;null!=P[0].firstChild;)R.insertBefore(P[0].firstChild,P[0]);R.removeChild(P[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var P=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&+!this.isTableRow(B)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ia=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ra=this.view.getState(P[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=B?ra.width:ra.height);+W.push(ra)}}if(2<W.length){W.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=B?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ka=ka/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ja=(ia-ka-pa)/(W.length-1),Va=ka+(R?B?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Oa=this.view.getState(this.model.getParent(W[xa].cell)),Sa=this.getCellGeometry(W[xa].cell);Va+=Ja;null!=Sa&&null!=+Oa&&(Sa=Sa.clone(),B?Sa.x=Math.round(Va-(R?0:Sa.width/2))-Oa.origin.x:Sa.y=Math.round(Va-(R?0:Sa.height/2))-Oa.origin.y,this.getModel().setGeometry(W[xa].cell,Sa));R&&(Va+=B?W[xa].width:W[xa].height)}}finally{this.getModel().endUpdate()}}}return P};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(R,W,ia){W.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=+0;ia<R.value.attributes.length;ia++){var ka=R.value.attributes[ia];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=B.visitStatesRecursive;B.visitStatesRecursive=function(R,W,ia){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),+Editor.addSvgMetadata);ka.appendChild(W.root);P.apply(this,arguments);W.root=ka}};B.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});B.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var P=null;null!=B&&0<B.length&&(B=JSON.parse(B),P=new mxImage(B.src,B.width,B.height));return P};Graph.prototype.getBackgroundImageObject=function(B){return B};+Graph.prototype.getSvg=function(B,P,R,W,ia,ka,pa,xa,ra,ua,Ja,Va,Oa,Sa,Za,Pa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ja=0;Ja<Sa.length;Ja++)Qa.put(Sa[Ja],!0);Sa=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Sa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var fb="page"==Oa?this.view.getBackgroundPageBounds():ka&&null==Qa||W||+"diagram"==Oa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),cb=this.backgroundImage,eb=this.view.translate,lb=this.view.scale;"diagram"==Oa&&null!=cb&&null!=cb.width&&null!=cb.height&&(fb=mxRectangle.fromRectangle(fb),fb.add(new mxRectangle((eb.x+cb.x)*lb,(eb.y+cb.y)*lb,cb.width*lb,cb.height*lb)));if(null==fb)throw Error(mxResources.get("drawingEmpty"));W=P/lb;var kb=Math.max(1,Math.ceil(fb.width*W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);+ia=ia?-.5:0;var hb=mxUtils.getLightDarkColor(B),pb=Graph.createSvgNode(ia,ia,kb,ob,hb),sb=pb.ownerDocument;if(null!=B){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"g");pb.appendChild(mb);var nb=this.createSvgCanvas(mb);nb.translate(Math.floor(R/+P-fb.x/lb),Math.floor(R/P-fb.y/lb));nb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=nb.getAlternateText;nb.getAlternateText=function(bb,yb,tb,xb,vb,rb,Db,Fb,d,p,A,t,z){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var D=Math.ceil(2*xb/this.state.fontSize),G=[],ea=0,N=0;(0==D||ea<D)&&N<rb.length;){var ta=rb.charCodeAt(N);if(10==ta||13==ta){if(0<ea)break}else G.push(rb.charAt(N)),+255>ta&&ea++;N++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(B=lb/P,ia=new mxRectangle((cb.x+eb.x)*B,(cb.y+eb.y)*B,cb.width*B,cb.height*B),mxUtils.intersects(fb,ia)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);nb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var zb=xa.getLinkForCellState;xa.getLinkForCellState=+function(bb,yb){var tb=bb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==tb||bb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(bb,yb){return bb.view.graph.getLinkTargetForCell(bb.cell)};var Cb=xa.drawCellState,Ab=null,Bb=mxUtils.bind(this,function(){if(null==Ab){Ab="ge-flow-animation-"+Editor.guid();var bb=null!=sb.createElementNS?sb.createElementNS(mxConstants.NS_SVG,"style"):sb.createElement("style");bb.innerHTML=this.createFlowAnimationCss(Ab);sb.getElementsByTagName("defs")[0].appendChild(bb)}return Ab});+xa.drawCellState=function(bb,yb){for(var tb=bb.view.graph,xb=null!=Qa?Qa.get(bb.cell):tb.isCellSelected(bb.cell),vb=tb.model.getParent(bb.cell);!(ka&&null==Qa||xb)&&null!=vb;)xb=null!=Qa?Qa.get(vb):tb.isCellSelected(vb),vb=tb.model.getParent(vb);if(null!=bb.shape)try{var rb=bb.shape.isFlowAnimationEnabled,Db=bb.shape.addFlowAnimationToShape;bb.shape.isFlowAnimationEnabled=function(){return gb&&tb.model.isEdge(bb.cell)&&"1"==mxUtils.getValue(bb.style,"flowAnimation","0")};bb.shape.addFlowAnimationToShape=+function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),bb.style,P,Bb())};if(ka&&null==Qa||xb)tb.view.redrawEnumerationState(bb),Cb.apply(this,arguments),this.doDrawShape(bb.secondLabel,yb)}finally{bb.shape.isFlowAnimationEnabled=rb,bb.shape.addFlowAnimationToShape=Db}};var wb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(wb),nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ra,!0);return pb}finally{this.enableFlowAnimation=+gb,Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=B.createElement("switch"),W=B.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||P.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"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);R.appendChild(W);ia.appendChild(B);R.appendChild(ia);P.appendChild(R)}};+Graph.prototype.disableSvgLinks=function(B,P){B=B.getElementsByTagName("a");for(var R=0;R<B.length;R++){var W=B[R].getAttribute("href");null==W&&(W=B[R].getAttribute("xlink:href"));null!=W&&(B[R].style.pointerEvents="none",B[R].setAttribute("href",""));P&&P(B[R])}};Graph.prototype.updateSvgLinks=function(B,P,R){B=B.getElementsByTagName("a");for(var W=0;W<B.length;W++)if(null==B[W].getAttribute("target")){var ia=B[W].getAttribute("href");null==ia&&(ia=B[W].getAttribute("xlink:href"));null!=ia&&(null!=+P&&/^https?:\/\//.test(ia)?B[W].setAttribute("target",P):R&&this.isCustomLink(ia)&&B[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var P=window.getSelection();P.getRangeAt&&P.rangeCount&&(B=P.getRangeAt(0).commonAncestorContainer)}else document.selection&&+(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,P,R){for(;null!=B&&B.nodeName!=P;){if(B==R)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,P,R){for(;null!=B&&!(0<=mxUtils.indexOf(P,B.nodeName));){if(B==R)return null;+B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var P=null;if(window.getSelection){if(P=window.getSelection(),P.getRangeAt&&P.rangeCount){var R=document.createRange();R.selectNode(B);P.removeAllRanges();P.addRange(R)}}else(P=document.selection)&&"Control"!=P.type&&(B=P.createRange(),B.collapse(!0),R=P.createRange(),R.setEndPoint("StartToStart",B),R.select())};Graph.prototype.flipEdgePoints=function(B,P,R){var W=this.getCellGeometry(B);if(null!=W){W=W.clone();if(null!=W.points)for(var ia=+0;ia<W.points.length;ia++)P?W.points[ia].x=R+(R-W.points[ia].x):W.points[ia].y=R+(R-W.points[ia].y);ia=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ia(W.getTerminalPoint(!0));ia(W.getTerminalPoint(!1));this.model.setGeometry(B,W)}};Graph.prototype.flipChildren=function(B,P,R){this.model.beginUpdate();try{for(var W=this.model.getChildCount(B),ia=0;ia<W;ia++){var ka=this.model.getChildAt(B,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=+pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,P){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var R=[],W=0;W<B.length;W++)if(this.model.isEdge(B[W])){var ia=this.view.getState(B[W]);null!=ia&&this.flipEdgePoints(B[W],P,(P?ia.getCenterX():ia.getCenterY())/this.view.scale-(P?ia.origin.x:ia.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=+this.getCellGeometry(B[W]);null!=ka&&this.flipChildren(B[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(B[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,P){var R=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var W=0;W<B.length;W++){var ia=this.model.getParent(B[W]);if(this.isTable(ia)){var ka=this.getCellGeometry(B[W]),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(B):null;this.removeCells(B,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};Graph.prototype.insertTableColumn=function(B,P){var R=this.getModel();R.beginUpdate();try{var W=B,ia=0;if(this.isTableCell(B)){var ka=R.getParent(B);W=R.getParent(ka);+ia=mxUtils.indexOf(R.getChildCells(ka,!0),B)}else this.isTableRow(B)?W=R.getParent(B):B=R.getChildCells(W,!0)[0],P||(ia=R.getChildCells(B,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=R.getChildCells(pa[B],!0)[ia],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ja=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ja){null!=Ja.alternateBounds&&(Ja.width=+Ja.alternateBounds.width,Ja.height=Ja.alternateBounds.height,Ja.alternateBounds=null);xa=Ja.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ja.height=Va.height)}R.add(pa[B],ua,ia+(P?0:1))}var Oa=this.getCellGeometry(W);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(W,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(B){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:P.getParent(B);var W=P.getChildCells(R,!0);0==+W.length?P.remove(R):(R==B&&(B=W[W.length-1]),P.remove(B))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(B,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){W=B;var ia=R.getChildCells(W,!0);B=ia[P?0:ia.length-1]}else W=R.getParent(B);var ka=W.getIndex(B);B=R.cloneCell(B,!1);B.value=null;R.add(W,B,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(B,P){var R=this.getModel();R.beginUpdate();try{var W=+B,ia=B;if(this.isTableCell(B))ia=R.getParent(B),W=R.getParent(ia);else if(this.isTableRow(B))W=R.getParent(B);else{var ka=R.getChildCells(W,!0);ia=ka[P?0:ka.length-1]}var pa=R.getChildCells(ia,!0),xa=W.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ka=0;ka<pa.length;ka++){B=R.cloneCell(pa[ka],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&+(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}R.add(W,ia,xa+(P?0:1));var Ja=this.getCellGeometry(W);null!=Ja&&(Ja=Ja.clone(),Ja.height+=ra.height,R.setGeometry(W,Ja))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var P=this.getModel();P.beginUpdate();try{var R=B,W=B;this.isTableCell(B)&&(W=P.getParent(B));this.isTableRow(W)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(0==ia.length)P.remove(R);+else{this.isTableRow(W)||(W=ia[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ka,B));for(W=B=0;W<ia.length;W++){var xa=P.getChildCells(ia[W],!0)[pa];P.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=B,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var P=this.getModel();P.beginUpdate();+try{var R=B,W=B;this.isTableCell(B)&&(B=W=P.getParent(B));this.isTableRow(B)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(1>=ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[ia.length-1]);P.remove(W);B=0;var ka=this.getCellGeometry(W);null!=ka&&(B=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=B,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(B,P){for(var R=B.tBodies[0],W=R.rows[0].cells,ia=B=0;ia<W.length;ia++){var ka=W[ia].getAttribute("colspan");+B+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ia=0;ia<B;ia++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(B,P){B.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(B,P){var R=B.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ia=document.createElement("th");R.rows[W].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(R=0;R<B.rows.length;R++)W=B.rows[R].insertCell(P),mxUtils.br(W);return B.rows[0].cells[0<=P?P:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=+function(B,P){if(0<=P){B=B.tBodies[0].rows;for(var R=0;R<B.length;R++)B[R].cells.length>P&&B[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");R.innerHTML=B;B=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=B.appendChild(W);P.insertNode(B)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(B)};+Graph.prototype.createLinkForHint=function(B,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}B=null!=B?B:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",W(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&+ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,W(P,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(B,R);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 B=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=+B.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 P=!1,R=!1,W=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,+pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=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||+!W&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||P&&this.isCellSelected(pa.getCell())));xa=!P||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};+mxCellEditor.prototype.isContentEditing=function(){var B=this.graph.view.getState(this.editingCell);return null!=B&&1==B.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var B="";window.getSelection?B=window.getSelection():document.getSelection?B=document.getSelection():document.selection&&(B=document.selection.createRange().text);return""!=+B};mxCellEditor.prototype.insertTab=function(B){var P=this.textarea.ownerDocument.defaultView.getSelection(),R=P.getRangeAt(0);B=Graph.createTabNode(B);R.insertNode(B);R.setStartAfter(B);R.setEndAfter(B);P.removeAllRanges();P.addRange(R)};mxCellEditor.prototype.alignText=function(B,P){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ia=null!=+P&&mxEvent.isShiftDown(P);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(B)}W||document.execCommand("justify"+B.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var B=window.getSelection();if(B.getRangeAt&&B.rangeCount){for(var P=+[],R=0,W=B.rangeCount;R<W;++R)P.push(B.getRangeAt(R));return P}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var P=0,R=B.length;P<R;++P)sel.addRange(B[P])}else document.selection&&B.select&&B.select()}catch(W){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=+function(B){null!=B.text&&(B.text.replaceLinefeeds="0"!=mxUtils.getValue(B.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(B,P){this.isKeepFocusEvent(B)||!mxEvent.isAltDown(B.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(B){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;+mxCellEditor.prototype.startEditing=function(B,P){B=this.graph.getStartEditingCell(B,P);M.apply(this,arguments);var R=this.graph.view.getState(B);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);+if(null!=B){var P=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),R=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(P?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);+P=mxUtils.getValue(B.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&+pa.push("underline");(mxUtils.getValue(B.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(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=+P;this.textarea.style.textAlign=W;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(P?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;+this.textarea.style.fontSize=Math.round(ra)+"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=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,P){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var R=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var W=null!=B.text?B.text.margin:null;null==W&&(W=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,+mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=W.x*this.bounds.width;this.bounds.y+=W.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*R);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("+R+","++R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,P){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(B.cell,P);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;+mxCellEditor.prototype.setEditingValue=function(B,P){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(B.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(B){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,+Graph.backupStyleAttribute);var P=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(B.style,"nl2Br","1")?(P=P.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<P.length&&("<br/>"==P.substring(P.length-5)||"<br>"==P.substring(P.length-4))&&(P=P.substring(0,P.lastIndexOf("<br"))+"<div><br/></div>")):P=P.replace(/\r\n/g,"").replace(/\n/g,"");return P};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(B){this.codeViewMode&&this.toggleViewMode();K.apply(this,+arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var aa=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(B,P){this.graph.getModel().beginUpdate();try{aa.apply(this,arguments),""==P&&this.graph.isCellDeletable(B.cell)&&0==this.graph.model.getChildCount(B.cell)&&this.graph.isTransparentState(B)&&this.graph.removeCells([B.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=+function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getBorderColor=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getMinimumSize=function(B){var P=this.graph.getView().scale;return new mxRectangle(0,0,null==B.text?30:B.text.size*P+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;+mxGraphHandler.prototype.isValidDropTarget=function(B,P){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(P.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var P=this.graph.view.translate,R=this.graph.view.scale;B=this.roundLength((this.bounds.x++this.currentDx)/R-P.x);P=this.roundLength((this.bounds.y+this.currentDy)/R-P.y);R=this.graph.view.unit;this.hint.innerHTML=f(B,R)+", "+f(P,R);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 ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,P){ja.apply(this,arguments);var R=this.graph.getCellStyle(B);if(null==R.childLayout){var W=this.graph.model.getParent(B),ia=null!=W?this.graph.getCellGeometry(W):null;if(null!=ia&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);+ia=ia.clone();R?ia.height=P.height+pa.y+pa.height+2*ka:ia.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var P=ca.apply(this,arguments),R=new mxDictionary,W=this.graph.model,ia=[],ka=0;ka<P.length;ka++){var pa=P[ka];this.graph.isTableCell(pa)?B(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&+B(W.getParent(pa));B(pa)}return ia};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(B){return ba.apply(this,arguments)&&!mxEvent.isControlDown(B.getEvent())&&!mxEvent.isShiftDown(B.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.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 Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(B){var P=Y.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var da=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(B){var P=da.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=+function(){var B=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+B.x/2,this.bounds.y+this.rotationHandleVSpacing-B.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(B,P){return this.graph.isRecursiveVertexResize(B)&&!mxEvent.isAltDown(P.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(B,P){return mxEvent.isControlDown(P.getEvent())||mxEvent.isMetaDown(P.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;+mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 Z=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=+function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(B){return B.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var B=0;this.graph.isTableRow(this.state.cell)?B=1:this.graph.isTableCell(this.state.cell)&&+(B=2);return B};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,O=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var B=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(Za,+Pa,Qa){for(var gb=[],fb=0;fb<Za.length;fb++){var cb=Za[fb];gb.push(null==cb?null:new mxPoint((ra+cb.x+Pa)*ka,(ua+cb.y+Qa)*ka))}return gb},R=this,W=this.graph,ia=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+W.view.translate.x,ua=this.state.origin.y+W.view.translate.y;null==B&&(B=[]);var Ja=W.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ja.length){var Va=ia.getChildCells(Ja[0].cell,!0),Oa=W.getTableLines(this.state.cell,!1,!0),Sa=W.getTableLines(this.state.cell,+!0,!1);for(ia=0;ia<Ja.length;ia++)mxUtils.bind(this,function(Za){var Pa=Ja[Za],Qa=null;if(W.isCellMovable(Pa.cell)){Qa=Za<Ja.length-1?Ja[Za+1]:null;Qa=null!=Qa?W.getCellGeometry(Qa.cell):null;var gb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Sa[Za]?new J(Sa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Qa=new mxHandle(Pa,"row-resize",null,Qa);Qa.tableHandle=!0;var fb=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==fb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Sa[Za],0,fb),this.shape.updateBoundsFromLine();else{var eb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+fb*ka;this.shape.bounds.x=pa.x+(Za==Ja.length-1?0:eb.x*ka);this.shape.bounds.width=pa.width-(Za==Ja.length-1?0:eb.width+eb.x+ka)}this.shape.redraw()}};var cb=+!1;Qa.setPosition=function(eb,lb,kb){fb=Math.max(Graph.minTableRowHeight-eb.height,lb.y-eb.y-eb.height);cb=mxEvent.isShiftDown(kb.getEvent());null!=gb&&cb&&(fb=Math.min(fb,gb.height-Graph.minTableRowHeight))};Qa.execute=function(eb){if(0!=fb)W.setTableRowHeight(this.state.cell,fb,!cb);else if(!R.blockDelayedSelection){var lb=W.getCellAt(eb.getGraphX(),eb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Qa.reset=function(){fb=0}}B.push(Qa)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,+function(Za){var Pa=W.view.getState(Va[Za]),Qa=W.getCellGeometry(Va[Za]),gb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Pa&&(Pa=new mxCellState(W.view,Va[Za],W.getCellStyle(Va[Za])),Pa.x=pa.x+Qa.x*ka,Pa.y=pa.y+Qa.y*ka,Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Qa=Za<Va.length-1?Va[Za+1]:null;Qa=null!=Qa?W.getCellGeometry(Qa):null;var fb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Oa[Za]?new J(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,+mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Qa);Pa.tableHandle=!0;var cb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Oa[Za],cb,0),this.shape.updateBoundsFromLine();else{var lb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=+this.state.x+(gb.width+cb)*ka;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:lb.y*ka);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(lb.height+lb.y)*ka)}this.shape.redraw()}};var eb=!1;Pa.setPosition=function(lb,kb,ob){cb=Math.max(Graph.minTableColumnWidth-gb.width,kb.x-lb.x-gb.width);eb=mxEvent.isShiftDown(ob.getEvent());null==fb||eb||(cb=Math.min(cb,fb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=+W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};B.push(Pa)})(ia)}}return null!=B?B.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=0;P<this.moveHandles.length;P++)null!=this.moveHandles[P]&&(this.moveHandles[P].node.style.visibility=B?"":"hidden");if(null!=this.cornerHandles)for(P=+0;P<this.cornerHandles.length;P++)this.cornerHandles[P].node.style.visibility=B?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var B=this.isMoveHandlesVisible();B&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():B||null==this.moveHandles||this.destroyMoveHandles();if(B&&null==this.moveHandles){for(B=0;B<this.moveHandles.length;B++)null!=+this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,P=B.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ia){if(null!=ia&&P.isVertex(ia.cell)&&B.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))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(P.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=+this.moveHandles){for(var B=0;B<this.moveHandles.length;B++)null!=this.moveHandles[B]&&this.moveHandles[B].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var B=0;B<this.cornerHandles.length;B++)null!=this.cornerHandles[B]&&null!=this.cornerHandles[B].node&&null!=this.cornerHandles[B].node.parentNode&&this.cornerHandles[B].node.parentNode.removeChild(this.cornerHandles[B].node);this.cornerHandles=null}};var V=mxVertexHandler.prototype.refresh;+mxVertexHandler.prototype.refresh=function(){V.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 B=0;4>B;B++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",+mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(B,P)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;+null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ia=this.customHandles[W].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){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),B.x=this.sizers[0].bounds.width+P,B.y=this.sizers[0].bounds.height+P):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){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{B=this.state.view.scale;var P=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/B),P)+" x "+f(this.roundLength(this.bounds.height/B),P)}B=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==B&&(B=this.bounds);this.hint.style.left=B.x+Math.round((B.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=+B.y+B.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 X=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){X.apply(this,arguments);var B=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);this.updateLinkHint(B,P)};var fa=mxEdgeHandler.prototype.mouseMove;+mxEdgeHandler.prototype.mouseMove=function(B,P){fa.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 na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(B,P){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=+function(B,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(P.x/ia-W.x);W=this.roundLength(P.y/ia-W.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=+this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),P.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="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24);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="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxVertexHandler.prototype.rowHandleImage=Graph.createSvgImage(14,12,'<rect x="2" y="2" width="10" height="3" stroke-width="1" stroke="#ffffff" fill="'+HoverIcons.prototype.arrowFill+'"/><rect x="2" y="7" width="10" height="3" stroke-width="1" stroke="#ffffff" fill="'+HoverIcons.prototype.arrowFill+'"/>');mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=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=32;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(C){return!mxEvent.isShiftDown(C.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(C){return!mxEvent.isShiftDown(C.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(C){return mxEvent.isMouseEvent(C.getEvent())?-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(P)||mxEvent.isPopupTrigger(P)&&(null==C.getState()||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P))}}else mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return mxEvent.isLeftMouseButton(P)&&(this.useLeftButtonForPanning&&null==C.getState()||mxEvent.isControlDown(P)&&!mxEvent.isShiftDown(P))||this.usePopupTrigger&&mxEvent.isPopupTrigger(P)};-mxRubberband.prototype.isSpaceEvent=function(C){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(C.getEvent())||mxEvent.isMetaDown(C.getEvent()))&&mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(C,P){if(this.cancelled)this.cancelled=!1,P.consume();else{var R=-null!=this.div&&"none"!=this.div.style.display,W=null,ia=null,ka=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ia=this.first.y,C=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(C=this.graph.snap(C),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();-try{var pa=this.graph.getCellsBeyond(W,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ta=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(C,ka),this.graph.model.setGeometry(pa[R],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(C,-P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-C,ia=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(P)?(C=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||-(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,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=C-this.width),this.y<this.first.y&&(this.y=R-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(B){return!mxEvent.isShiftDown(B.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(B){return!mxEvent.isShiftDown(B.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(B){return mxEvent.isMouseEvent(B.getEvent())?+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(B){var P=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(P)||mxEvent.isPopupTrigger(P)&&(null==B.getState()||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P))}}else mxPanningHandler.prototype.isPanningTrigger=function(B){var P=B.getEvent();return mxEvent.isLeftMouseButton(P)&&(this.useLeftButtonForPanning&&null==B.getState()||mxEvent.isControlDown(P)&&!mxEvent.isShiftDown(P))||this.usePopupTrigger&&mxEvent.isPopupTrigger(P)};+mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,P){if(this.cancelled)this.cancelled=!1,P.consume();else{var R=+null!=this.div&&"none"!=this.div.style.display,W=null,ia=null,ka=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ia=this.first.y,B=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(B=this.graph.snap(B),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();+try{var pa=this.graph.getCellsBeyond(W,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ka),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(B,+P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);R.x-=B.x;R.y-=B.y;B=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-B,ia=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,R),this.isSpaceEvent(P)?(B=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||+(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,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=B-this.width),this.y<this.first.y&&(this.y=R-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)),P.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=-function(C,P,R,W){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(C){return mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())?!1:null!=this.currentTerminalState&&C.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(C,P,R){P=null!=C&&0==C;var W=this.state.getVisibleTerminalState(P);C=null!=C&&null!=this.state.absolutePoints&&(0==C||C>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==C)?this.graph.getConnectionConstraint(this.state,W,P):null;R=null!=(null!=C?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(P),C):null)?R?this.endFixedHandleImage:this.fixedHandleImage:-null!=C&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(C,P,R,W){W=P==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:P==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(C){if(null!=C&&1==C.length){var P=this.graph.getModel(),R=P.getParent(C[0]),W=this.graph.getCellGeometry(C[0]);if(P.isEdge(R)&&null!=W&&W.relative&&(P=this.graph.view.getState(C[0]),null!=P&&2>P.width&&2>P.height&&null!=P.text&&null!=P.text.boundingBox))return mxRectangle.fromRectangle(P.text.boundingBox)}return Ba.apply(this,-arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var C=Ga.apply(this,arguments),P=[],R=0;R<C.length;R++)"1"!=mxUtils.getValue(C[R].style,"part","0")&&P.push(C[R]);return P};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(C){var P=this.graph.getModel(),R=P.getParent(C.cell),W=this.graph.getCellGeometry(C.cell);return P.isEdge(R)&&null!=W&&W.relative&&2>C.width&&2>C.height&&null!=-C.text&&null!=C.text.boundingBox?(P=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var ra=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ia||!ia.relative||null==this.state||-2<=this.state.width||2<=this.state.height)&&ra.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var C=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),P=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&C==mxConstants.NONE&&P==mxConstants.NONE?(C=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,-C,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(C,P){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 Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=-function(C,P){Da.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(C,P){try{if(null==C&&(null==P||0==P.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),-this.linkHint=null);else if(null!=C||null!=P&&0<P.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-W.style.paddingLeft="4px";W.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!=C){var ia=document.createElement("div");-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(C,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=R.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=W.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!=P)for(ia=0;ia<P.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!=C||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ia=R.cloneNode(!0);ua.appendChild(Ia);var Va=mxUtils.bind(this,function(Wa){var Ta=-document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Ta.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,Ta.innerHTML)}});mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Va);mxEvent.consume(Wa)}));Ia=W.cloneNode(!0);ua.appendChild(Ia);mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){Va();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(P[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,-arguments);C.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return C};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var C=0;C<this.moveHandles.length;C++)null!=-this.moveHandles[C]&&(this.moveHandles[C].bounds.x=Math.round(this.moveHandles[C].rowState.x+this.moveHandles[C].rowState.width-this.moveHandles[C].bounds.width/2),this.moveHandles[C].bounds.y=Math.round(this.moveHandles[C].rowState.y+(this.moveHandles[C].rowState.height-this.moveHandles[C].bounds.height)/2),this.moveHandles[C].redraw());if(null!=this.cornerHandles){C=this.getSelectionBorderInset();var P=this.cornerHandles,R=P[0].bounds.height/2;P[0].bounds.x=this.state.x-P[0].bounds.width/2+C;P[0].bounds.y=-this.state.y-R+C;P[0].redraw();P[1].bounds.x=P[0].bounds.x+this.state.width-2*C;P[1].bounds.y=P[0].bounds.y;P[1].redraw();P[2].bounds.x=P[0].bounds.x;P[2].bounds.y=this.state.y+this.state.height-2*C;P[2].redraw();P[3].bounds.x=P[1].bounds.x;P[3].bounds.y=P[2].bounds.y;P[3].redraw();for(C=0;C<this.cornerHandles.length;C++)this.cornerHandles[C].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":"");Oa.apply(this);null!=this.state&&null!=this.linkHint&&(C=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),P=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(P,this.state.style[mxConstants.STYLE_ROTATION]||"0",C),C=null!=R?mxUtils.getBoundingBox(this.state,-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,P=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=P&&(R=Math.max(R,P.y+P.height)),this.linkHint.style.left=C.x+C.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Qa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Qa.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 Ra=mxEdgeHandler.prototype.redrawHandles;-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ra.apply(this),null!=this.state&&null!=this.linkHint)){var C=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(C=new mxRectangle(C.x,C.y,C.width,C.height),C.add(this.state.text.bounds));this.linkHint.style.left=C.x+C.width/2+"px";this.linkHint.style.top=Math.round(C.y+C.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.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,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function E(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function c(){mxShape.call(this)}+function(B,P,R,W){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,P,R){P=null!=B&&0==B;var W=this.state.getVisibleTerminalState(P);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,W,P):null;R=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(P),B):null)?R?this.endFixedHandleImage:this.fixedHandleImage:+null!=B&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,P,R,W){W=P==mxEvent.ROTATION_HANDLE?+HoverIcons.prototype.rotationHandle:P==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var P=this.graph.getModel(),R=P.getParent(B[0]),W=this.graph.getCellGeometry(B[0]);if(P.isEdge(R)&&null!=W&&W.relative&&(P=this.graph.view.getState(B[0]),null!=P&&2>P.width&&2>P.height&&null!=P.text&&null!=P.text.boundingBox))return mxRectangle.fromRectangle(P.text.boundingBox)}return Ba.apply(this,+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),P=[],R=0;R<B.length;R++)"1"!=mxUtils.getValue(B[R].style,"part","0")&&P.push(B[R]);return P};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var P=this.graph.getModel(),R=P.getParent(B.cell),W=this.graph.getCellGeometry(B.cell);return P.isEdge(R)&&null!=W&&W.relative&&2>B.width&&2>B.height&&null!=+B.text&&null!=B.text.boundingBox?(P=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ia||!ia.relative||null==this.state||+2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var B=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),P=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&B==mxConstants.NONE&&P==mxConstants.NONE?(B=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,+B,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(B,P){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 Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=+function(B,P){Da.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(B,P){try{if(null==B&&(null==P||0==P.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),+this.linkHint=null);else if(null!=B||null!=P&&0<P.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));+W.style.paddingLeft="4px";W.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!=B){var ia=document.createElement("div");+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,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=R.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=W.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!=P)for(ia=0;ia<P.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ja=R.cloneNode(!0);ua.appendChild(Ja);var Va=mxUtils.bind(this,function(Oa){var Sa=+document.createElement("div");Sa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Za=Sa.getElementsByTagName("a")[ra];if(null!=Za){if(null==Oa||""==Oa){for(Oa=Za.cloneNode(!0).firstChild;null!=Oa;)Za.parentNode.insertBefore(Oa.cloneNode(!0),Za),Oa=Oa.nextSibling;Za.parentNode.removeChild(Za)}else Za.setAttribute("href",Oa);this.graph.labelChanged(this.state.cell,Sa.innerHTML)}});mxEvent.addListener(Ja,"click",mxUtils.bind(this,function(Oa){this.graph.showLinkDialog(xa.getAttribute("href")||+"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ja=W.cloneNode(!0);ua.appendChild(Ja);mxEvent.addListener(Ja,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(P[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var B=va.apply(this,+arguments);B.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return B};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.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 B=0;B<this.moveHandles.length;B++)null!=+this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var P=this.cornerHandles,R=P[0].bounds.height/2;P[0].bounds.x=this.state.x-P[0].bounds.width/2+B;P[0].bounds.y=+this.state.y-R+B;P[0].redraw();P[1].bounds.x=P[0].bounds.x+this.state.width-2*B;P[1].bounds.y=P[0].bounds.y;P[1].redraw();P[2].bounds.x=P[0].bounds.x;P[2].bounds.y=this.state.y+this.state.height-2*B;P[2].redraw();P[3].bounds.x=P[1].bounds.x;P[3].bounds.y=P[2].bounds.y;P[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].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&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),P=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(P,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=R?mxUtils.getBoundingBox(this.state,+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,P=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=P&&(R=Math.max(R,P.y+P.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ta=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ta.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 Ua=mxEdgeHandler.prototype.redrawHandles;+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ua.apply(this),null!=this.state&&null!=this.linkHint)){var B=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(B=new mxRectangle(B.x,B.y,B.width,B.height),B.add(this.state.text.bounds));this.linkHint.style.left=B.x+B.width/2+"px";this.linkHint.style.top=Math.round(B.y+B.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=+function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.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,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function E(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function c(){mxShape.call(this)}function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function I(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function Y(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}-function U(){mxShape.call(this)}function X(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Oa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){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 ua(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function ab(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=-!0;this.indent=2;this.rectOutline="single"}function Sa(){mxConnector.call(this)}function gb(){mxConnector.call(this)}function fb(d,p,A,t,z,D,G,ea,O,sa){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=D*(2*G+O);z*=G+O;D*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-D-G,2*G,2*G);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function Y(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function O(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}+function U(){mxShape.call(this)}function X(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Ua(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ia(){mxEllipse.call(this)}+function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ja(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function gb(){mxConnector.call(this)}function fb(d,p,A,t,z,D,G,ea,N,ta){G+=N;var ma=t.clone();t.x-=z*(2*G+N);t.y-=D*(2*G+N);z*=G+N;D*=G+N;return function(){d.ellipse(ma.x-z-G,ma.y-D-G,2*G,2*G);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var D=0;D<p.length;D++){var G=p[D];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var A=null,t=0;t<this.line.length&&!p;t++){var z=this.line[t];null!=z&&null!=A&&(p=mxUtils.rectangleIntersectsSegment(d,A,z));A=z}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(f,mxSwimlane);f.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};f.prototype.paintVertexShape=function(d,p,A,t,z){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,G=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ia.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));D||this.outline||!(G&&ea<z||!G&&ea<t)||this.paintForeground(d,p,A,t,z)};f.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.state){var D=this.flipH,G=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=D;D=G;G=ea}d.rotate(-this.getShapeRotation(),+!1,G=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ja.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));D||this.outline||!(G&&ea<z||!G&&ea<t)||this.paintForeground(d,p,A,t,z)};f.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.state){var D=this.flipH,G=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=D;D=G;G=ea}d.rotate(-this.getShapeRotation(),D,G,p+t/2,A+z/2);s=this.scale;p=this.bounds.x/s;A=this.bounds.y/s;t=this.bounds.width/s;z=this.bounds.height/s;this.paintTableForeground(d,p,A,t,z)}};f.prototype.paintTableForeground=function(d,p,A,t,z){t=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(z=0;z<t.length;z++)b.prototype.paintTableLine(d,t[z],p,A)};f.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",f);mxUtils.extend(l,f);l.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",l);mxUtils.extend(u,mxCylinder);u.prototype.size=20;u.prototype.darkOpacity=0;u.prototype.darkOpacity2=0;u.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-D,0);d.lineTo(t,D);d.lineTo(t,z);d.lineTo(D,z);d.lineTo(0,z-D);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(t-D,0),d.lineTo(t,D),d.lineTo(D,D),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,z),d.lineTo(0,z-D),d.close(),d.fill()),d.begin(),d.moveTo(D,z),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(t,D),d.end(),d.stroke())};u.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",-u);var cb=Math.tan(mxUtils.toRadians(30)),eb=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!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,+u);var cb=Math.tan(mxUtils.toRadians(30)),eb=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!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!=A&&A();null!=t&&t()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,t,z){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(t-D),A+.5*(z-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};mxCellRenderer.registerShape("waypoint",-q);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/cb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*eb);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-eb)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,p,A,t,z,D){p=Math.min(t,z/(.5+cb));D?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-eb)*p),d.lineTo(p,.25*p),d.moveTo(.5*+q);mxUtils.extend(C,mxActor);C.prototype.size=20;C.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/cb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*eb);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-eb)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,p,A,t,z,D){p=Math.min(t,z/(.5+cb));D?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-eb)*p),d.lineTo(p,.25*p),d.moveTo(.5*p,(.5-eb)*p),d.lineTo(.5*p,(1-eb)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*eb),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-eb)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,t,z,D){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),D||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),D||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),D||(d.stroke(),d.begin()),d.translate(0,-p);D||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),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(E,mxCylinder);E.prototype.size=30;E.prototype.darkOpacity=0;E.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-D,0);d.lineTo(t,D);d.lineTo(t,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),@@ -2770,8 +2770,8 @@ c);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=fut,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"lid",!0);d.translate(p,A);0==D?(d.rect(0,0,t,z),d.fillAndStroke()):(d.begin(),G?(d.moveTo(0,D),d.arcTo(.5*t,D,0,0,1,.5*t,0),d.arcTo(.5*t,D,0,0,1,t,D)):(d.moveTo(0,0),d.arcTo(.5*t,D,0,0,0,.5*t,D),d.arcTo(.5*t,D,0,0,0,t,0)),d.lineTo(t,z-D),d.arcTo(.5*t,D,0,0,1,.5*t,z),d.arcTo(.5*t,D,0,0,1,0,z-D),d.close(),d.fillAndStroke(),d.setShadow(!1),G&&(d.begin(),d.moveTo(t,D),d.arcTo(.5*t,D,0,0,1,.5*t,2*D),d.arcTo(.5*t,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t/2,.5*z,t,0);d.quadTo(.5*t,z/2,t,z);d.quadTo(t/2,.5*z,0,z);d.quadTo(.5*t,z/2,0,0);d.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(x,mxCylinder);x.prototype.tabWidth=60;x.prototype.tabHeight=20;x.prototype.tabPosition="right";x.prototype.arcSize=.1;x.prototype.isRoundable=function(){return!0};x.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),G=mxUtils.getValue(this.style,-"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),O=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(O*=Math.min(t,z));O=Math.min(O,.5*t,.5*(z-A));p=Math.max(p,O);p=Math.min(t-O,p);G||(O=0);d.begin();"left"==D?(d.moveTo(Math.max(O,0),A),d.lineTo(Math.max(O,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(t-p,A),d.lineTo(t-p,0),d.lineTo(t-Math.max(O,0),0),d.lineTo(t-Math.max(O,0),A));G?(d.moveTo(0,O+A),d.arcTo(O,O,0,0,1,O,A),d.lineTo(t-O,A),d.arcTo(O,O,0,0,1,t,O+A),-d.lineTo(t,z-O),d.arcTo(O,O,0,0,1,t-O,z),d.lineTo(O,z),d.arcTo(O,O,0,0,1,0,z-O)):(d.moveTo(0,A),d.lineTo(t,A),d.lineTo(t,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(t-30,A+20),d.lineTo(t-20,A+10),d.lineTo(t-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,+"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),N=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(N*=Math.min(t,z));N=Math.min(N,.5*t,.5*(z-A));p=Math.max(p,N);p=Math.min(t-N,p);G||(N=0);d.begin();"left"==D?(d.moveTo(Math.max(N,0),A),d.lineTo(Math.max(N,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(t-p,A),d.lineTo(t-p,0),d.lineTo(t-Math.max(N,0),0),d.lineTo(t-Math.max(N,0),A));G?(d.moveTo(0,N+A),d.arcTo(N,N,0,0,1,N,A),d.lineTo(t-N,A),d.arcTo(N,N,0,0,1,t,N+A),+d.lineTo(t,z-N),d.arcTo(N,N,0,0,1,t-N,z),d.lineTo(N,z),d.arcTo(N,N,0,0,1,0,z-N)):(d.moveTo(0,A),d.lineTo(t,A),d.lineTo(t,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(t-30,A+20),d.lineTo(t-20,A+10),d.lineTo(t-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var t=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));z||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-p));t||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,D,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);var D=mxUtils.getValue(this.style,"rounded",!1),G=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));A=mxUtils.getValue(this.style,"umlStateConnection",null);G||(p*=Math.min(t,z));p=Math.min(p,.5*t,.5*z);D||(p=0);D=0;null!=A&&(D=10);d.begin();d.moveTo(D,p);d.arcTo(p,p,0,0,1,D+p,0);d.lineTo(t-p,0);d.arcTo(p,p,0,0,1,t,p);d.lineTo(t,z-p);d.arcTo(p,p,0,0,1,t-p,z);d.lineTo(D+p,z);d.arcTo(p,p,0,0,1,D,z-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(t-40,z-20,10,10,3,3),d.stroke(),d.roundrect(t-20,z-20,10,10,@@ -2789,8 +2789,8 @@ mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.snew mxPoint(t,z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",aa);mxUtils.extend(ja,mxActor);ja.prototype.size=.5;ja.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,z)],this.isRounded,A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ja);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ca);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.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)};ba.prototype.quadTo=function(d,p,A,t){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=t};ba.prototype.curveTo=function(d,p,A,t,z,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=D};ba.prototype.arcTo=function(d,p,A,t,z,D,G){this.originalArcTo.apply(this.canvas,-arguments);this.lastX=D;this.lastY=G};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),D=Math.sqrt(t*t+z*z);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(D/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var O=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=D;z/=D;for(D=0;D<G;D++){var sa=(Math.random()--.5)*ea;this.originalLineTo.call(this.canvas,O*D+this.lastX-sa*z,A*D+this.lastY-sa*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.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 kb=mxShape.prototype.beforePaint;+arguments);this.lastX=D;this.lastY=G};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),D=Math.sqrt(t*t+z*z);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(D/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var N=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=D;z/=D;for(D=0;D<G;D++){var ta=(Math.random()-+.5)*ea;this.originalLineTo.call(this.canvas,N*D+this.lastX-ta*z,A*D+this.lastY-ta*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.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 kb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){kb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var ob=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){ob.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ba(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 hb=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"))&&hb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,A,t,z){if(null==d.handJiggle||d.handJiggle.constructor!=ba)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(t/2,Math.min(z/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,@@ -2806,143 +2806,143 @@ da);mxUtils.extend(ha,mxActor);ha.prototype.size=.2;ha.prototype.fixedSize=20;haA+z-D);d.moveTo(p+D,A+z/2);d.lineTo(p+t-D,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var sb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=function(d,p,A,t,z){sb.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);p+=D;A+=D;t-=2*D;z-=2*D;0<t&&0<z&&(d.setShadow(!1),sb.apply(this,[d,p,A,t,z]))}};mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};v.prototype.paintForeground=function(d,p,A,t,z){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);p+=D;A+=D;t-=2*D;z-=2*D;0<t&&0<z&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var G=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=G){var ea=this.style["symbol"+D+"Align"],-O=this.style["symbol"+D+"VerticalAlign"],sa=this.style["symbol"+D+"Width"],ma=this.style["symbol"+D+"Height"],$a=this.style["symbol"+D+"Spacing"]||0,jb=this.style["symbol"+D+"VSpacing"]||$a,db=this.style["symbol"+D+"ArcSpacing"];null!=db&&(db*=this.getArcSize(t+this.strokewidth,z+this.strokewidth),$a+=db,jb+=db);db=p;var Fa=A;db=ea==mxConstants.ALIGN_CENTER?db+(t-sa)/2:ea==mxConstants.ALIGN_RIGHT?db+(t-sa-$a):db+$a;Fa=O==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:O==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-jb):-Fa+jb;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,db,Fa,sa,ma);d.restore()}D++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,t,z,D){D?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(N,mxShape);N.prototype.paintBackground=-function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();+N=this.style["symbol"+D+"VerticalAlign"],ta=this.style["symbol"+D+"Width"],ma=this.style["symbol"+D+"Height"],ab=this.style["symbol"+D+"Spacing"]||0,jb=this.style["symbol"+D+"VSpacing"]||ab,db=this.style["symbol"+D+"ArcSpacing"];null!=db&&(db*=this.getArcSize(t+this.strokewidth,z+this.strokewidth),ab+=db,jb+=db);db=p;var Fa=A;db=ea==mxConstants.ALIGN_CENTER?db+(t-ta)/2:ea==mxConstants.ALIGN_RIGHT?db+(t-ta-ab):db+ab;Fa=N==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:N==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-jb):+Fa+jb;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,db,Fa,ta,ma);d.restore()}D++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,t,z,D){D?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(O,mxShape);O.prototype.paintBackground=+function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",O);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(t/6,z/2);d.end();d.stroke();d.ellipse(t/6,0,5*t/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/8,A+z);d.lineTo(p+7*t/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",V);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(X,mxShape);X.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};X.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};X.prototype.paintForeground=function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",X);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=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,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"participant");null==G||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,t,D):(G=this.state.view.graph.cellRenderer.getShape(G),null!=G&&G!=fa&&(G=new G,G.apply(this.state),d.save(),G.paintVertexShape(d,p,A,t,D),d.restore()));D<z&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+t/2,A+D),d.lineTo(p+t/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,t,Math.min(z,D))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(na,mxShape);na.prototype.width=60;na.prototype.height=30;na.prototype.corner=10;na.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};na.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))};na.prototype.paintBackground=function(d,p,A,t,z){var D=this.corner,G=Math.min(t,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",-this.width)))),ea=Math.min(z,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),O=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);O!=mxConstants.NONE&&(d.setFillColor(O),d.rect(p,A,t,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,t,z),d.setGradient(this.fill,this.gradient,p,A,t,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;+this.width)))),ea=Math.min(z,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),N=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);N!=mxConstants.NONE&&(d.setFillColor(N),d.rect(p,A,t,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,t,z),d.setGradient(this.fill,this.gradient,p,A,t,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,A);d.lineTo(p+G,A);d.lineTo(p+G,A+Math.max(0,ea-1.5*D));d.lineTo(p+Math.max(0,G-D),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+G,A);d.lineTo(p+t,A);d.lineTo(p+t,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",na);mxPerimeter.CenterPerimeter=function(d,p,A,t){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,t){t=fa.prototype.size;null!=p&&(t=mxUtils.getValue(p.style,"size",t)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+t,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,A,t){t=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,t){t=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(t+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(t=-1*(t+1)),new mxPoint(d.getCenterX()+t,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",da.prototype.size))*p.view.scale))),p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);-mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=-[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+sa),new mxPoint(G,ea+sa),new mxPoint(G+z,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=-function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,ea+sa),-new mxPoint(G,ea+sa),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+sa),new mxPoint(G+z,ea+sa),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(G+O,ea),new mxPoint(G+O,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,-D)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa-z),new mxPoint(G,ea+sa),new mxPoint(G,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?ha.prototype.fixedSize:ha.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,-"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+sa),new mxPoint(G,ea+sa),new mxPoint(G+z,d),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,-Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,d),new mxPoint(G+O,ea+sa),new mxPoint(G+z,ea+sa),new mxPoint(G,d),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa),new mxPoint(ma,ea+sa-z),new mxPoint(G,ea+sa),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),-ea=[new mxPoint(G,ea),new mxPoint(ma,ea+z),new mxPoint(G+O,ea),new mxPoint(G+O,ea+sa-z),new mxPoint(ma,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,-"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa-z),new mxPoint(ma,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea+z),new mxPoint(ma,ea)]):-(z=z?Math.max(0,Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+sa),new mxPoint(G+z,ea+sa),new mxPoint(G,d),new mxPoint(G+z,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,+mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=+[new mxPoint(G,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N,ea),new mxPoint(G+N-z,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+N?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=+function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(.5*N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N-z,ea),new mxPoint(G+N,ea+ta),+new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+N,ea),new mxPoint(G+N-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(G+N,ea),new mxPoint(G+N,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,+D)),ea=[new mxPoint(G,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta-z),new mxPoint(G,ea+ta),new mxPoint(G,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+N?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?ha.prototype.fixedSize:ha.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,+"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+N-z,ea),new mxPoint(G+N,d),new mxPoint(G+N-z,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,d),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,+Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N,ea),new mxPoint(G+N-z,d),new mxPoint(G+N,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(ma,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta),new mxPoint(ma,ea+ta-z),new mxPoint(G,ea+ta),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),+ea=[new mxPoint(G,ea),new mxPoint(ma,ea+z),new mxPoint(G+N,ea),new mxPoint(G+N,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+N?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,+"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=[new mxPoint(ma,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z),new mxPoint(ma,ea)]):+(z=z?Math.max(0,Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N-z,ea),new mxPoint(G+N,d),new mxPoint(G+N-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+N?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(p,A);d.ellipse((t-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(t/2,D);d.lineTo(t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size)),G=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.begin();d.moveTo(t/2,D+G);d.lineTo(t/2,z);d.end();d.stroke();d.begin();d.moveTo((t-D)/2-G,D/2);d.quadTo((t-D)/2-G,D+G,t/2,D+G);d.quadTo((t+D)/2+G,D+G,(t+D)/2+G,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(wa,mxShape);wa.prototype.inset=2;wa.prototype.paintBackground=function(d,-p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,D,t-2*D,z-2*D);d.fillAndStroke();d.begin();d.moveTo(t/2,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ja,mxCylinder);Ja.prototype.jettyWidth=20;Ja.prototype.jettyHeight=10;Ja.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));-p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=Math.min(p,z-p),O=Math.min(ea+2*p,z-p);D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",-Ja);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=.3*z-p/2,O=.7*z-p/2;D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,-z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,t,z){var D=t/2,G=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+D,A),new mxPoint(p+t,A+G),new mxPoint(p+D,A+z),new mxPoint(p,A+G)],this.isRounded,+p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,D,t-2*D,z-2*D);d.fillAndStroke();d.begin();d.moveTo(t/2,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=20;Ia.prototype.jettyHeight=10;Ia.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));+p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=Math.min(p,z-p),N=Math.min(ea+2*p,z-p);D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,N),d.lineTo(G,N),d.lineTo(G,N+p),d.lineTo(A,N+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,N+p),d.lineTo(0,N+p),d.lineTo(0,N),d.lineTo(A,N),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",+Ia);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=.3*z-p/2,N=.7*z-p/2;D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,N),d.lineTo(G,N),d.lineTo(G,N+p),d.lineTo(A,N+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,+z),d.lineTo(A,N+p),d.lineTo(0,N+p),d.lineTo(0,N),d.lineTo(A,N),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,t,z){var D=t/2,G=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+D,A),new mxPoint(p+t,A+G),new mxPoint(p+D,A+z),new mxPoint(p,A+G)],this.isRounded,ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.min(4,Math.min(t/5,z/5));0<t&&0<z&&(d.ellipse(p+D,A+D,t-2*D,z-2*D),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,A,t,z),d.stroke())};mxCellRenderer.registerShape("endState",Ga);mxUtils.extend(Ma,Ga);Ma.prototype.outerStroke=-!1;mxCellRenderer.registerShape("startState",Ma);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=4;ra.prototype.isOpenEnded=function(){return!0};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ra.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ra);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=+!1;mxCellRenderer.registerShape("startState",Ma);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(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(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(0,p),new mxPoint(t,0),new mxPoint(t,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(va,mxRectangleShape);va.prototype.dx=20;va.prototype.dy=20;va.prototype.isHtmlAllowed=function(){return!1};va.prototype.paintForeground=function(d,p,A,t,z){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(t*G,z*G))}G=Math.max(D,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,A+D);d.lineTo(p+t,A+D);d.end();d.stroke();d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",va);mxUtils.extend(Na,mxActor);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isRoundable=function(){return!0};Na.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,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(t,0),new mxPoint(t,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(t,0);d.lineTo(t,z);d.end();d.moveTo(0,z/2);d.lineTo(t,z/2);d.end()};mxCellRenderer.registerShape("crossbar",Oa);mxUtils.extend(Qa,mxActor);Qa.prototype.dx=20;Qa.prototype.dy=-20;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,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(t,0),new mxPoint(t,A),new mxPoint((t+p)/2,A),new mxPoint((t+-p)/2,z),new mxPoint((t-p)/2,z),new mxPoint((t-p)/2,A),new mxPoint(0,A)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Qa);mxUtils.extend(Ra,mxActor);Ra.prototype.arrowWidth=.3;Ra.prototype.arrowSize=.2;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));-A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(0,D)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ra);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,-"arrowWidth",Ra.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ra.prototype.arrowSize))));A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(p,D),new mxPoint(p,z)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",+mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(t,0);d.lineTo(t,z);d.end();d.moveTo(0,z/2);d.lineTo(t,z/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.dx=20;Ta.prototype.dy=+20;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,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(t,0),new mxPoint(t,A),new mxPoint((t+p)/2,A),new mxPoint((t++p)/2,z),new mxPoint((t-p)/2,z),new mxPoint((t-p)/2,A),new mxPoint(0,A)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Ta);mxUtils.extend(Ua,mxActor);Ua.prototype.arrowWidth=.3;Ua.prototype.arrowSize=.2;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));+A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(0,D)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ua);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowWidth",Ua.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ua.prototype.arrowSize))));A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(p,D),new mxPoint(p,z)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ea);-mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",C);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",P);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,+mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",P);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+-t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,p,A,t,z){var D=d.state.strokeWidth/2,G=10+2*D,ea=A+-z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea-G/2);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea+G/2);d.moveTo(p+D,ea);d.lineTo(p+t-D,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea-G/2);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ia,mxEllipse);Ia.prototype.drawHidden=!0;Ia.prototype.paintVertexShape=function(d,p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=-this.style){var D=d.pointerEvents,G=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||G||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),O="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||G||this.outline||ea||sa||ma||O?(d.rect(p,A,t,z),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),-d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+t,A):d.moveTo(p+t,A),this.outline||sa?d.lineTo(p+t,A+z):d.moveTo(p+t,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||O)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ia);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==-mxUtils.getValue(this.style,"line")?(d.moveTo(p+t/2,A),d.lineTo(p+t/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+t,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);d.moveTo(0,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=.2;Ta.prototype.redrawPath=function(d,p,-A,t,z){p=Math.min(z,t);var D=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-D)/2;A=p+D;var G=(t-D)/2;D=G+D;d.moveTo(0,p);d.lineTo(G,p);d.lineTo(G,0);d.lineTo(D,0);d.lineTo(D,p);d.lineTo(t,p);d.lineTo(t,A);d.lineTo(D,A);d.lineTo(D,z);d.lineTo(G,z);d.lineTo(G,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Ta);mxUtils.extend(ab,mxActor);ab.prototype.size=.25;ab.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);A=Math.min(t--p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*t);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},+t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,p,A,t,z){var D=d.state.strokeWidth/2,G=10+2*D,ea=A++z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea-G/2);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea+G/2);d.moveTo(p+D,ea);d.lineTo(p+t-D,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea-G/2);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ja,mxEllipse);Ja.prototype.drawHidden=!0;Ja.prototype.paintVertexShape=function(d,p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=+this.style){var D=d.pointerEvents,G=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||G||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),N="1"==mxUtils.getValue(this.style,"left","1"),ta="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||G||this.outline||ea||ta||ma||N?(d.rect(p,A,t,z),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),+d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+t,A):d.moveTo(p+t,A),this.outline||ta?d.lineTo(p+t,A+z):d.moveTo(p+t,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||N)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ja);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==+mxUtils.getValue(this.style,"line")?(d.moveTo(p+t/2,A),d.lineTo(p+t/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+t,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);d.moveTo(0,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Sa,mxActor);Sa.prototype.size=.2;Sa.prototype.redrawPath=function(d,p,+A,t,z){p=Math.min(z,t);var D=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-D)/2;A=p+D;var G=(t-D)/2;D=G+D;d.moveTo(0,p);d.lineTo(G,p);d.lineTo(G,0);d.lineTo(D,0);d.lineTo(D,p);d.lineTo(t,p);d.lineTo(t,A);d.lineTo(D,A);d.lineTo(D,z);d.lineTo(G,z);d.lineTo(G,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Sa);mxUtils.extend(Za,mxActor);Za.prototype.size=.25;Za.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);A=Math.min(t-+p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*t);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",Za);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.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"}]}];Pa.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);this.strictDrawShape(d,0,0,t,z)};Pa.prototype.strictDrawShape=function(d,p,A,t,z,D){var G=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",-this.absoluteCornerSize),O=D&&D.size?D.size:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=D&&D.indent?D.indent:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=D&&D.relIndent?D.relIndent:-Math.max(0,Math.min(50,ma)),Fa=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),La=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ka=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Ua=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,-"bottomRightStyle","default"),Za=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Hb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ib=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Eb=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Gb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,-"gradientColor2","none"),Jb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,O));D=Pa.prototype;d.setDashed($a);jb&&""!=jb&&d.setDashPattern(jb);d.setStrokeWidth(Ib);O=Math.min(.5*z,.5*t,O);ea||(O=Lb*Math.min(t,z)/100);O=Math.min(O,.5*Math.min(t,z));ea||(ma=Math.min(db*Math.min(t,z)/100));ma=Math.min(ma,.5*Math.min(t,z)-O);(Fa||La||Ka||Ha)&&"frame"!=-sa&&(d.begin(),Fa?D.moveNW(d,p,A,t,z,G,Ua,O,Ha):d.moveTo(0,0),Fa&&D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),La&&D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),Ka&&D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),Ha&&D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Eb),$a=ea=Kb,"none"==Eb&&(ea=0),"none"==Gb&&($a=0),d.setGradient(Eb,Gb,0,0,t,z,Jb,ea,$a),d.begin(),Fa?D.moveNWInner(d,-p,A,t,z,G,Ua,O,ma,Fa,Ha):d.moveTo(ma,0),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),Ha&&Ka&&D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),Ka&&La&&D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),La&&Fa&&D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),Fa&&Ha&&D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),d.fill(),"none"==Hb&&(d.begin(),D.paintFolds(d,p,A,t,z,G,Ua,Xa,Ya,Za,O,Fa,La,Ka,Ha),d.stroke()));Fa||La||-Ka||!Ha?Fa||La||!Ka||Ha?!Fa&&!La&&Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,-p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):Fa||!La||Ka||Ha?!Fa&&La&&!Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,-p,A,t,z,G,Ya,O,Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):-!Fa&&La&&Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),-D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ka&&Ha?"frame"!=sa?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,-p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,-p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ka||Ha?Fa&&!La&&!Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,-p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,-t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,-t,z,G,Za,O,Ha),D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,-p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,-p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,-p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,-Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,-Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,-p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,-p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&Ha&&("frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,-O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),d.close(),"double"==sa&&(D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close()),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintNW(d,-p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),d.close(),D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,-p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke())):"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):-"frame"!=sa?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,-p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,-Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,p,A,t,z,G,Ua,Xa,Ya,Za,O,Fa,La,Ka,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(t,0):d.moveTo(t-ea,0)};Pa.prototype.moveSE=function(d,-p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(t,z):d.moveTo(t,z-ea)};Pa.prototype.moveSW=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&-"fold"==D)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(t,0):d.lineTo(t-ea,0)};Pa.prototype.paintNE=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t,ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t,ea);else d.lineTo(t,-0)};Pa.prototype.paintRight=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(t,z):d.lineTo(t,z-ea)};Pa.prototype.paintLeft=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t-ea,z)}else("snip"==G||"default"==-G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-ea,z);else d.lineTo(t,z)};Pa.prototype.paintBottom=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==-G&&"fold"==D)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,t,z,D,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,O,.5*O+ea);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,O,O+ea);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(O,.5*O+ea);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(O+ea,O+ea),d.lineTo(O,O+ea)};Pa.prototype.paintTopInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,-O):sa&&!ma?d.lineTo(O,0):sa?"square"==G||"default"==G&&"square"==D?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(ea+.5*O,O):d.lineTo(ea+O,O):d.lineTo(0,O):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,t,z,D,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-ea-.5*O,O);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,t-ea-O,O);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(t--ea-.5*O,O);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-O,ea+O),d.lineTo(t-ea-O,O)};Pa.prototype.paintRightInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(t-O,0):sa&&!ma?d.lineTo(t,O):sa?"square"==G||"default"==G&&"square"==D?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-O,ea+.5*O):d.lineTo(t-O,ea+O):d.lineTo(t-O,0):d.lineTo(t,0)};Pa.prototype.paintLeftInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(O,-z):sa&&!ma?d.lineTo(0,z-O):sa?"square"==G||"default"==G&&"square"==D?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(O,z-ea-.5*O):d.lineTo(O,z-ea-O):d.lineTo(O,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,t,z,D,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-O,z-ea-.5*O);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,t-O,z-ea-O);else if("snip"==G||"default"==G&&"snip"==-D)d.lineTo(t-O,z-ea-.5*O);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-O,z-ea-O),d.lineTo(t-O,z-ea-O)};Pa.prototype.paintBottomInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(t,z-O):sa&&!ma?d.lineTo(t-O,z):"square"==G||"default"==G&&"square"==D||!sa?d.lineTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-ea-.5*O,z-O):d.lineTo(t-ea-O,z-O):d.lineTo(t,z)};Pa.prototype.paintSWInner=function(d,p,A,t,z,D,G,ea,O,sa){if(!sa)d.lineTo(O,-z);else if("square"==G||"default"==G&&"square"==D)d.lineTo(O,z-O);else if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,ea+.5*O,z-O);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,ea+O,z-O);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(ea+.5*O,z-O);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(O+ea,z-ea-O),d.lineTo(O+ea,z-O)};Pa.prototype.moveSWInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.moveTo(O,-z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(O,z-ea-O):d.moveTo(0,z-O)};Pa.prototype.lineSWInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==-G&&"fold"==D)&&d.lineTo(O,z-ea-O):d.lineTo(0,z-O)};Pa.prototype.moveSEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.moveTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(t-O,z-ea-O):d.moveTo(t-O,z)};Pa.prototype.lineSEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.lineTo(t-O,-z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-O,z-ea-O):d.lineTo(t-O,z)};Pa.prototype.moveNEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D||sa?d.moveTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==-G&&"fold"==D)&&d.moveTo(t-O,ea+O):d.moveTo(t,O)};Pa.prototype.lineNEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D||sa?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-O,ea+O):d.lineTo(t,O)};Pa.prototype.moveNWInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.moveTo(O,0):sa&&!ma?d.moveTo(0,O):"square"==-G||"default"==G&&"square"==D?d.moveTo(O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(O,ea+O):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(O,0):sa&&!ma?d.lineTo(0,O):"square"==G||"default"==G&&"square"==D?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(O,-ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(O,ea+O):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,t,z,D,G,ea,O,sa,ma,$a,jb,db,Fa){if("fold"==D||"fold"==G||"fold"==ea||"fold"==O||"fold"==sa)("fold"==G||"default"==G&&"fold"==D)&&$a&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==D)&&$a&&jb&&(d.moveTo(t-ma,0),d.lineTo(t-ma,ma),d.lineTo(t,ma)),("fold"==O||"default"==O&&"fold"==D)&&db&&jb&&(d.moveTo(t--ma,z),d.lineTo(t-ma,z-ma),d.lineTo(t,z-ma)),("fold"==sa||"default"==sa&&"fold"==D)&&db&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Sa,mxConnector);Sa.prototype.origPaintEdgeShape=Sa.prototype.paintEdgeShape;Sa.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash;Sa.prototype.origPaintEdgeShape.apply(this,-[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(t,z),Sa.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Sa);mxUtils.extend(gb,mxConnector);gb.prototype.defaultWidth=4;gb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};gb.prototype.getFlowAnimationPath=function(){return mxShape.prototype.getFlowAnimationPath.call(this,+this.absoluteCornerSize),N=D&&D.size?D.size:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ta=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=D&&D.indent?D.indent:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=D&&D.relIndent?D.relIndent:+Math.max(0,Math.min(50,ma)),Fa=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),La=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ka=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Wa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,+"bottomRightStyle","default"),$a=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Hb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ib=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Eb=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Gb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,+"gradientColor2","none"),Jb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,N));D=Pa.prototype;d.setDashed(ab);jb&&""!=jb&&d.setDashPattern(jb);d.setStrokeWidth(Ib);N=Math.min(.5*z,.5*t,N);ea||(N=Lb*Math.min(t,z)/100);N=Math.min(N,.5*Math.min(t,z));ea||(ma=Math.min(db*Math.min(t,z)/100));ma=Math.min(ma,.5*Math.min(t,z)-N);(Fa||La||Ka||Ha)&&"frame"!=+ta&&(d.begin(),Fa?D.moveNW(d,p,A,t,z,G,Wa,N,Ha):d.moveTo(0,0),Fa&&D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),La&&D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),Ka&&D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),Ha&&D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Eb),ab=ea=Kb,"none"==Eb&&(ea=0),"none"==Gb&&(ab=0),d.setGradient(Eb,Gb,0,0,t,z,Jb,ea,ab),d.begin(),Fa?D.moveNWInner(d,+p,A,t,z,G,Wa,N,ma,Fa,Ha):d.moveTo(ma,0),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),Ha&&Ka&&D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),Ka&&La&&D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),La&&Fa&&D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),Fa&&Ha&&D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),d.fill(),"none"==Hb&&(d.begin(),D.paintFolds(d,p,A,t,z,G,Wa,Xa,Ya,$a,N,Fa,La,Ka,Ha),d.stroke()));Fa||La||+Ka||!Ha?Fa||La||!Ka||Ha?!Fa&&!La&&Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,+p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):Fa||!La||Ka||Ha?!Fa&&La&&!Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,+p,A,t,z,G,Ya,N,Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):+!Fa&&La&&Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),+D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ka&&Ha?"frame"!=ta?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,+p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,+p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ka||Ha?Fa&&!La&&!Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,+p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,+t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,+t,z,G,$a,N,Ha),D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,+p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,+p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,+p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,+Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,+Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,+p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,+p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&Ha&&("frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,+N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),d.close(),"double"==ta&&(D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close()),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintNW(d,+p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),d.close(),D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,+p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke())):"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke()):+"frame"!=ta?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,+p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,+Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,p,A,t,z,G,Wa,Xa,Ya,$a,N,Fa,La,Ka,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(t,0):d.moveTo(t-ea,0)};Pa.prototype.moveSE=function(d,+p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(t,z):d.moveTo(t,z-ea)};Pa.prototype.moveSW=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&+"fold"==D)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(t,0):d.lineTo(t-ea,0)};Pa.prototype.paintNE=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t,ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t,ea);else d.lineTo(t,+0)};Pa.prototype.paintRight=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(t,z):d.lineTo(t,z-ea)};Pa.prototype.paintLeft=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t-ea,z)}else("snip"==G||"default"==+G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-ea,z);else d.lineTo(t,z)};Pa.prototype.paintBottom=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==+G&&"fold"==D)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,t,z,D,G,ea,N){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,N,.5*N+ea);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,N,N+ea);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(N,.5*N+ea);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(N+ea,N+ea),d.lineTo(N,N+ea)};Pa.prototype.paintTopInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(0,+N):ta&&!ma?d.lineTo(N,0):ta?"square"==G||"default"==G&&"square"==D?d.lineTo(N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(ea+.5*N,N):d.lineTo(ea+N,N):d.lineTo(0,N):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,t,z,D,G,ea,N){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,t-ea-.5*N,N);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,t-ea-N,N);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(t-+ea-.5*N,N);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-N,ea+N),d.lineTo(t-ea-N,N)};Pa.prototype.paintRightInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(t-N,0):ta&&!ma?d.lineTo(t,N):ta?"square"==G||"default"==G&&"square"==D?d.lineTo(t-N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-N,ea+.5*N):d.lineTo(t-N,ea+N):d.lineTo(t-N,0):d.lineTo(t,0)};Pa.prototype.paintLeftInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(N,+z):ta&&!ma?d.lineTo(0,z-N):ta?"square"==G||"default"==G&&"square"==D?d.lineTo(N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(N,z-ea-.5*N):d.lineTo(N,z-ea-N):d.lineTo(N,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,t,z,D,G,ea,N){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,t-N,z-ea-.5*N);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,t-N,z-ea-N);else if("snip"==G||"default"==G&&"snip"==+D)d.lineTo(t-N,z-ea-.5*N);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-N,z-ea-N),d.lineTo(t-N,z-ea-N)};Pa.prototype.paintBottomInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(t,z-N):ta&&!ma?d.lineTo(t-N,z):"square"==G||"default"==G&&"square"==D||!ta?d.lineTo(t-N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-ea-.5*N,z-N):d.lineTo(t-ea-N,z-N):d.lineTo(t,z)};Pa.prototype.paintSWInner=function(d,p,A,t,z,D,G,ea,N,ta){if(!ta)d.lineTo(N,+z);else if("square"==G||"default"==G&&"square"==D)d.lineTo(N,z-N);else if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,ea+.5*N,z-N);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,ea+N,z-N);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(ea+.5*N,z-N);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(N+ea,z-ea-N),d.lineTo(N+ea,z-N)};Pa.prototype.moveSWInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.moveTo(N,+z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(N,z-ea-N):d.moveTo(0,z-N)};Pa.prototype.lineSWInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.lineTo(N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==+G&&"fold"==D)&&d.lineTo(N,z-ea-N):d.lineTo(0,z-N)};Pa.prototype.moveSEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.moveTo(t-N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(t-N,z-ea-N):d.moveTo(t-N,z)};Pa.prototype.lineSEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.lineTo(t-N,+z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-N,z-ea-N):d.lineTo(t-N,z)};Pa.prototype.moveNEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D||ta?d.moveTo(t-N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-N,ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==+G&&"fold"==D)&&d.moveTo(t-N,ea+N):d.moveTo(t,N)};Pa.prototype.lineNEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D||ta?d.lineTo(t-N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-N,ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-N,ea+N):d.lineTo(t,N)};Pa.prototype.moveNWInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.moveTo(N,0):ta&&!ma?d.moveTo(0,N):"square"==+G||"default"==G&&"square"==D?d.moveTo(N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(N,ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(N,ea+N):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(N,0):ta&&!ma?d.lineTo(0,N):"square"==G||"default"==G&&"square"==D?d.lineTo(N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(N,+ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(N,ea+N):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,t,z,D,G,ea,N,ta,ma,ab,jb,db,Fa){if("fold"==D||"fold"==G||"fold"==ea||"fold"==N||"fold"==ta)("fold"==G||"default"==G&&"fold"==D)&&ab&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==D)&&ab&&jb&&(d.moveTo(t-ma,0),d.lineTo(t-ma,ma),d.lineTo(t,ma)),("fold"==N||"default"==N&&"fold"==D)&&db&&jb&&(d.moveTo(t-+ma,z),d.lineTo(t-ma,z-ma),d.lineTo(t,z-ma)),("fold"==ta||"default"==ta&&"fold"==D)&&db&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Qa,mxConnector);Qa.prototype.origPaintEdgeShape=Qa.prototype.paintEdgeShape;Qa.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash;Qa.prototype.origPaintEdgeShape.apply(this,+[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(t,z),Qa.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Qa);mxUtils.extend(gb,mxConnector);gb.prototype.defaultWidth=4;gb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};gb.prototype.getFlowAnimationPath=function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};gb.prototype.origPaintEdgeShape=gb.prototype.paintEdgeShape;gb.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash,D=this.getEdgeWidth();d.setStrokeWidth(D+2*this.strokewidth);d.setDashed(!1);gb.prototype.origPaintEdgeShape.apply(this,[d,A]);A=mxUtils.getValue(this.style,"fillColor",null);null!=A&&(d.setStrokeWidth(D),d.setStrokeColor(A),d.setDashed(t,z),gb.prototype.origPaintEdgeShape.apply(this,[d,p]))};mxCellRenderer.registerShape("pipe",-gb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+1);return function(){d.begin();d.moveTo(t.x-ma/2-$a/2,t.y-$a/-2+ma/2);d.lineTo(t.x+$a/2-3*ma/2,t.y-3*$a/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+1),jb=t.x+ma/2,db=t.y+$a/2;t.x-=ma;t.y-=$a;return function(){d.begin();d.moveTo(jb-ma/2-$a/2,db-$a/2+ma/2);d.lineTo(jb-ma/2+$a/2,db-$a/2-ma/2);d.lineTo(jb+$a/2-3*ma/2,db-3*$a/2-ma/2);d.lineTo(jb-$a/2-3*ma/2,db-3*$a/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+-1);return function(){d.begin();d.moveTo(t.x-ma/2-$a/2,t.y-$a/2+ma/2);d.lineTo(t.x+$a/2-3*ma/2,t.y-3*$a/2-ma/2);d.moveTo(t.x-ma/2+$a/2,t.y-$a/2-ma/2);d.lineTo(t.x-$a/2-3*ma/2,t.y-3*$a/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",fb);mxMarker.addMarker("circlePlus",function(d,p,A,t,z,D,G,ea,O,sa){var ma=t.clone(),$a=fb.apply(this,arguments),jb=z*(G+2*O),db=D*(G+2*O);return function(){$a.apply(this,arguments);d.begin();d.moveTo(ma.x-z*O,ma.y-D*O);d.lineTo(ma.x-2*jb+z*O,ma.y-2*db+D*O);d.moveTo(ma.x--jb-db+D*O,ma.y-db+jb-z*O);d.lineTo(ma.x+db-jb-D*O,ma.y-db-jb+z*O);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+1),jb=t.clone();t.x-=ma;t.y-=$a;return function(){d.begin();d.moveTo(jb.x-$a,jb.y+ma);d.quadTo(t.x-$a,t.y+ma,t.x,t.y);d.quadTo(t.x+$a,t.y-ma,jb.x+$a,jb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,t,z,D,G,ea,O,sa){p=z*O*1.118;A=D*O*1.118;z*=G+O;D*=G+O;var ma=t.clone();ma.x-=p;ma.y-=A;t.x+=-z-p;t.y+=-D-A;return function(){d.begin();-d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-D/2,ma.y-D+z/2):d.lineTo(ma.x+D/2-z,ma.y-D-z/2);d.lineTo(ma.x-z,ma.y-D);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,t,z,D,G,ea,O,sa,ma){D*=ea+sa;G*=ea+sa;var $a=z.clone();return function(){p.begin();p.moveTo($a.x,$a.y);O?p.lineTo($a.x-D-G/d,$a.y-G+D/d):p.lineTo($a.x+G/d-D,$a.y-G-D/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=function(d,p,A){return mb(d,["width"],-p,function(t,z,D,G,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(G.x+z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));d.style.width=Math.round(2*t)/d.view.scale-A})},mb=function(d,p,A,t,z){return bb(d,p,function(D){var G=d.absolutePoints;if(null!=G&&0<G.length){var ea=G.length-1;D=d.view.translate;var O=d.view.scale,sa=A?G[0]:G[ea];G=A?G[1]:G[ea-1];ea=G.x-sa.x;var ma=G.y-sa.y,$a=Math.sqrt(ea*ea+ma*ma);sa=t.call(this,-$a,ea/$a,ma/$a,sa,G);return new mxPoint(sa.x/O-D.x,sa.y/O-D.y)}return null},function(D,G,ea){var O=d.absolutePoints,sa=O.length-1;D=d.view.translate;var ma=d.view.scale,$a=A?O[0]:O[sa];O=A?O[1]:O[sa-1];sa=O.x-$a.x;var jb=O.y-$a.y,db=Math.sqrt(sa*sa+jb*jb);G.x=(G.x+D.x)*ma;G.y=(G.y+D.y)*ma;z.call(this,db,sa/db,jb/db,$a,O,G,ea)})},nb=function(d,p){return function(A){return[mb(A,["startWidth"],!0,function(t,z,D,G,ea){ea=mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(G.x+-z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));A.style.startWidth=Math.round(2*t)/A.view.scale-p})]}},qb=function(d){return function(p){return[bb(p,["arrowWidth","arrowSize"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ra.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ra.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-t)*A.height/+gb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N+1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/+2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N+1),jb=t.x+ma/2,db=t.y+ab/2;t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(jb-ma/2-ab/2,db-ab/2+ma/2);d.lineTo(jb-ma/2+ab/2,db-ab/2-ma/2);d.lineTo(jb+ab/2-3*ma/2,db-3*ab/2-ma/2);d.lineTo(jb-ab/2-3*ma/2,db-3*ab/2+ma/2);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N++1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.moveTo(t.x-ma/2+ab/2,t.y-ab/2-ma/2);d.lineTo(t.x-ab/2-3*ma/2,t.y-3*ab/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",fb);mxMarker.addMarker("circlePlus",function(d,p,A,t,z,D,G,ea,N,ta){var ma=t.clone(),ab=fb.apply(this,arguments),jb=z*(G+2*N),db=D*(G+2*N);return function(){ab.apply(this,arguments);d.begin();d.moveTo(ma.x-z*N,ma.y-D*N);d.lineTo(ma.x-2*jb+z*N,ma.y-2*db+D*N);d.moveTo(ma.x-+jb-db+D*N,ma.y-db+jb-z*N);d.lineTo(ma.x+db-jb-D*N,ma.y-db-jb+z*N);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N+1),jb=t.clone();t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(jb.x-ab,jb.y+ma);d.quadTo(t.x-ab,t.y+ma,t.x,t.y);d.quadTo(t.x+ab,t.y-ma,jb.x+ab,jb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,t,z,D,G,ea,N,ta){p=z*N*1.118;A=D*N*1.118;z*=G+N;D*=G+N;var ma=t.clone();ma.x-=p;ma.y-=A;t.x+=-z-p;t.y+=-D-A;return function(){d.begin();+d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-D/2,ma.y-D+z/2):d.lineTo(ma.x+D/2-z,ma.y-D-z/2);d.lineTo(ma.x-z,ma.y-D);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,t,z,D,G,ea,N,ta,ma){D*=ea+ta;G*=ea+ta;var ab=z.clone();return function(){p.begin();p.moveTo(ab.x,ab.y);N?p.lineTo(ab.x-D-G/d,ab.y-G+D/d):p.lineTo(ab.x+G/d-D,ab.y-G-D/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=function(d,p,A){return mb(d,["width"],+p,function(t,z,D,G,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(G.x+z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,N){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));d.style.width=Math.round(2*t)/d.view.scale-A})},mb=function(d,p,A,t,z){return bb(d,p,function(D){var G=d.absolutePoints;if(null!=G&&0<G.length){var ea=G.length-1;D=d.view.translate;var N=d.view.scale,ta=A?G[0]:G[ea];G=A?G[1]:G[ea-1];ea=G.x-ta.x;var ma=G.y-ta.y,ab=Math.sqrt(ea*ea+ma*ma);ta=t.call(this,+ab,ea/ab,ma/ab,ta,G);return new mxPoint(ta.x/N-D.x,ta.y/N-D.y)}return null},function(D,G,ea){var N=d.absolutePoints,ta=N.length-1;D=d.view.translate;var ma=d.view.scale,ab=A?N[0]:N[ta];N=A?N[1]:N[ta-1];ta=N.x-ab.x;var jb=N.y-ab.y,db=Math.sqrt(ta*ta+jb*jb);G.x=(G.x+D.x)*ma;G.y=(G.y+D.y)*ma;z.call(this,db,ta/db,jb/db,ab,N,G,ea)})},nb=function(d,p){return function(A){return[mb(A,["startWidth"],!0,function(t,z,D,G,ea){ea=mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(G.x++z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,N){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));A.style.startWidth=Math.round(2*t)/A.view.scale-p})]}},qb=function(d){return function(p){return[bb(p,["arrowWidth","arrowSize"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ua.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ua.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-t)*A.height/2)},function(A,t){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(A.y+A.height/2-t.y)/A.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(A.x+A.width-t.x)/A.width))})]}},ub=function(d){return function(p){return[bb(p,["size"],function(A){var t=Math.max(0,Math.min(.5*A.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(A.x,A.y+t)},function(A,t){this.state.style.size=Math.max(0,t.y-A.y)},!0)]}},zb=function(d,p,A){return function(t){var z=[bb(t,["size"],-function(D){var G=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(D.x+G,D.y+G)},function(D,G){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,G.x-D.x),Math.min(D.height,G.y-D.y)))/d)},!1)];A&&mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Cb=function(d,p,A,t,z){A=null!=A?A:.5;return function(D){var G=[bb(D,["size"],function(ea){var O=null!=z?"0"!=mxUtils.getValue(this.state.style,-"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",O?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,sa*(O?1:ea.width))),ea.getCenterY())},function(ea,O,sa){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?O.x-ea.x:Math.max(0,Math.min(A,(O.x-ea.x)/ea.width));this.state.style.size=ea},!1,t)];p&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&G.push(wb(D));return G}},Ab=function(d,p,A){d=null!=d?d:.5;return function(t){var z=[bb(t,["size"],+function(D){var G=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(D.x+G,D.y+G)},function(D,G){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,G.x-D.x),Math.min(D.height,G.y-D.y)))/d)},!1)];A&&mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Cb=function(d,p,A,t,z){A=null!=A?A:.5;return function(D){var G=[bb(D,["size"],function(ea){var N=null!=z?"0"!=mxUtils.getValue(this.state.style,+"fixedSize","0"):null,ta=parseFloat(mxUtils.getValue(this.state.style,"size",N?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,ta*(N?1:ea.width))),ea.getCenterY())},function(ea,N,ta){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?N.x-ea.x:Math.max(0,Math.min(A,(N.x-ea.x)/ea.width));this.state.style.size=ea},!1,t)];p&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&G.push(wb(D));return G}},Ab=function(d,p,A){d=null!=d?d:.5;return function(t){var z=[bb(t,["size"],function(D){var G=null!=A?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",G?A:p)));return new mxPoint(D.x+Math.min(.75*D.width*d,ea*(G?.75:.75*D.width)),D.y+D.height/4)},function(D,G){D=null!=A&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?G.x-D.x:Math.max(0,Math.min(d,(G.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Bb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p}},wb=function(d,p){return bb(d,[mxConstants.STYLE_ARCSIZE],function(A){var t=null!=p?p:A.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var z=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(A.x+A.width-Math.min(A.width/2,z),A.y+t)}z=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(A.x+A.width-Math.min(Math.max(A.width/2,A.height/2),Math.min(A.width,A.height)*z),A.y+t)},function(A,t,z){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(A.width,2*(A.x+A.width-t.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(A.width-t.x+A.x)/Math.min(A.width,A.height))))})},bb=function(d,p,A,t,-z,D,G){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);G&&G(sa)};ea.getPosition=A;ea.setPosition=t;ea.ignoreGrid=null!=z?z:!0;if(D){var O=ea.positionChanged;ea.positionChanged=function(){O.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},yb={link:function(d){return[ib(d,!0,10),ib(d,!1,10)]},pipe:function(d){return[ib(d,!0,10),ib(d,!1,10)]},flexArrow:function(d){var p=+z,D,G){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(ta){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);G&&G(ta)};ea.getPosition=A;ea.setPosition=t;ea.ignoreGrid=null!=z?z:!0;if(D){var N=ea.positionChanged;ea.positionChanged=function(){N.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},yb={link:function(d){return[ib(d,!0,10),ib(d,!1,10)]},pipe:function(d){return[ib(d,!0,10),ib(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,A=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,D,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)+D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)--z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-+z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),A.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,D,G,ea){t=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)+D*t/2,G.y+D*(ea+d.shape.strokewidth*-d.view.scale)-z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=-d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],-!1,function(t,z,D,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/-3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),A.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],-!1,function(t,z,D,G,ea){t=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/-3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),+d.view.scale)-z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=+d.style.startWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],+!1,function(t,z,D,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/+3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),A.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],+!1,function(t,z,D,G,ea){t=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/+3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return A},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var A=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(wb(d,A/2))}p.push(bb(d,[mxConstants.STYLE_STARTSIZE],function(t){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(t.getCenterX(),t.y+Math.max(0,Math.min(t.height,z))):new mxPoint(t.x+Math.max(0,Math.min(t.width,z)),t.getCenterY())},function(t,z){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(t.height,z.y-t.y))):Math.round(Math.max(0,Math.min(t.width,z.x-t.x)))},!1,null,function(t){var z=d.view.graph;if(!mxEvent.isShiftDown(t.getEvent())&&!mxEvent.isControlDown(t.getEvent())&&(z.isTableRow(d.cell)||z.isTableCell(d.cell))){t=z.getSwimlaneDirection(d.style);var D=z.model.getParent(d.cell);D=z.model.getChildCells(D,!0);for(var G=[],ea=0;ea<D.length;ea++)D[ea]!=d.cell&&z.isSwimlane(D[ea])&&z.getSwimlaneDirection(z.getCurrentCellStyle(D[ea]))==t&&G.push(D[ea]);z.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],G)}}));return p},label:Bb(),ext:Bb(),rectangle:Bb(),triangle:Bb(),rhombus:Bb(),umlLifeline:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},umlFrame:function(d){return[bb(d,["width","height"],function(p){var A=Math.max(na.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",na.prototype.width))),t=Math.max(1.5*na.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",na.prototype.height)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.width=Math.round(Math.max(na.prototype.corner,Math.min(p.width,A.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*na.prototype.corner,Math.min(p.height,A.y-p.y)))},!1)]},process:function(d){var p=[bb(d,["size"],function(A){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),z=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return t?new mxPoint(A.x+z,A.y+A.height/4):new mxPoint(A.x+A.width*z,A.y+-A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,t.x-A.x)):Math.max(0,Math.min(.5,(t.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[bb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-+A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,t.x-A.x)):Math.max(0,Math.min(.5,(t.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[bb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Sa.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-A)},function(p,A){var t=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/t*2,Math.max(0,p.getCenterX()-A.x)/t*2)))})]},note:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[bb(d,["size"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*t/4)},function(A,t){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(t.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[bb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:Ea.prototype.size));return new mxPoint(p.x+p.width-t*(A?1:@@ -2950,28 +2950,28 @@ p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style"base",da.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(A.x+t*A.width,A.y+A.height)},function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))),D=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(A.x+Math.min(A.width,z*A.width+D),A.y+A.height-t)},function(A,t){var z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[bb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"dy",va.prototype.dy)));-return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[bb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ja.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,-"jettyHeight",Ja.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(p.x+-A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Qa.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Qa.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,+return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[bb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ia.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,+"jettyHeight",Ia.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(p.x++A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ta.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ta.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,A.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},singleArrow:qb(1),doubleArrow:qb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[bb(d,["tabWidth","tabHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"tabWidth",x.prototype.tabWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",x.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(A=p.width-A);return new mxPoint(p.x+A,p.y+t)},function(p,A){var t=Math.max(0,Math.min(p.width,A.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=p.width-t);this.state.style.tabWidth=Math.round(t);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},tape:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[bb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:ub(g.prototype.size),cylinder3:ub(m.prototype.size),offPageConnector:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ha.prototype.size,!0,null,!0,ha.prototype.fixedSize),hexagon:Cb(Z.prototype.size,!0,.5,!0,Z.prototype.fixedSize),-curlyBracket:Cb(ja.prototype.size,!1),display:Cb(ab.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=+curlyBracket:Cb(ja.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=yb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=yb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}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=yb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),vb=new mxPoint(1,0),rb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));var Db=mxUtils.toRadians(-150);vb=mxUtils.getRotatedPoint(vb,Math.cos(Db),Math.sin(Db));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var D=d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,-ea=G[0];G=G[G.length-1];null!=t&&(t=D.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=xb.x,sa=xb.y,ma=vb.x,$a=vb.y,jb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ka){Fa-=db.x;var Ha=La-db.y;La=($a*Fa-ma*Ha)/(O*$a-sa*ma);Fa=(sa*Fa-O*Ha)/(sa*ma-O*$a);jb?(Ka&&(db=new mxPoint(db.x+O*La,db.y+sa*La),z.push(db)),db=new mxPoint(db.x+-ma*Fa,db.y+$a*Fa)):(Ka&&(db=new mxPoint(db.x+ma*Fa,db.y+$a*Fa),z.push(db)),db=new mxPoint(db.x+O*La,db.y+sa*La));z.push(db)};var db=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);A.snapToTerminals=!1;return A}return Fb.apply(this,-arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,+ea=G[0];G=G[G.length-1];null!=t&&(t=D.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var N=xb.x,ta=xb.y,ma=vb.x,ab=vb.y,jb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ka){Fa-=db.x;var Ha=La-db.y;La=(ab*Fa-ma*Ha)/(N*ab-ta*ma);Fa=(ta*Fa-N*Ha)/(ta*ma-N*ab);jb?(Ka&&(db=new mxPoint(db.x+N*La,db.y+ta*La),z.push(db)),db=new mxPoint(db.x++ma*Fa,db.y+ab*Fa)):(Ka&&(db=new mxPoint(db.x+ma*Fa,db.y+ab*Fa),z.push(db)),db=new mxPoint(db.x+N*La,db.y+ta*La));z.push(db)};var db=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);A.snapToTerminals=!1;return A}return Fb.apply(this,+arguments)};C.prototype.constraints=[];H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+(1-z)*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*t));return d};c.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;t=Math.min(p*Math.tan(t),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};da.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var z=p*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,p,.5*(A-t)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-t)));p>=2*t&&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))];Ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ja.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,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*(p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A+t)));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));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};I.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,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*(p+t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A+t)));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));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,@@ -2983,12 +2983,12 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnect0),!1,null,.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A));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};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=-mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,+mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Za.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,z,A));return d};Ja.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ja.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ja.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,+0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};R.prototype.constraints=mxRectangleShape.prototype.constraints;W.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)];N.prototype.constraints=+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)];O.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)];Aa.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)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,@@ -2999,27 +2999,27 @@ new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(n0),!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)];K.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;L.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;Qa.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,+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;Ta.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,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,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*z));return d};Na.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,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,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Oa.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)];Ra.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A));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)];Ua.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));return d};za.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ra.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ra.prototype.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),-!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ta.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(A,p),z=Math.max(0,Math.min(t,t*parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=(A-z)/2;var D=t+z,G=(p-z)/2;z=G+z;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,+parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ua.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ua.prototype.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),+!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Sa.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(A,p),z=Math.max(0,Math.min(t,t*parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=(A-z)/2;var D=t+z,G=(p-z)/2;z=G+z;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),D));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));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*G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,t));return d};fa.prototype.constraints=null;C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,+0),!1,null,G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));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*G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,t));return d};fa.prototype.constraints=null;B.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)];P.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)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];wa.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(E){q.escape();E=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),E);null!=E&&q.setSelectionCells(E)}function f(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var E=q.getSelectionCells(),Q=0;Q<E.length;Q++)q.cellLabelChanged(E[Q],"")}finally{q.getModel().endUpdate()}}}function l(E,Q,c,g,m){m.getModel().beginUpdate();try{var n=m.getCellGeometry(E);null!=n&&c&&g&&(c/=g,n=n.clone(),1<c?n.height=n.width/c:n.width=n.height*c,m.getModel().setGeometry(E,-n));m.setCellStyles(mxConstants.STYLE_CLIP_PATH,Q,[E]);m.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[E])}finally{m.getModel().endUpdate()}}var u=this.editorUi,y=u.editor,q=y.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(u.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";u.openFile()});var H=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var E=q.view.scale,+n));m.setCellStyles(mxConstants.STYLE_CLIP_PATH,Q,[E]);m.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[E])}finally{m.getModel().endUpdate()}}var u=this.editorUi,y=u.editor,q=y.graph,C=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(u.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";u.openFile()});var H=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var E=q.view.scale,Q=q.container.scrollLeft,c=q.container.scrollTop,g=q.view.translate.x,m=q.view.translate.y;u.actions.get("resetView").funct();1E-5>Math.abs(E-q.view.scale)&&5>Math.abs(Q-q.container.scrollLeft)&&5>Math.abs(c-q.container.scrollTop)&&g==q.view.translate.x&&m==q.view.translate.y&&u.actions.get("fitWindow").funct()},null,null,"Enter");H.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",H);this.addAction("keyPressEnter",function(){q.isSelectionEmpty()?u.actions.get("smartFit").funct():q.isEnabled()&&q.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){u.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(E,Q){try{var c=mxUtils.parseXml(E);y.graph.setSelectionCells(y.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));u.showDialog((new OpenDialog(this)).container,-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){u.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){u.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){u.showDialog((new ExportDialog(u)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var E=new EditDiagramDialog(u);u.showDialog(E.container,620,420,!0,!1);E.init()}).isEnabled=B;this.addAction("pageSetup...",-function(){u.showDialog((new PageSetupDialog(u)).container,320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){u.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){u.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){u.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");this.addAction("cut",function(){var E=null;try{E=u.copyXml(),+320,220,!0,!0,function(){window.openFile=null})}).isEnabled=C;this.addAction("save",function(){u.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=C;this.addAction("saveAs...",function(){u.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){u.showDialog((new ExportDialog(u)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var E=new EditDiagramDialog(u);u.showDialog(E.container,620,420,!0,!1);E.init()}).isEnabled=C;this.addAction("pageSetup...",+function(){u.showDialog((new PageSetupDialog(u)).container,320,240,!0,!0)}).isEnabled=C;this.addAction("print...",function(){u.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){u.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){u.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");this.addAction("cut",function(){var E=null;try{E=u.copyXml(),null!=E&&q.removeCells(E,!1)}catch(Q){}try{null==E&&mxClipboard.cut(q)}catch(Q){u.handleError(Q)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{u.copyXml()}catch(E){}try{mxClipboard.copy(q)}catch(E){u.handleError(E)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){u.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(E){u.pasteFromClipboard(q.popupMenuHandler.getTriggerPoint())});this.addAction("swap",function(){var E=q.getSelectionCells();2==E.length&&q.swapShapes(E[0],E[1])});this.addAction("copySize",function(){var E=q.getSelectionCell();q.isEnabled()&&null!=E&&q.getModel().isVertex(E)&&(E=q.getCellGeometry(E),null!=E&&(u.copiedSize=new mxRectangle(E.x,E.y,E.width,E.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=u.copiedSize){q.getModel().beginUpdate();try{for(var E=q.getResizableCells(q.getSelectionCells()),Q=0;Q<E.length;Q++)if(q.getModel().isVertex(E[Q])){var c=q.getCellGeometry(E[Q]);null!=c&&(c=c.clone(),c.width=u.copiedSize.width,c.height=u.copiedSize.height,q.getModel().setGeometry(E[Q],c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var E=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=E&&(E=E.cloneValue(),null==E||isNaN(E.nodeType)||(u.copiedValue=E))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+B");this.addAction("copyAsText",function(){var E=q.getSelectionCell();@@ -3036,11 +3036,11 @@ q.isTableRow(E[0])?(E=q.getCellsForGroup(E),1<E.length&&q.setSelectionCell(q.groQ.length&&q.setSelectionCells(Q)}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var E=q.getSelectionCells();if(null!=E){for(var Q=[],c=0;c<E.length;c++)q.isTableRow(E[c])||q.isTableCell(E[c])||Q.push(E[c]);q.removeCellsFromParent(Q);0<Q.length&&q.scrollCellToVisible(Q[0])}}});this.addAction("edit",function(){q.isEnabled()&&q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var E=q.getSelectionCell()||q.getModel().getRoot();u.showDataDialog(E)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&null!=E&&q.isCellEditable(E)){var Q="";if(mxUtils.isNode(E.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&E.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=E.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=E.value.getAttribute("tooltip"));null!=c&&(Q=c)}Q=new TextareaDialog(u,mxResources.get("editTooltip")+":",Q,function(g){q.setTooltipForCell(E,g)});u.showDialog(Q.container,320,200,!0,!0);Q.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+T");this.addAction("openLink",function(){var E=q.getLinkForCell(q.getSelectionCell());null!=E&&q.openLink(E)});this.addAction("editLink...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&null!=E&&q.isCellEditable(E)){var Q=q.getLinkForCell(E,!0)||"";u.showLinkDialog(Q,mxResources.get("ok"),function(c,g,m){q.getModel().beginUpdate();try{q.setLinkForCell(E,-0<c.length?c:null),q.setAttributeForCell(E,"linkTarget",m)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(E))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),u.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){u.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&+0<c.length?c:null),q.setAttributeForCell(E,"linkTarget",m)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(E))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),u.actions.get("image").funct())})).isEnabled=C;this.addAction("editImage...",function(){u.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&u.showLinkDialog("",mxResources.get("ok"),function(E,Q,c){E=mxUtils.trim(E);if(0<E.length){var g=null,m=q.getLinkTitle(E);null!=Q&&0<Q.length&&(g=Q[0].iconUrl,m=Q[0].name||Q[0].type,m=m.charAt(0).toUpperCase()+m.substring(1),30<m.length&&(m=m.substring(0,30)+"..."));Q=new mxCell(m,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+g:"spacing=10;"));Q.vertex=!0;g=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([Q],-!0));Q.geometry.x=g.x;Q.geometry.y=g.y;q.setAttributeForCell(Q,"linkTarget",c);q.setLinkForCell(Q,E);q.cellSizeUpdated(Q,!0);q.getModel().beginUpdate();try{Q=q.addCell(Q),q.fireEvent(new mxEventObject("cellsInserted","cells",[Q]))}finally{q.getModel().endUpdate()}q.setSelectionCell(Q);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var E=q.getSelectedElement(),+!0));Q.geometry.x=g.x;Q.geometry.y=g.y;q.setAttributeForCell(Q,"linkTarget",c);q.setLinkForCell(Q,E);q.cellSizeUpdated(Q,!0);q.getModel().beginUpdate();try{Q=q.addCell(Q),q.fireEvent(new mxEventObject("cellsInserted","cells",[Q]))}finally{q.getModel().endUpdate()}q.setSelectionCell(Q);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=C;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var E=q.getSelectedElement(),Q=q.getParentByName(E,"A",q.cellEditor.textarea),c="";if(null==Q&&null!=E&&null!=E.getElementsByTagName)for(var g=E.getElementsByTagName("a"),m=0;m<g.length&&null==Q;m++)g[m].textContent==E.textContent&&(Q=g[m]);null!=Q&&"A"==Q.nodeName&&(c=Q.getAttribute("href")||"",q.selectNode(Q));var n=q.cellEditor.saveSelection();u.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(x){q.cellEditor.restoreSelection(n);null!=x&&q.insertLink(x)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():-this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var E=q.getSelectionCells();if(null!=E){q.getModel().beginUpdate();try{for(var Q=0;Q<E.length;Q++){var c=E[Q];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",+this.get("editLink").funct()})).isEnabled=C;this.addAction("autosize",function(){var E=q.getSelectionCells();if(null!=E){q.getModel().beginUpdate();try{for(var Q=0;Q<E.length;Q++){var c=E[Q];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();var E=q.getCommonStyle(q.getSelectionCells());E="1"==mxUtils.getValue(E,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var Q=q.getEditableCells(q.getSelectionCells()),c=0;c<Q.length;c++)if(state=q.getView().getState(Q[c]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==E)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",E,[Q[c]]);else if("0"==g&&"1"==E){var m=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(m));q.setCellStyles("html",E,[Q[c]])}}u.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=E?E:"0"],"cells",Q))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var E=q.getView().getState(q.getSelectionCell()),Q="wrap";q.stopEditing();null!=E&&"wrap"==E.style[mxConstants.STYLE_WHITE_SPACE]&&(Q=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,Q)});this.addAction("rotation",function(){var E="0",Q=q.getView().getState(q.getSelectionCell());null!=Q&&(E=Q.style[mxConstants.STYLE_ROTATION]||E);E=new FilenameDialog(u,E,mxResources.get("apply"),function(c){null!=c&&0<c.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");u.showDialog(E.container,375,80,!0,!0);E.init()});this.addAction("resetView",function(){q.zoomTo(1);u.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",@@ -3049,10 +3049,10 @@ q.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");thismxResources.get("apply"),mxUtils.bind(this,function(Q){Q=parseInt(Q);!isNaN(Q)&&0<Q&&q.zoomTo(Q/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(E.container,300,80,!0,!0);E.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var E=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(Q){Q=parseInt(Q);!isNaN(Q)&&0<Q&&(Q=new ChangePageSetup(u,null,null,null,Q/100),Q.ignoreColor=!0,Q.ignoreImage=!0,q.model.execute(Q))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(E.container,300,80,!0,!0);E.init()}));H=null;H=this.addAction("grid",function(){q.setGridEnabled(!q.isGridEnabled());q.defaultGridEnabled=q.isGridEnabled();u.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+G");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.isGridEnabled()});H.setEnabled(!1);H=this.addAction("guides",function(){q.graphHandler.guidesEnabled=!q.graphHandler.guidesEnabled;u.fireEvent(new mxEventObject("guidesEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.graphHandler.guidesEnabled});H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;u.fireEvent(new mxEventObject("enableAnimationsChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return Editor.enableAnimations});H=this.addAction("tooltips",function(){q.tooltipHandler.setEnabled(!q.tooltipHandler.isEnabled());-u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});H=this.addAction("collapseExpand",function(){var E=new ChangePageSetup(u);E.ignoreColor=!0;E.ignoreImage=!0;E.foldingEnabled=!q.foldingEnabled;q.model.execute(E)});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));+u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});H=this.addAction("collapseExpand",function(){var E=new ChangePageSetup(u);E.ignoreColor=!0;E.ignoreImage=!0;E.foldingEnabled=!q.foldingEnabled;q.model.execute(E)});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.foldingEnabled});H.isEnabled=C;H=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return q.pageVisible});H=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;u.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());u.fireEvent(new mxEventObject("connectionPointsChanged"))},-null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});-H.setToggleAction(!0);H.setSelectedCallback(function(){return u.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var E="";mxResources.isLanguageSupported(mxClient.language)&&(E="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+E+".html")});var S=!1;H=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});H.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",H);H=+null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});H.isEnabled=C;H=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});+H.setToggleAction(!0);H.setSelectedCallback(function(){return u.editor.autosave});H.isEnabled=C;H.visible=!1;this.addAction("help",function(){var E="";mxResources.isLanguageSupported(mxClient.language)&&(E="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+E+".html")});var S=!1;H=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});H.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",H);H=mxUtils.bind(this,function(E,Q,c,g){return this.addAction(E,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,Q,m);(Q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(m,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(Q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(m,function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(Q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(m,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<m.length;n++)0==q.model.getChildCount(m[n])&&q.autoSizeCell(m[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});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(){u.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){u.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){u.menus.pickColor(mxConstants.STYLE_FILLCOLOR,@@ -3073,43 +3073,43 @@ Math.max(1,E-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.sh!q.isCellLocked(q.getDefaultParent())){var E=mxResources.get("image")+" ("+mxResources.get("url")+"):",Q=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=Q&&(c=Q.style[mxConstants.STYLE_IMAGE]||c,g=Q.style[mxConstants.STYLE_CLIP_PATH]||g);var m=q.cellEditor.saveSelection();u.showImageDialog(E,c,function(n,x,F,I,M,L){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(m),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var aa=null;q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ja=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ja.x;K[0].geometry.y=ja.y;null!=I&&l(K[0],I,M,L,q);aa=K;q.fireEvent(new mxEventObject("cellsInserted","cells",aa))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var ca=q.getCurrentCellStyle(K[0]);"image"!=ca[mxConstants.STYLE_SHAPE]&&"label"!=ca[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var oa=q.getModel().getGeometry(ba);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(ba,oa))}null!=I&&l(ba,I,M,L,q)}}finally{q.getModel().endUpdate()}null!=aa&&(q.setSelectionCells(aa),-q.scrollCellToVisible(aa[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=B;this.addAction("crop...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E){var Q=q.getCurrentCellStyle(E),c=Q[mxConstants.STYLE_IMAGE],g=Q[mxConstants.STYLE_SHAPE];c&&"image"==g&&(Q=new CropImageDialog(u,c,Q[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(E,m,n,x,q)}),u.showDialog(Q.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",+q.scrollCellToVisible(aa[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=C;this.addAction("crop...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E){var Q=q.getCurrentCellStyle(E),c=Q[mxConstants.STYLE_IMAGE],g=Q[mxConstants.STYLE_SHAPE];c&&"image"==g&&(Q=new CropImageDialog(u,c,Q[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(E,m,n,x,q)}),u.showDialog(Q.container,300,390,!0,!0))}}).isEnabled=C;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(u,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+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(){u.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return u.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(u,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+-"+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E&&null!=E.geometry){var Q=new ConnectionPointsDialog(u,E);u.showDialog(Q.container,350,450,!0,!1,function(){Q.destroy()});Q.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=B};-Actions.prototype.addAction=function(b,f,l,u,y,q){var B=b;"..."==B.substring(B.length-3)&&(B=B.substring(0,B.length-3));return this.put(B,new Action(b,f,l,u,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,l,u,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=l?l:!0;this.iconCls=u;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);+"+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E&&null!=E.geometry){var Q=new ConnectionPointsDialog(u,E);u.showDialog(Q.container,350,450,!0,!1,function(){Q.destroy()});Q.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=C};+Actions.prototype.addAction=function(b,f,l,u,y,q){var C=b;"..."==C.substring(C.length-3)&&(C=C.substring(0,C.length-3));return this.put(C,new Action(b,f,l,u,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,l,u,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=l?l:!0;this.iconCls=u;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};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,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);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 l=!0,u=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(B){l&&(window.clearTimeout(u),null!=f&&f(B))}),q=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,-function(B){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,B))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};+DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var l=!0,u=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(C){l&&(window.clearTimeout(u),null!=f&&f(C))}),q=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,+function(C){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,C))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};DrawioFile.prototype.updateFile=function(b,f,l,u,y){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,-u,y):this.reloadFile(b,f))}catch(B){null!=f&&f(B)}}),f))};-DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=u?u:B,q)],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!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(B,-this.isRealtime()?this.ownPages:this.ui.pages):null,Q=this.ui.patchPages(this.ui.clonePages(B),H[0]),c=this.ui.getHashValueForPages(Q,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",q,"patched",Q,"patches",H,"changes",E,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,H,null,null,"mergeFile",+u,y):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};+DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),H=[this.ui.diffPages(null!=u?u:C,q)],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!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(C,+this.isRealtime()?this.ownPages:this.ui.pages):null,Q=this.ui.patchPages(this.ui.clonePages(C),H[0]),c=this.ui.getHashValueForPages(Q,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",q,"patched",Q,"patches",H,"changes",E,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,H,null,null,"mergeFile",c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var m=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?E:null,null,y);null==m||mxUtils.isEmptyObject(m)||H.push(m)}this.patch(H,DrawioFile.LAST_WRITE_WINS?E:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(F);try{var n=this.getCurrentUser(),x=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(I){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=l&&l(F)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var u=0;u<b.length;u++){var y=f.encode(new mxGraphModel(b[u].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[u].getId());b[u].viewState&&this.ui.editor.graph.saveViewState(b[u].viewState,y,!0);l.appendChild(y)}return mxUtils.getPrettyXml(l)};DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,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(),E=null!=S?S.id:"unknown",Q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>+DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,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(),E=null!=S?S.id:"unknown",Q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(m){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(m.getShadowPages()),F="unknown",I="unknown",M="unknown";try{var L=null!=m.initialData&&0<m.initialData.length?mxUtils.parseXml(m.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(F=L.getAttribute("version")),null!=L.getAttribute("agent")&&(I=L.getAttribute("agent")),null!=L.getAttribute("type")&&(M=L.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+-n+" in "+y,null,this.getMode()+"."+Q,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+I)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+Q,action:y,label:"user_"++n+" in "+y,null,this.getMode()+"."+Q,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=C?"-current_"+C:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+I)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+Q,action:y,label:"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(m){}};-DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=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",E=this.getTitle(),Q=E.lastIndexOf(".");B="xml";0<Q&&(B=E.substring(Q));var c=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()+" ("+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!=f?"\n\n"+f:+DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),H=null!=C?this.ui.hashValue(C.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),Q=E.lastIndexOf(".");C="xml";0<Q&&(C=E.substring(Q));var c=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()+" ("+C+")\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!=f?"\n\n"+f:"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,u)}catch(g){}};-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),-[l]),this.ui.restoreViewState(B,q,y),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([l]),S.fileChanged());this.ui.restoreViewState(B,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(H){null!=f&&f(H)}};+DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),+[l]),this.ui.restoreViewState(C,q,y),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([l]),S.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(H){null!=f&&f(H)}};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 l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};-DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),B=y.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var E=H.foldingEnabled,Q=H.mathEnabled,c=H.cellRenderer.redraw;H.cellRenderer.redraw=function(I){I.view.graph.isEditing(I.cell)&&(I.view.graph.scrollCellToVisible(I.cell),I.view.graph.cellEditor.resize());c.apply(this,arguments)};H.model.beginUpdate();+DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var E=H.foldingEnabled,Q=H.mathEnabled,c=H.cellRenderer.redraw;H.cellRenderer.redraw=function(I){I.view.graph.isEditing(I.cell)&&(I.view.graph.scrollCellToVisible(I.cell),I.view.graph.cellEditor.resize());c.apply(this,arguments)};H.model.beginUpdate();try{if(l){for(var g=this.ui.pages.slice(),m=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,m)&&this.ui.selectPage(m,!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);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=B,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)Q!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(E!=H.foldingEnabled?+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=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)Q!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(E!=H.foldingEnabled?H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!u&&(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",l)}return b};DrawioFile.prototype.save=function(b,f,l,u,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",u,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});-else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=l)l(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 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};+else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};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.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,l){};DrawioFile.prototype.saveFile=function(b,f,l,u){};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};@@ -3148,7 +3148,7 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.uthis.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};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()||this.ui.updateStatus(mxUtils.bind(this,function(){var l=this.getErrorMessage(b);null!=l&&60<l.length&&(l=l.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=l?" ("+mxUtils.htmlEntities(l)+")":"")+"</div>")}))))};-DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),u=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,l,u,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),u=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,l,u,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=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,u,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),u)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,u,y):this.invalidChecksum&&f?this.showRefreshDialog(l,u,this.getErrorMessage(b)):f?this.showConflictDialog(y,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(l,u)}))};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 l=0;l<f.length;l++){var u=f[l].node;if(null!=u&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[l].getId())){var y=u.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(u));b?0==q.length&&null!=y&&(EditorUi.removeChildNodes(u),mxUtils.setTextContent(u,Graph.compressNode(y)),EditorUi.debug("DrawioFile.compressionChanged",@@ -3156,18 +3156,18 @@ DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?thDrawioFile.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.ui.updateStatus(mxUtils.bind(this,function(){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(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",l);b(f,l)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};-DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,B)}catch(E){this.invalidChecksum=+DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,C)}catch(E){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=u&&u(E);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,E)}catch(Q){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(E){this.descriptorChanged(),null!=u&&u(E)}};-DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"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!=l&&l(H)}),mxUtils.bind(this,function(H){null!=u&&u(H)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(H){null!=u&&u(H)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();+C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=l&&l(H)}),mxUtils.bind(this,function(H){null!=u&&u(H)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(H){null!=u&&u(H)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"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 l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=f.lastIndexOf(".");return b===(0<l?f.substring(l):"")}return b==f};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,l){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,l,u,y,q,B){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;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};+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,l){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,l,u,y,q,C){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=C};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,l,u,y){this.saveAs(this.title,f,l,u,y)};LocalFile.prototype.saveAs=function(b,f,l,u,y){this.saveFile(b,!1,f,l,null,u,y)};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,l,u,y,q,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var H=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),Q=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);B||this.desc.lastModified==x.lastModified?n.write(H?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,+LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var H=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),Q=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(H?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var I=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,I,E,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,H?"image/png":"text/xml",H);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&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(c)}));E()}});H?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){Q(c)}),u,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):Q(S)};LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};(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=@@ -3220,8 +3220,8 @@ Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tEditor.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||"1"==urlParams.enableSW||/.*\.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.pasteAtMousePointer=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.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.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(J,N){return 1==J.vertices.length?(N=N.editorUi.editor.graph.model,J=N.getParent(J.vertices[0]),N.isEdge(J)||N.isVertex(J)):!1},getValue:function(J,N){return"inherit"==mxUtils.getValue(J.style,v)},valueChanged:function(J,N,T,V){N=V.editorUi.editor.graph;-"1"==J?N.setCellStyles(v,"inherit",T.vertices):N.setCellStyles(v,null,T.vertices)}}};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",+!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(J,O){return 1==J.vertices.length?(O=O.editorUi.editor.graph.model,J=O.getParent(J.vertices[0]),O.isEdge(J)||O.isVertex(J)):!1},getValue:function(J,O){return"inherit"==mxUtils.getValue(J.style,v)},valueChanged:function(J,O,T,V){O=V.editorUi.editor.graph;+"1"==J?O.setCellStyles(v,"inherit",T.vertices):O.setCellStyles(v,null,T.vertices)}}};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",@@ -3252,11 +3252,11 @@ dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"ResizadispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,v){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.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,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(N){}};v.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(J){}})();+Editor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(O){}};v.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(J){}})();Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(J){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var J=document.createElement("style");-J.type="text/css";var N=J.appendChild,T=document,V=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(J,V.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=-rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var V=N[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,N,T){var V=k.state.strokeColor,U=k.state.strokeWidth,X=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);-k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(X)};v._drawToContext=function(J,N,T){J.begin();for(var V=0;V<N.ops.length;V++){var U=N.ops[V],X=U.data;switch(U.op){case "move":J.moveTo(X[0],X[1]);break;case "bcurveTo":J.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":J.lineTo(X[0],X[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,+J.type="text/css";var O=J.appendChild,T=document,V=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}O.call(J,V.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=+rough.canvas({getContext:function(){return k}});v.draw=function(J){var O=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<O.length;T++){var V=O[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,O,T){var V=k.state.strokeColor,U=k.state.strokeWidth,X=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);+k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,O,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(X)};v._drawToContext=function(J,O,T){J.begin();for(var V=0;V<O.ops.length;V++){var U=O.ops[V],X=U.data;switch(U.op){case "move":J.moveTo(X[0],X[1]);break;case "bcurveTo":J.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":J.lineTo(X[0],X[1])}}J.end();"fillPath"===O.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,U,X){this.canvas=V;this.rc=U;this.shape=X;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=@@ -3272,16 +3272,16 @@ U,X,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,argumentV[U];V.stroke!=mxConstants.NONE&&null!=V.stroke||delete this.nextShape.options.stroke;V.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(V){return new k(V,Editor.createRoughCanvas(V),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(V){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(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,X,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();-var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};X||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;N.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();X&&null!=fa&&(V.addTolerance=function(){})}N.apply(this,arguments);+"sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,X,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var O=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();+var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};X||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;O.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();X&&null!=fa&&(V.addTolerance=function(){})}O.apply(this,arguments);V.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,U,X,fa,na,la){null!=V.handJiggle&&V.handJiggle.constructor==k?(V.handJiggle.passThrough=!0,T.apply(this,arguments),V.handJiggle.passThrough=!1):T.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,J){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var V=0;V<N.length;V++)if("mxgraph"==N[V].getAttribute("class")){T.push(N[V]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&-(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,J),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.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)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==-k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&+k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,J){if(null!=k&&"undefined"!==typeof pako){var O=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=O&&0<O.length)for(var V=0;V<O.length;V++)if("mxgraph"==O[V].getAttribute("class")){T.push(O[V]);break}0<T.length&&(O=T[0].getAttribute("data-mxgraph"),null!=O?(T=JSON.parse(O),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&+(O=mxUtils.getTextContent(T[0]),O=Graph.decompress(O,null,J),0<O.length&&(k=mxUtils.parseXml(O),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(O=k.getAttribute("content"),null!=O&&"<"!=O.charAt(0)&&"%"!=O.charAt(0)&&(O=unescape(window.atob?atob(O):Base64.decode(cont,O))),null!=O&&"%"==O.charAt(0)&&(O=decodeURIComponent(O)),null!=O&&0<O.length)k=mxUtils.parseXml(O).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==+k.nodeName&&(O=k.getElementsByTagName("diagram"),0<O.length&&(T=O[Math.max(0,Math.min(O.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var O=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<O.length?(v=Graph.decompress(O,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(T=k[0],J&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),J=null;0<v.length?J=Graph.decompress(v):(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 v=-new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}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 J=k.indexOf("EmbeddedFile");if(-1<J){var N=k.indexOf("stream",J)+9;if(0<k.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(J=-k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var V=[],U=null;T<k.length;){var X=k.charCodeAt(T);T+=-1;10!=X&&(J+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==X&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=+new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}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 J=k.indexOf("EmbeddedFile");if(-1<J){var O=k.indexOf("stream",J)+9;if(0<k.substring(J,O).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",O-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(O,T)),{to:"string"})}}for(J=+k.indexOf("/ObjStm");0<J;){O=k.indexOf("stream",J)+9;T=k.indexOf("endstream",O-1);O=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(O,T)),{to:"string"});T=O.indexOf("/Subject <");if(0<T){J=O.substring(T+14,O.indexOf(">",T));if(null!=J){v=J;J=[];for(O=0;O<v.length;O+=2)T=v.substr(O,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=O=0;for(var V=[],U=null;T<k.length;){var X=k.charCodeAt(T);T+=+1;10!=X&&(J+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(O)?O++:O=0;if(19==O){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==X&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,J=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"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,v){var J=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(J=mxUtils.getTextContent(v[0])));return null!=J?mxUtils.trim(J):J};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,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}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=@@ -3297,51 +3297,51 @@ k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=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 J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));v.parentNode.insertBefore(J,v);k=k.split("url(");for(J=1;J<k.length;J++){var N=k[J].indexOf(")");N=Editor.trimCssUrl(k[J].substring(0,N));var T=document.createElement("link");-T.setAttribute("rel","preload");T.setAttribute("href",N);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,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=+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 J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));v.parentNode.insertBefore(J,v);k=k.split("url(");for(J=1;J<k.length;J++){var O=k[J].indexOf(")");O=Editor.trimCssUrl(k[J].substring(0,O));var T=document.createElement("link");+T.setAttribute("rel","preload");T.setAttribute("href",O);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,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=[],J=0;J<k;J++)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(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&&(J=null!=this.graph.themes?-this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=J&&(N=new mxCodec(J.ownerDocument),N.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 N=new mxCodec(J.ownerDocument);N.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));+this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=J&&(O=new mxCodec(J.ownerDocument),O.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 O=new mxCodec(J.ownerDocument);O.decode(J,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(T){T=T.split("^");return{name:T[0],url:T[1]}}),J=0;J<v.length;J++)this.graph.addExtFont(v[J].name,v[J].url)}catch(T){console.log("ExtFonts format error: "+T.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(k,v){k=null!=k?k:!0;var J=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",-this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=N&&J.setAttribute("backgroundImage",JSON.stringify(N));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&&(N=this.graph.extFonts.map(function(T){return T.name+-"^"+T.url}),J.setAttribute("extFonts",N.join("|")));return J};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 J=mxUtils.parseXml(v).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=+this.graph.currentStyle);var O=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=O&&J.setAttribute("backgroundImage",JSON.stringify(O));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&&(O=this.graph.extFonts.map(function(T){return T.name++"^"+T.url}),J.setAttribute("extFonts",O.join("|")));return J};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 J=mxUtils.parseXml(v).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(O){}return!1};Editor.prototype.extractGraphModel=function(k,v,J){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 u=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=-function(){u.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 J=function(){N=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 N=null;Editor.doMathJaxRender=-function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(X){MathJax.typesetClear([U]),null!=X.retry?(N=U,X.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+X.toString())}};window.MathJax=null!=+function(){u.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 J=function(){O=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 O=null;Editor.doMathJaxRender=+function(U){try{null==O?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):O!=U&&Editor.mathJaxQueue.push(U)}catch(X){MathJax.typesetClear([U]),null!=X.retry?(O=U,X.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+X.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 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 T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(X,fa){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)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",k);v[0].parentNode.appendChild(V)}}};-Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],N=0,T=!0,V;k=$jscomp.makeIterator(k);for(V=k.next();!V.done;V=k.next())V=V.value,'"'===V?(T&&V===v&&(J[N]+=V),T=!T):","===V&&T?V=J[++N]="":J[N]+=V,v=V;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 v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J=+Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],O=0,T=!0,V;k=$jscomp.makeIterator(k);for(V=k.next();!V.done;V=k.next())V=V.value,'"'===V?(T&&V===v&&(J[O]+=V),T=!T):","===V&&T?V=J[++O]="":J[O]+=V,v=V;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 v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(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,J=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+-"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),X=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||-299<na.getStatus()?X():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&X()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=-J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<V.length?V.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(X,fa){X=k.getElementsByTagName(X);for(var na=0;na<X.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,-function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(X[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,V,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&-3)<<4);v+="==";break}V=k.charCodeAt(J++);if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&-3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,V,U,X){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&+"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,J=this;k.convert=function(O){null!=O&&navigator.onLine&&("http://"!=O.substring(0,7)&&"https://"!=O.substring(0,8)||O.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(O)?"chrome-extension://"!=O.substring(0,19)&&(O=v.apply(this,arguments)):O=PROXY_URL++"?url="+encodeURIComponent(O));return O};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,O,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),X=mxUtils.bind(this,function(){null!=O?this.convertImageToDataUri(k,v,J,O,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||+299<na.getStatus()?X():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&X()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{O=null!=O&&T?O:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(O,O);na.height=fa.height*O;na.width=fa.width*O;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=+J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,O){function T(){0<V.length?V.shift()():v(k)}null==O&&(O=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(X,fa){X=k.getElementsByTagName(X);for(var na=0;na<X.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=O.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,+function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(X[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,O=k.length,T,V,U;J<O;){T=k.charCodeAt(J++)&255;if(J==O){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&+3)<<4);v+="==";break}V=k.charCodeAt(J++);if(J==O){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&+3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,O,T,V,U,X){try{var fa=!U&&(O||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(V=null!=V?V:"data:image/png;base64,",la=V+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:na})},X)});na()}catch(la){null!=-J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),N=JSON.parse(J);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=-N&&0<N.length&&(T=N[0].getAttribute("href"));for(var V=1;V<J.length;V++)if(N=J[V].indexOf(")"),0<N){var U=Editor.trimCssUrl(J[V].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[V].substring(N))}else v.push(J[V])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));-J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,X=J[k].indexOf("format(",V);0<X&&(U=Editor.trimCssUrl(J[k].substring(X+-7,J[k].indexOf(")",X))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na=-"application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,V)),U)}T()}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 J=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(J.join(""),k)}),-V=0;V<v.length;V++)mxUtils.bind(this,function(U,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(X),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[X]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+X+");\n");T()}))):J.push(this.cachedGoogleFonts[X]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+X+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");-if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var N=mxUtils.getTextContent(v[J]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],V=0;V<N.length;V++)"@import"==N[V].substring(0,7)?v.push(N[V]):T.push(N[V]);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")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var N=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=-function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(ra){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ra.drawImage(Ca,-0,0);k(Na,ra)},0):(Ra.drawImage(Ca,0,0),k(Na,ra))},Na=document.createElement("canvas"),Oa=parseInt(ra.getAttribute("width")),Qa=parseInt(ra.getAttribute("height"));X=null!=X?X:1;null!=v&&(X=V?Math.min(1,Math.min(3*v/(4*Qa),v/Oa)):v/Oa);X=this.getMaxCanvasScale(Oa,Qa,X);Oa=Math.ceil(X*Oa);Qa=Math.ceil(X*Qa);Na.setAttribute("width",Oa);Na.setAttribute("height",Qa);var Ra=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ra.beginPath();Ra.rect(0,0,Oa,Qa);Ra.fillStyle="dark"==Aa&&-"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ra.fill()}1!=X&&Ra.scale(X,X);if(Ja){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*X,W=qa.getGraphBounds(),ia=Ea.translate.x*C,ka=Ea.translate.y*C,pa=ia+(W.x-ia)/C-ya,xa=ka+(W.y-ka)/C-ya,ta=new Image;ta.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*X,R)),Ia=-Math.round(R-mxUtils.mod((ka-xa)*X,-R));ua<Oa;ua+=R)for(var Va=Ia;Va<Qa;Va+=R)Ra.drawImage(ta,ua/X,Va/X);va()}catch(Wa){null!=T&&T(Wa)}};ta.onerror=function(ua){null!=T&&T(ua)};ta.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(ra);this.graph.mathEnabled&&this.addMathCss(ra);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ra,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ra))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,-function(va){try{null!=va&&this.addFontCss(ra,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(ra){null!=T&&T(ra)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,B=0;8>B;B++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];-return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function X(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,-4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=X(J)+X(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=X(J.length)+v+J+X(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?+J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),O=JSON.parse(J);null!=O&&null!=O.error&&null!=O.error.message&&(v=O.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var O=null!=k?k.lastIndexOf("/"):-1;0<=O&&(k=k.substring(0,O+1));O=document.getElementsByTagName("base");var T=null;null!=+O&&0<O.length&&(T=O[0].getAttribute("href"));for(var V=1;V<J.length;V++)if(O=J[V].indexOf(")"),0<O){var U=Editor.trimCssUrl(J[V].substring(0,O));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[V].substring(O))}else v.push(J[V])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));+J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),O=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==O){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,X=J[k].indexOf("format(",V);0<X&&(U=Editor.trimCssUrl(J[k].substring(X++7,J[k].indexOf(")",X))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;O++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na=+"application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;O--;T()}),mxUtils.bind(this,function(ya){O--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,V)),U)}T()}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 J=[],O=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==O&&this.embedCssFonts(J.join(""),k)}),+V=0;V<v.length;V++)mxUtils.bind(this,function(U,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(O++,this.loadUrl(Graph.rewriteGoogleFontUrl(X),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[X]=fa;J.push(fa+"\n");O--;T()}),mxUtils.bind(this,function(fa){O--;J.push("@import url("+X+");\n");T()}))):J.push(this.cachedGoogleFonts[X]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+X+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");+if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var O=mxUtils.getTextContent(v[J]);0>O.indexOf("mxPageSelector")&&0<O.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),O=v.split("\n");v=[];for(var T=[],V=0;V<O.length;V++)"@import"==O[V].substring(0,7)?v.push(O[V]):T.push(O[V]);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")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var O=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(O/k,O/v))};Editor.prototype.exportToCanvas=+function(k,v,J,O,T,V,U,X,fa,na,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=O);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ua.drawImage(Ca,+0,0);k(Na,sa)},0):(Ua.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),Ra=parseInt(sa.getAttribute("width")),Ta=parseInt(sa.getAttribute("height"));X=null!=X?X:1;null!=v&&(X=V?Math.min(1,Math.min(3*v/(4*Ta),v/Ra)):v/Ra);X=this.getMaxCanvasScale(Ra,Ta,X);Ra=Math.ceil(X*Ra);Ta=Math.ceil(X*Ta);Na.setAttribute("width",Ra);Na.setAttribute("height",Ta);var Ua=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ua.beginPath();Ua.rect(0,0,Ra,Ta);Ua.fillStyle="dark"==Aa&&+"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ua.fill()}1!=X&&Ua.scale(X,X);if(Ia){var Ea=qa.view,B=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*X,W=qa.getGraphBounds(),ia=Ea.translate.x*B,ka=Ea.translate.y*B,pa=ia+(W.x-ia)/B-ya,xa=ka+(W.y-ka)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*X,R)),Ja=-Math.round(R-mxUtils.mod((ka-xa)*X,+R));ua<Ra;ua+=R)for(var Va=Ja;Va<Ta;Va+=R)Ua.drawImage(ra,ua/X,Va/X);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,+function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,C=0;8>C;C++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,O){for(var T=0;T<O;T++)k=Editor.crcTable[(k^v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];+return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,O,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function X(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,+4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(O/.0254),J=X(J)+X(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+O;O=4294967295;O=Editor.updateCRC(O,v,0,4);O=Editor.updateCRC(O,J,0,J.length);T+=X(J.length)+v+J+X(O^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){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,v){var J=null;null!=k.editor.graph.getModel().getParent(v)?J=v.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var E=Format.prototype.init;Format.prototype.init=function(){E.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var Q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?-Q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;if(J.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},-function(V){v.editor.setAutosave(V);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(V){this.listener=function(){V(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(V){v.actions.get("mathematicalTypesetting").funct()},+Q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;if(J.isEnabled()){var O=v.getCurrentFile();null!=O&&O.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},+function(V){v.editor.setAutosave(V);v.editor.autosave&&O.isModified()&&O.fileChanged()},{install:function(V){this.listener=function(){V(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(V){v.actions.get("mathematicalTypesetting").funct()},{install:function(V){this.listener=function(){V(J.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}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",@@ -3367,86 +3367,86 @@ stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"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;var g=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()));g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=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"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,N){function T(Ra,za,Ea,C,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==-Ra;)W.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<W.length?null!=C?W.splice(C,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ra,za,ya.getSelectionCells());P.push(Ra);R.push(za);if(null!=Ea.dependentProps)for(Ra=0;Ra<Ea.dependentProps.length;Ra++){var ka=Ea.dependentPropsDefVal[Ra],-pa=Ea.dependentPropsVals[Ra];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ka);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Ra],pa,ya.getSelectionCells());P.push(Ea.dependentProps[Ra]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",P,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function V(Ra,za){za.style.left="0px";za.style.top="0px";za.style.position=-"relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Ra,za,Ea){function C(R){if(null==R||R==mxConstants.NONE)P.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)P.style.background="";else{var W=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&W.light!=W.dark?P.style.background="linear-gradient(to right bottom, "+W.cssText+" 50%, "+mxUtils.invertLightDarkColor(W).cssText+-" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ra,W,Ea);C(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function X(Ra,za,Ea,C,P,-R,W){null!=za&&(za=za.split(","),wa.push({name:Ra,values:za,type:Ea,defVal:C,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ra)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:P};pa=la(Ra,"",xa,0==pa%2,W);T(Ra,C,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ia)}));btn.style.height=-"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ra,za,Ea,C,P,R,W){if(0<P){var ia=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ia[ka]=null!=za[ka]?za[ka]:null!=C?C:"";wa.push({name:Ra,values:ia,type:Ea,defVal:C,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ra,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Ra,C.checked?"1":"0",Ea,null,C)});return C}-function la(Ra,za,Ea,C,P){var R=Ea.dispName,W=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(P?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Ra);ia.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);C&&(ka.style.textAlign="right");ia.appendChild(ka);-ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ra,-za,Ea));else if("bool"==W||"boolean"==W)ka.appendChild(na(Ra,za,Ea));else if("enum"==W){var pa=Ea.enumList;ka.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ka.appendChild(xa);for(P=0;P<pa.length;P++)if(R=pa[P],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){var Ia=mxEvent.getSource(ua);if(!(Ia!=ka&&Ia!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),-Wa=null;V(ka,Va);for(ua=0;ua<pa.length;ua++){Ia=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ta,mxResources.get(Ia.dispName,null,Ia.dispName));Va.appendChild(Ta);null==Ia.val&&(Ta.value="null",Wa=Ta)}Va.value=null==za&&null!=Wa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var ab=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Wa||"null"==ab.value)ab=null;T(Ra,ab,Ea)});Va.focus();mxEvent.addListener(Va,"blur",-function(){xa.innerHTML="";for(var ab=0;ab<pa.length;ab++){var Pa=pa[ab];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(X(Ra,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,P));else if("staticArr"==W)ka.appendChild(fa(Ra,za,Ea.subType,Ea.subDefVal,Ea.size,ia,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ra?(ia.firstChild.innerHTML=-"",ia.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ia.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ta=document.createElement("div");ta.className="gePropValue";ka.appendChild(ta);ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));-mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){function Ia(){var Ta=Wa.value;Ta=0==Ta.length&&"string"!=W&&"numbers"!=W?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",W="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var ab=null;try{ab="numbers"==W?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==W?parseInt(Ta):Ta)+"")}catch(Pa){}T(Ra,ab,Ea,null,Wa)}var Va=mxEvent.getSource(ua);-if(!(Va!=ka&&Va!=ta||mxEvent.isConsumed(ua))){ta.innerHTML="";var Wa=document.createElement("input");V(ta,Wa);Wa.value=decodeURIComponent(za);Wa.className="gePropEditor";"int"!=W&&"float"!=W||Ea.allowAuto||(Wa.type="number",Wa.step="int"==W?"1":"any",null!=Ea.min&&(Wa.min=parseFloat(Ea.min)),null!=Ea.max&&(Wa.max=parseFloat(Ea.max)));ta.appendChild(Wa);mxEvent.addListener(Wa,"keypress",function(Ta){13==Ta.keyCode&&Ia()});Wa.focus();mxEvent.addListener(Wa,"blur",function(){Ia()})}}))}Ea.isDeletable&&-(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ra,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ia.appendChild(ka);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ja=document.createElement("table");Ja.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=-"16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Ra=Ja.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var C=k.childNodes[Ea],P=C.nodeName.toUpperCase();"INPUT"!=P&&"SELECT"!=P||k.removeChild(C)}catch(R){}}else Ba.style.backgroundImage=-"url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Ra.length;Ea++)Ra[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ja.appendChild(Aa);var ra=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&-1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||N||Ja.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var Ca in v)if(N=v[Ca],!N.primary&&("function"!=typeof N.isVisible||N.isVisible(J,this))){var Da=null!=N.getValue?N.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(J,this):N.defVal;if("separator"==N.type)ra=!ra;else{if("staticArr"==N.type)N.size=parseInt(J.style[N.sizeProperty]||v[N.sizeProperty].defVal)||-0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Oa=[];for(Aa=0;Aa<va.length;Aa++){var Qa=J.style[va[Aa]];Oa.push(v[va[Aa]].subDefVal);Na.push(null!=Qa?Qa.split(","):[])}N.dependentPropsDefVal=Oa;N.dependentPropsVals=Na}Ja.appendChild(la(Ca,Da,N,Ma,ra));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,-size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ja);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var X=document.createElement("div");+this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,O){function T(Ua,za,Ea,B,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==+Ua;)W.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<W.length?null!=B?W.splice(B,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ua,za,ya.getSelectionCells());P.push(Ua);R.push(za);if(null!=Ea.dependentProps)for(Ua=0;Ua<Ea.dependentProps.length;Ua++){var ka=Ea.dependentPropsDefVal[Ua],+pa=Ea.dependentPropsVals[Ua];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ka);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Ua],pa,ya.getSelectionCells());P.push(Ea.dependentProps[Ua]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",P,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function V(Ua,za){za.style.left="0px";za.style.top="0px";za.style.position=+"relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Ua,za,Ea){function B(R){if(null==R||R==mxConstants.NONE)P.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)P.style.background="";else{var W=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&W.light!=W.dark?P.style.background="linear-gradient(to right bottom, "+W.cssText+" 50%, "+mxUtils.invertLightDarkColor(W).cssText++" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ua,W,Ea);B(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function X(Ua,za,Ea,B,P,+R,W){null!=za&&(za=za.split(","),wa.push({name:Ua,values:za,type:Ea,defVal:B,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ua)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:B,countProperty:P};pa=la(Ua,"",xa,0==pa%2,W);T(Ua,B,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ia)}));btn.style.height=+"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ua,za,Ea,B,P,R,W){if(0<P){var ia=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ia[ka]=null!=za[ka]?za[ka]:null!=B?B:"";wa.push({name:Ua,values:ia,type:Ea,defVal:B,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ua,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Ua,B.checked?"1":"0",Ea,null,B)});return B}+function la(Ua,za,Ea,B,P){var R=Ea.dispName,W=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(P?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Ua);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",B=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);B&&(ka.style.textAlign="right");ia.appendChild(ka);+ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ua,+za,Ea));else if("bool"==W||"boolean"==W)ka.appendChild(na(Ua,za,Ea));else if("enum"==W){var pa=Ea.enumList;ka.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ka.appendChild(xa);for(P=0;P<pa.length;P++)if(R=pa[P],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){var Ja=mxEvent.getSource(ua);if(!(Ja!=ka&&Ja!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),+Oa=null;V(ka,Va);for(ua=0;ua<pa.length;ua++){Ja=pa[ua];var Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(Sa,mxResources.get(Ja.dispName,null,Ja.dispName));Va.appendChild(Sa);null==Ja.val&&(Sa.value="null",Oa=Sa)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Ua,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",+function(){xa.innerHTML="";for(var Za=0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(X(Ua,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,P));else if("staticArr"==W)ka.appendChild(fa(Ua,za,Ea.subType,Ea.subDefVal,Ea.size,ia,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ua?(ia.firstChild.innerHTML=+"",ia.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ia.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ka.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));+mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){function Ja(){var Sa=Oa.value;Sa=0==Sa.length&&"string"!=W&&"numbers"!=W?0:Sa;Ea.allowAuto&&(null!=Sa.trim&&"auto"==Sa.trim().toLowerCase()?(Sa="auto",W="string"):(Sa=parseFloat(Sa),Sa=isNaN(Sa)?0:Sa));null!=Ea.min&&Sa<Ea.min?Sa=Ea.min:null!=Ea.max&&Sa>Ea.max&&(Sa=Ea.max);var Za=null;try{Za="numbers"==W?Sa.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==W?parseInt(Sa):Sa)+"")}catch(Pa){}T(Ua,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);+if(!(Va!=ka&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");V(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=W&&"float"!=W||Ea.allowAuto||(Oa.type="number",Oa.step="int"==W?"1":"any",null!=Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Sa){13==Sa.keyCode&&Ja()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ja()})}}))}Ea.isDeletable&&+(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ua,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ia.appendChild(ka);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=+"16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Ua=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],P=B.nodeName.toUpperCase();"INPUT"!=P&&"SELECT"!=P||k.removeChild(B)}catch(R){}}else Ba.style.backgroundImage=+"url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Ua.length;Ea++)Ua[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&+1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||O||Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var Ca in v)if(O=v[Ca],!O.primary&&("function"!=typeof O.isVisible||O.isVisible(J,this))){var Da=null!=O.getValue?O.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=O.getDefaultValue?O.getDefaultValue(J,this):O.defVal;if("separator"==O.type)sa=!sa;else{if("staticArr"==O.type)O.size=parseInt(J.style[O.sizeProperty]||v[O.sizeProperty].defVal)||+0;else if(null!=O.dependentProps){var va=O.dependentProps,Na=[],Ra=[];for(Aa=0;Aa<va.length;Aa++){var Ta=J.style[va[Aa]];Ra.push(v[va[Aa]].subDefVal);Na.push(null!=Ta?Ta.split(","):[])}O.dependentPropsDefVal=Ra;O.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,O,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(O=wa[Aa],v=O.parentRow,Ca=0;Ca<O.values.length;Ca++)Ma=la(O.name,O.values[Ca],{type:O.type,parentRow:O.parentRow,isDeletable:O.isDeletable,index:Ca,defVal:O.defVal,countProperty:O.countProperty,+size:O.size},0==Ca%2,O.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,O=document.createElement("div");O.style.padding="6px 20px 0 24px";k.appendChild(O);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var X=document.createElement("div");X.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(X,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);V.push(X);T.appendChild(X)}var fa=mxUtils.bind(this,function(ya){null!=V[ya]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,na(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,-function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ja=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,+function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ia=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){J.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=J.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!J.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),J.getModel().isVertex(Da[va])&&(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null)));J.getModel().setStyle(Da[va],Na)}}finally{J.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px";if(null!=Ba){var Ma="1px solid";null!=Ba.border&&(Ma=Ba.border);if(null!=Ba.gradient)Ga.style.backgroundImage="linear-gradient("+-mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ra=mxUtils.getLightDarkColor(Ba.fill);Ga.style.backgroundImage="linear-gradient(to right bottom, "+ra.cssText+" 50%, "+ra.light+" 50.3%)"}null==-Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ra=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+ra.cssText,Ga.style.borderRightColor=ra.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ra=mxUtils.getValue(wa,-mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+ra;Ga.style.borderRadius="0";N.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",N.appendChild(Ma),-Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});N.innerText="";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(N),Ja(ya[Aa])});null==this.format.currentScheme?fa(Math.min(V.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("++mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var sa=mxUtils.getLightDarkColor(Ba.fill);Ga.style.backgroundImage="linear-gradient(to right bottom, "+sa.cssText+" 50%, "+sa.light+" 50.3%)"}null==+Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(sa=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+sa.cssText,Ga.style.borderRightColor=sa.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),sa=mxUtils.getValue(wa,+mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+sa;Ga.style.borderRadius="0";O.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",O.appendChild(Ma),+Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});O.innerText="";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(O),Ia(ya[Aa])});null==this.format.currentScheme?fa(Math.min(V.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(la,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(la),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));na(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,v){var J=Graph.fontMapping[v];null==J&&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==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,J,N){if(null!=k&&0<k.length&&null!=v&&0<v.length){N=null!=N?N:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var V=N[T];null!=-V&&V.url!=v&&(V.elt.parentNode.removeChild(V.elt),V=null);null==V?(V=v,"http:"==v.substring(0,5)&&(V=PROXY_URL+"?url="+encodeURIComponent(v)),V={name:k,url:v,elt:Graph.createFontElement(k,V)},N[T]=V,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=J&&("link"==V.elt.nodeName.toLowerCase()?(V.elt.onload=J,V.elt.onerror=J):J()),null!=v&&v.appendChild(V.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();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 J=k[v].getAttribute("data-font-src");if(null!=J){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,J)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(v))}catch(N){}}}return k};+k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,J,O){if(null!=k&&0<k.length&&null!=v&&0<v.length){O=null!=O?O:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var V=O[T];null!=+V&&V.url!=v&&(V.elt.parentNode.removeChild(V.elt),V=null);null==V?(V=v,"http:"==v.substring(0,5)&&(V=PROXY_URL+"?url="+encodeURIComponent(v)),V={name:k,url:v,elt:Graph.createFontElement(k,V)},O[T]=V,v=O==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=J&&("link"==V.elt.nodeName.toLowerCase()?(V.elt.onload=J,V.elt.onerror=J):J()),null!=v&&v.appendChild(V.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();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 J=k[v].getAttribute("data-font-src");if(null!=J){var O="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=O&&Graph.addFont(O,J)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(v))}catch(O){}}}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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=-T}n.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(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):J.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=-function(T){var V=this.graph.getCellStyle(T);if(null!=V&&"rack"==V.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=V.rackUnitSize?parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=V.marginLeft||0;U.marginRight=V.marginRight||0;U.marginTop=V.marginTop||0;U.marginBottom=V.marginBottom||0;U.allowGaps=V.allowGaps||0;U.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,-arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,V,U,X,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&-Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=X.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)X.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);X.setSelectionCells(Ba)}function V(Aa){X.setHiddenTags(Aa?[]:fa.slice());T();X.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";-var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var ra=0;ra<Aa.length;ra++)(function(Ca){function Da(){var za=X.getCellsForTags([Ca],null,null,!0);X.isEnabled()?X.setSelectionCells(za):X.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(X.hiddenTags,Ca),Na=document.createElement("tr"),Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";var Qa=document.createElement("img");Qa.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Qa.setAttribute("title",-mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";Oa.appendChild(Qa);mxEvent.addListener(Qa,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(X.hiddenTags,Ca)):(X.toggleHiddenTag(Ca),T(),X.refresh());mxEvent.consume(za)});Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.align="center";-Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.selectImage);Qa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){V(!0);Da();mxEvent.consume(za)});Oa.appendChild(Qa);Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.overflow=-"hidden";Oa.style.whiteSpace="nowrap";Oa.style.textOverflow="ellipsis";Oa.style.verticalAlign="middle";Oa.style.cursor="pointer";Oa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Oa.appendChild(a);mxEvent.addListener(Oa,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<X.hiddenTags.length)V(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);-X.setHiddenTags(Ea);T();X.refresh()}mxEvent.consume(za)});Na.appendChild(Oa);if(X.isEnabled()){Oa=document.createElement("td");Oa.style.verticalAlign="middle";Oa.style.textAlign="center";Oa.style.width="18px";if(null==Ba){Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.trashImage);Qa.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor=-"pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);X.removeTagsForCells(X.model.getDescendants(X.model.getRoot()),[Ca]);X.refresh();mxEvent.consume(za)});Oa.appendChild(Qa)}else{var Ra=document.createElement("input");Ra.setAttribute("type","checkbox");Ra.style.margin="0px";Ra.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ra.checked=Ra.defaultChecked;Ra.style.background=-"transparent";Ra.setAttribute("title",mxResources.get(Ra.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ra,"change",function(za){Ra.checked?X.addTagsForCells(X.getSelectionCells(),[Ca]):X.removeTagsForCells(X.getSelectionCells(),[Ca]);mxEvent.consume(za)});Oa.appendChild(Ra)}Na.appendChild(Oa)}Ma.appendChild(Na)})(Aa[ra]);Ga.appendChild(Ma);la.appendChild(Ga)}}var X=this,fa=X.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding=+T}n.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(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):J.apply(this,arguments)};var O=this.layoutManager.getLayout;this.layoutManager.getLayout=+function(T){var V=this.graph.getCellStyle(T);if(null!=V&&"rack"==V.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=V.rackUnitSize?parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=V.marginLeft||0;U.marginRight=V.marginRight||0;U.marginTop=V.marginTop||0;U.marginBottom=V.marginBottom||0;U.allowGaps=V.allowGaps||0;U.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return O.apply(this,+arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,O,T,V,U,X,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&+Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,O){function T(){for(var Aa=X.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)X.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);X.setSelectionCells(Ba)}function V(Aa){X.setHiddenTags(Aa?[]:fa.slice());T();X.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";+var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var sa=0;sa<Aa.length;sa++)(function(Ca){function Da(){var za=X.getCellsForTags([Ca],null,null,!0);X.isEnabled()?X.setSelectionCells(za):X.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(X.hiddenTags,Ca),Na=document.createElement("tr"),Ra=document.createElement("td");Ra.style.align="center";Ra.style.width="16px";var Ta=document.createElement("img");Ta.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ta.setAttribute("title",+mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Ta,va?75:25);Ta.className="geAdaptiveAsset";Ta.style.verticalAlign="middle";Ta.style.cursor="pointer";Ta.style.width="16px";if(v||Editor.isDarkMode())Ta.style.filter="invert(100%)";Ra.appendChild(Ta);mxEvent.addListener(Ta,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(X.hiddenTags,Ca)):(X.toggleHiddenTag(Ca),T(),X.refresh());mxEvent.consume(za)});Na.appendChild(Ra);Ra=document.createElement("td");Ra.style.align="center";+Ra.style.width="16px";Ta=document.createElement("img");Ta.setAttribute("src",Editor.selectImage);Ta.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ta,va?75:25);Ta.className="geAdaptiveAsset";Ta.style.verticalAlign="middle";Ta.style.cursor="pointer";Ta.style.width="16px";if(v||Editor.isDarkMode())Ta.style.filter="invert(100%)";mxEvent.addListener(Ta,"click",function(za){V(!0);Da();mxEvent.consume(za)});Ra.appendChild(Ta);Na.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",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Ra.appendChild(a);mxEvent.addListener(Ra,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<X.hiddenTags.length)V(!0);else{var Ea=fa.slice(),B=mxUtils.indexOf(Ea,Ca);Ea.splice(B,1);+X.setHiddenTags(Ea);T();X.refresh()}mxEvent.consume(za)});Na.appendChild(Ra);if(X.isEnabled()){Ra=document.createElement("td");Ra.style.verticalAlign="middle";Ra.style.textAlign="center";Ra.style.width="18px";if(null==Ba){Ra.style.align="center";Ra.style.width="16px";Ta=document.createElement("img");Ta.setAttribute("src",Editor.trashImage);Ta.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Ta,va?75:25);Ta.className="geAdaptiveAsset";Ta.style.verticalAlign="middle";Ta.style.cursor=+"pointer";Ta.style.width="16px";if(v||Editor.isDarkMode())Ta.style.filter="invert(100%)";mxEvent.addListener(Ta,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);X.removeTagsForCells(X.model.getDescendants(X.model.getRoot()),[Ca]);X.refresh();mxEvent.consume(za)});Ra.appendChild(Ta)}else{var Ua=document.createElement("input");Ua.setAttribute("type","checkbox");Ua.style.margin="0px";Ua.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ua.checked=Ua.defaultChecked;Ua.style.background=+"transparent";Ua.setAttribute("title",mxResources.get(Ua.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ua,"change",function(za){Ua.checked?X.addTagsForCells(X.getSelectionCells(),[Ca]):X.removeTagsForCells(X.getSelectionCells(),[Ca]);mxEvent.consume(za)});Ra.appendChild(Ua)}Na.appendChild(Ra)}Ma.appendChild(Na)})(Aa[sa]);Ga.appendChild(Ma);la.appendChild(Ga)}}var X=this,fa=X.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding="10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);X.addListener(mxEvent.ROOT,function(){fa=X.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=X.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);fa.sort();X.isSelectionEmpty()?U(fa):U(fa,X.getCommonTagsForCells(X.getSelectionCells()))}});X.selectionModel.addListener(mxEvent.CHANGE,qa);X.model.addListener(mxEvent.CHANGE,qa);X.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";-ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(X.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ja=wa.cloneNode(!1);Ja.style.backgroundImage="url("+Editor.visibleImage+")";Ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ja,"click",function(Aa){X.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=X.hiddenTags.slice());T();X.refresh();mxEvent.consume(Aa)});ya.appendChild(Ja);null!=-J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};-Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",!1,J);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,V=0;V<N.length;V++)N[V].getAttribute("face")==J&&(T=!0,N[V].setAttribute("face",k),null!=v?N[V].setAttribute("data-font-src",v):N[V].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.apply(this,arguments)&&+ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(X.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ia=wa.cloneNode(!1);Ia.style.backgroundImage="url("+Editor.visibleImage+")";Ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ia,"click",function(Aa){X.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=X.hiddenTags.slice());T();X.refresh();mxEvent.consume(Aa)});ya.appendChild(Ia);null!=+J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=O&&ya.appendChild(O);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};+Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",!1,J);for(var O=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,V=0;V<O.length;V++)O[V].getAttribute("face")==J&&(T=!0,O[V].setAttribute("face",k),null!=v?O[V].setAttribute("data-font-src",v):O[V].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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(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 L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=L.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 K=Graph.prototype.getSvg;Graph.prototype.getSvg=-function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var ra=Ba.ownerDocument;Ga=null!=ra.createElementNS?ra.createElementNS(mxConstants.NS_SVG,"style"):ra.createElement("style");null!=ra.setAttributeNS?-Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Oa=Ma[va].url;Graph.isCssFontUrl(Oa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Oa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Oa+'");\n}\n'}Ga.appendChild(ra.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);+function(k,v,J,O,T,V,U,X,fa,na,la,qa,ya,wa,Ia,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var sa=Ba.ownerDocument;Ga=null!=sa.createElementNS?sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?+Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Ra=Ma[va].url;Graph.isCssFontUrl(Ra)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Ra)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Ra+'");\n}\n'}Ga.appendChild(sa.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var aa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){aa.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 ja=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ja.apply(this,arguments);this.enumerationState=0};var ca=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ca.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 J=k.view.scale,N=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));v.bounds.equals(k)&&v.value==N&&v.scale==J||(v.bounds=k,v.value=N,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&+v){var J=k.view.scale,O=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));v.bounds.equals(k)&&v.value==O&&v.scale==J||(v.bounds=k,v.value=O,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.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,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 N=!1,T=0,V=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),X=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=+!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var O=!1,T=0,V=0,U=mxUtils.bind(this,function(){O||(O=!0,this.model.beginUpdate())}),X=mxUtils.bind(this,function(){O&&(O=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=this.stoppingCustomActions,qa=k[V++],ya=[];if(null!=qa.open)if(X(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),X());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(U(),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&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&-this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ja=qa.tags.toggle;0==Ja.length&&(Ja=this.getAllTags());for(wa=0;wa<Ja.length;wa++)this.toggleHiddenTag(Ja[wa])}Ja=null;null!=qa.tags.hidden&&(null==Ja&&(Ja=[]),Ja=Ja.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ja&&(Ja=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,-Aa[wa])&&0>mxUtils.indexOf(Ja,Aa[wa])&&Ja.push(Aa[wa])}null!=Ja&&this.setHiddenTags(Ja);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():X()}else this.stoppingCustomActions=this.executingCustomActions=!1,X(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");-N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),V=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),V=!0);V&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(N){}return v};-Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var N=v[J],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var N=[],T=0;T<v[J].length;T++)if("*"==v[J][T])N.push(v[J][T]);else{var V=k[v[J][T]];null!=V?""!=V&&N.push(V):N.push(v[J][T])}v[J]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var Y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return Y.apply(this,arguments)&&+this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ia=qa.tags.toggle;0==Ia.length&&(Ia=this.getAllTags());for(wa=0;wa<Ia.length;wa++)this.toggleHiddenTag(Ia[wa])}Ia=null;null!=qa.tags.hidden&&(null==Ia&&(Ia=[]),Ia=Ia.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ia&&(Ia=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,+Aa[wa])&&0>mxUtils.indexOf(Ia,Aa[wa])&&Ia.push(Aa[wa])}null!=Ia&&this.setHiddenTags(Ia);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():X()}else this.stoppingCustomActions=this.executingCustomActions=!1,X(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var O=document.createElement("div");+O.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=O.getElementsByTagName("a"),V=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),V=!0);V&&this.labelChanged(v,O.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(O){}return v};+Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var O=v[J],T;for(T in O)this.updateCustomLinkAction(k,O[T],"cells"),this.updateCustomLinkAction(k,O[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var O=[],T=0;T<v[J].length;T++)if("*"==v[J][T])O.push(v[J][T]);else{var V=k[v[J][T]];null!=V?""!=V&&O.push(V):O.push(v[J][T])}v[J]=O}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,+null,v));if(null!=k.excludeCells){for(var J=[],O=0;O<v.length;O++)0>k.excludeCells.indexOf(v[O].id)&&J.push(v[O]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var O=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=O},O))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var Y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return Y.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,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},X=0;X<k.length;X++)0<k[X].length&&(U[k[X]]=!0,V++);for(X=0;X<v.length;X++)if(J&&this.model.getParent(v[X])==this.model.root||this.model.isVertex(v[X])||this.model.isEdge(v[X])){var fa=this.getTagsForCell(v[X]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=-na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=N||this.isCellVisible(v[X]))&&T.push(v[X])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};-Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var V=0;V<T.length;V++)null==J[T[V]]&&(J[T[V]]=!0,v.push(T[V]))}}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 J=0;J<k.length;J++){for(var N=this.getTagsForCell(k[J]),T=N.split(" "),V=!1,U=0;U<-v.length;U++){var X=mxUtils.trim(v[U]);""!=X&&0>mxUtils.indexOf(T,X)&&(N=0<N.length?N+" "+X:X,V=!0)}V&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),V=!1,U=0;U<v.length;U++){var X=mxUtils.indexOf(T,v[U]);0<=X&&(T.splice(X,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",-T.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 J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,-J,N)};Graph.prototype.highlightCell=function(k,v,J,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var V=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),V=new mxCellHighlight(this,v,T,!1),null!=N&&(V.opacity=N),V.highlight(k),window.setTimeout(function(){null!=V.shape&&(mxUtils.setPrefixedStyle(V.shape.node.style,"transition","all 1200ms ease-in-out"),V.shape.node.style.opacity=0);window.setTimeout(function(){V.destroy()},-1200)},J));return V};Graph.prototype.addSvgShadow=function(k,v,J,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,+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,J,O){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},X=0;X<k.length;X++)0<k[X].length&&(U[k[X]]=!0,V++);for(X=0;X<v.length;X++)if(J&&this.model.getParent(v[X])==this.model.root||this.model.isVertex(v[X])||this.model.isEdge(v[X])){var fa=this.getTagsForCell(v[X]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=+na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=O||this.isCellVisible(v[X]))&&T.push(v[X])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],O=0;O<k.length;O++){var T=this.getTagsForCell(k[O]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};+Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},O=0;O<k.length;O++){var T=this.getTagsForCell(k[O]);if(0<T.length){T=T.split(" ");for(var V=0;V<T.length;V++)null==J[T[V]]&&(J[T[V]]=!0,v.push(T[V]))}}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 J=0;J<k.length;J++){for(var O=this.getTagsForCell(k[J]),T=O.split(" "),V=!1,U=0;U<+v.length;U++){var X=mxUtils.trim(v[U]);""!=X&&0>mxUtils.indexOf(T,X)&&(O=0<O.length?O+" "+X:X,V=!0)}V&&this.setAttributeForCell(k[J],"tags",O)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var O=this.getTagsForCell(k[J]);if(0<O.length){for(var T=O.split(" "),V=!1,U=0;U<v.length;U++){var X=mxUtils.indexOf(T,v[U]);0<=X&&(T.splice(X,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",+T.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 J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,O){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,+J,O)};Graph.prototype.highlightCell=function(k,v,J,O,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var V=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),V=new mxCellHighlight(this,v,T,!1),null!=O&&(V.opacity=O),V.highlight(k),window.setTimeout(function(){null!=V.shape&&(mxUtils.setPrefixedStyle(V.shape.node.style,"transition","all 1200ms ease-in-out"),V.shape.node.style.opacity=0);window.setTimeout(function(){V.destroy()},+1200)},J));return V};Graph.prototype.addSvgShadow=function(k,v,J,O){O=null!=O?O:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&O&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,h=parseFloat(v[3])+T,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return T};Graph.prototype.updateShadowFilter=function(k,v){mxClient.IS_SF||(v?(v=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),k.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+v.cssText+")"):k.style.filter="")};Graph.prototype.setShadowVisible=function(k,v){v=null!=v?v:!0;this.shadowVisible=k;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);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 J=this.model.getChildAt(this.model.root,v);while(v++<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",@@ -3461,32 +3461,32 @@ mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.x[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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(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 da=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,V,U,X,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return da.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,V){"1"==mxUtils.getValue(v.style,"lineShape",-null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ha.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,N){function T(){Ja.value=Math.max(1,Math.min(la,Math.max(parseInt(Ja.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ja.value),parseInt(wa.value))))}function V(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=-ra.checked;ya.checked&&wa.value<Ja.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ja.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=P.value;k.lastPrintGrid=W.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=C.value;var Ia={};Ia.border=parseInt(P.value);Ia.scale=parseInt(R.value)/100;-Ia.grid=W.checked;Ia.shadows=ia.checked;Ia.transparent=ka.checked;Ia.includeCopy=pa.checked;Ia.sheetsAcross=parseInt(Ea.value);Ia.sheetsDown=parseInt(C.value);Ia.pagesFrom=parseInt(wa.value);Ia.pagesTo=parseInt(Ja.value);Ia.allPages=qa.checked;Ia.selection=Ba.checked;Ia.pageView=Ga.checked;Ia.crop=Ma.checked;Ia.fit=ra.checked;return null!=J?J(!ua,Ia):k.print(!ua,Ia)}var U=k.editor.graph,X=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";+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 da=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,O,T,V,U,X,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return da.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,O,T,V){"1"==mxUtils.getValue(v.style,"lineShape",+null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ha.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,O){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function V(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=+sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=P.value;k.lastPrintGrid=W.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=B.value;var Ja={};Ja.border=parseInt(P.value);Ja.scale=parseInt(R.value)/100;+Ja.grid=W.checked;Ja.shadows=ia.checked;Ja.transparent=ka.checked;Ja.includeCopy=pa.checked;Ja.sheetsAcross=parseInt(Ea.value);Ja.sheetsDown=parseInt(B.value);Ja.pagesFrom=parseInt(wa.value);Ja.pagesTo=parseInt(Ia.value);Ja.allPages=qa.checked;Ja.selection=Ba.checked;Ja.pageView=Ga.checked;Ja.crop=Ma.checked;Ja.fit=sa.checked;return null!=J?J(!ua,Ja):k.print(!ua,Ja)}var U=k.editor.graph,X=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));X.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.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");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);-mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.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";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ja=-wa.cloneNode(!0);fa.appendChild(Ja);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ja,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ja,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ja.value=Math.min(la,Math.max(1,-k.lastPrintPagesToInput))):(wa.value=na,Ja.value=na);wa.setAttribute("max",la);Ja.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ja.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&X.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=+mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.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";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=+wa.cloneNode(!0);fa.appendChild(Ia);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ia,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ia,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ia.value=Math.min(la,Math.max(1,+k.lastPrintPagesToInput))):(wa.value=na,Ia.value=na);wa.setAttribute("max",la);Ia.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ia.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&X.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom="1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&X.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name","printSize");U.appendChild(Ga);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=-!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom="8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ra);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");-var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Oa=va.cloneNode(!0),Qa=va.cloneNode(!0),Ra=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Qa.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=ra&&(ra.checked=!ra.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",-k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Oa.appendChild(v);mxUtils.write(Qa,mxResources.get("fitToBy"));var C=Ea.cloneNode(!0);C.setAttribute("value",k.lastPrintSheetsDown||"1");Ra.appendChild(C);mxEvent.addListener(Ea,"click",function(ua){ra.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(C,"click",function(ua){ra.checked=-!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?ra.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Oa);Da.appendChild(Qa);Da.appendChild(Ra);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";+!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(sa);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");+var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Ra=va.cloneNode(!0),Ta=va.cloneNode(!0),Ua=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Ta.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=sa&&(sa.checked=!sa.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",+k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Ra.appendChild(v);mxUtils.write(Ta,mxResources.get("fitToBy"));var B=Ea.cloneNode(!0);B.setAttribute("value",k.lastPrintSheetsDown||"1");Ua.appendChild(B);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(B,"click",function(ua){sa.checked=+!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Ra);Da.appendChild(Ta);Da.appendChild(Ua);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.style.width="40px";P.style.marginLeft="4px";P.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(P);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var W=document.createElement("input");W.setAttribute("type","checkbox");W.style.marginTop="12px";W.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(W);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,"click",function(ua){W.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ia.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ka),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&-(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);X.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?-(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Ia){ua=Ia.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=+(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));O=null!=O?O:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";O=mxUtils.button(mxResources.get(O),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});O.className="geBtn gePrimaryBtn";v.appendChild(O);k.editor.cancelFirst||v.appendChild(U);X.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?+(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ra=function(ua,Ja){ua=Ja.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ra),k.removeListener(xa))};k.editor.addListener("hideDialog",ra)}this.container=X};var Z=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 Z.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)}})();(function(){EditorUi.VERSION="28.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&&+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.1.1";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||"1"==urlParams.dev;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:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',@@ -3523,72 +3523,71 @@ Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("typenavigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));null!=ja&&(Y=Y.cloneNode(!0),Y.setAttribute("scale",ja));null!=ca&&(Y=Y.cloneNode(!0),Y.setAttribute("border",ca));c=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!F&&!x&&(I||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(Y),g,null!=m?m.getTitle():null,oa,ba);else if(F||!x&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(Y),c=this.getEmbeddedSvg(c,g,n,null,M,L,ba,null,null,m.scale,m.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,m,n){c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var K=L.getElementsByTagName("mxGraphModel"),aa=0<K.length?K[0]:null;K=L;null==aa&&m?(aa=mxUtils.getNodeValue(L),0<aa.length&&(aa=Graph.decompress(aa),null!=aa&&0<aa.length&&(K=L.cloneNode(!1),K.appendChild(mxUtils.parseXml(aa).documentElement)))):null==aa||m?K=L.cloneNode(!0):(K=L.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(aa)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],I=F.node;-if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(I);I.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&(null!=F.viewState.backgroundImage.originalSrc?F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.originalSrc,F):Graph.isPageLink(F.viewState.backgroundImage.src)&&-(F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.src,F))),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,M,null,n),I=I.cloneNode(!1),I.appendChild(M)));c(I)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var m=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?-m.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);-null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var I=x.cells[F];if(null!=I){for(var M in I)null!=I[M].value&&(I[M].value="["+I[M].value.length+"]"),-null!=I[M].xmlValue&&(I[M].xmlValue="["+I[M].xmlValue.length+"]"),null!=I[M].style&&(I[M].style="["+I[M].style.length+"]"),mxUtils.isEmptyObject(I[M])&&delete I[M];mxUtils.isEmptyObject(I)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,-g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=function(c,g){g=c.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 c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?-this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?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(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var Y=null!=this.pages?-this.pages[0]:null;null==Y||this.currentPage==Y?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=Y.viewState&&null!=Y.viewState&&ba.setBackgroundImage(Y.viewState.backgroundImage);ba.getGlobalVariable=function(da){return"page"==da&&null!=Y?Y.getName():"pagenumber"==da?1:oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=Y&&ba.model.setRoot(Y.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,-c,g,m,n,x,M,K,ja,ca);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){I=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var L=g.view.scale;F=Math.floor(I.x/L-g.view.translate.x);L=Math.floor(I.y/L-g.view.translate.y);I=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+-g));c.setAttribute("x0",F);c.setAttribute("y0",L)}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!=x&&(x=x.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':-"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&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;">'+n+"</div>\n</div>\n"+-(null==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,g,m,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.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==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+-x+"'\"/>\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==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" 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 g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")+" ("+m+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),-m={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=-null!=x?x: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 I=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<I.length;F++)g[I[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(aa){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":-"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,-K,aa,ja,void 0,void 0,!F,ca,ba,oa,Y,da)}catch(X){this.handleError(X)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;if(I||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);-this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else Z=ha+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();J(V)}),n)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z);g="";for(var k in c)m=-c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=-K?"1":"0";"pdf"==g&&(null!=aa?(J=aa.from,N=aa.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,-color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ja&&isFinite(ja)?ja:null,h:ca&&isFinite(ca)?ca:null,crop:null!=ba&&ba?"1":"0",fit:null!=Y&&Y?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:da,sheetsDown:ha}};EditorUi.prototype.setMode=-function(c,g){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 g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m+1));try{g=JSON.parse(c)}catch(n){}}}return g};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 g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};-EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(I){var M=null!=c.data?c.data:"";null!=I&&0<I.length&&(0<M.length&&(M+="\n"),M+=I);I=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return n};this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);-this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),-ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();aa()}));ja();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,-k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,N){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==-K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ja=0;ja<aa.length;ja++)x.setAttributeForCell(M,aa[ja].nodeName,0<aa[ja].nodeValue.length?aa[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "+M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=-oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var Y=c.getAttribute("geometry");if(null!=Y){Y=JSON.parse(Y);var da=x.getCellGeometry(M);if(null!=da){da=da.clone();for(key in Y){var ha=parseFloat(Y[key]);"dx"==key?da.x+=ha:"dy"==key?da.y+=ha:"dw"==key?da.width+=ha:"dh"==key?da.height+=ha:da[key]=parseFloat(Y[key])}x.model.setGeometry(M,da)}}}catch(k){null!=window.console&&console.log("Error in icon for "+-M.id+": "+k)}}}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,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.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{F.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=x.getDate(),I=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+I+"-"+M+"-"+x))}return m=mxResources.get("copyOf",-[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!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 F=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);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));x=!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.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+I})}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(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}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)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction=-{label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var I=c[F].node.cloneNode(!1);-I.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");I.appendChild(M);null!=g&&(g.eltCount+=I.getElementsByTagName("*").length,g.nodeCount+=I.getElementsByTagName("mxCell").length);m=(m<<5)-m+this.hashValue(I,function(L,K,aa,ja){return!ja||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==L.nodeName&&"previous"==K?null:aa:-Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){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,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,I=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=I&&(n^=this.hashValue(F,g,m)+this.hashValue(I,-g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,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 g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));-g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\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 g=this.sidebar.palettes[c];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);-delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));c=null!=c?c:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var n=g.previousSibling;m.insertBefore(g,c);m.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var m=mxUtils.parseXml(c.getData());-if("mxlibrary"==m.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(c,n,m.documentElement.getAttribute("title"),g)}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.showSearchWindow=function(c,g){var m=c?"findReplace":"find",-n=m+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(m))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=-g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,-expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,M=mxUtils.bind(this,function(ha,Z){0==ha.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(ha,Z)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),-null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ha){M(g,ha)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");K.style.backgroundColor="inherit";n.style.position="relative";-var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=ja?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),-mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var ca=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight=-"2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=aa.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ja||-c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(Z)})))}),Y=mxUtils.bind(this,function(ha,Z,k,v){ha=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var N=ca.getCellGeometry(ha[J]);null!=N&&N.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};-null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),da=mxUtils.bind(this,function(ha){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ha),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=ca.getSelectionCells(),k=ca.view.getBounds(Z);if(null!=k&&0<k.width&&0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=-v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;Y(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor=-"copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,da(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),-null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor="";L.style.backgroundColor=-"";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,N,T,V,U,X){if(null!=Z&&"image/"==k.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,N,T),Z)],Z[0].vertex=!0,Y(Z,new mxRectangle(0,0,N,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=I&&null!=I.parentNode&&-0<g.length&&(I.parentNode.removeChild(I),I=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ha);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=la.documentElement.getElementsByTagName("diagram");-for(ya=0;ya<wa.length;ya++){var Ja=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ja);null!=Aa&&Y(Ja,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=X&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(X,+if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(I);I.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,M,null,n,F),I=I.cloneNode(!1),+I.appendChild(M)));c(I)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var m=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?m.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=+function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];+null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var I=x.cells[F];if(null!=I){for(var M in I)null!=I[M].value&&(I[M].value="["+I[M].value.length+"]"),null!=I[M].xmlValue&&(I[M].xmlValue="["+I[M].xmlValue.length+"]"),null!=I[M].style&&(I[M].style="["+I[M].style.length+"]"),mxUtils.isEmptyObject(I[M])&&delete I[M];mxUtils.isEmptyObject(I)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);+mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=+function(c,g){g=c.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 c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?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(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var Y=null!=this.pages?this.pages[0]:null;null==Y||this.currentPage==Y?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=Y.viewState&&null!=Y.viewState&&ba.setBackgroundImage(Y.viewState.backgroundImage);ba.getGlobalVariable=function(da){return"page"==da&&null!=Y?Y.getName():"pagenumber"==da?1:+oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=Y&&ba.model.setRoot(Y.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,c,g,m,n,x,M,K,ja,ca);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){I=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());+var L=g.view.scale;F=Math.floor(I.x/L-g.view.translate.x);L=Math.floor(I.y/L-g.view.translate.y);I=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",L)}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!=x&&(x=x.replace(/&/g,"&"));c=+null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"++(null==x&&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;">'+n+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};+EditorUi.prototype.getHtml2=function(c,g,m,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.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==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"++(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'++x+'" 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 g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")++" ("+m+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),m={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||+null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x: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 I=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<I.length;F++)g[I[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(aa){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,m,n,x,+F,I,M,L,K,aa,ja,ca,ba,oa,Y,da){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,K,aa,ja,void 0,void 0,!F,ca,ba,oa,Y,da)}catch(X){this.handleError(X)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var O=this.editor.graph.background;+if(I||O==mxConstants.NONE)O=null;var T=this.editor.graph.getSvg(O,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else Z=ha+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();J(V)}),n)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,I,M,L,+K,aa,ja,ca,ba,oa,Y,da,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,O=null,T=null;if(!EditorUi.isElectronApp&&+(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=aa?(J=aa.from,O=aa.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=+aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:O,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ja&&isFinite(ja)?ja:null,h:ca&&isFinite(ca)?ca:null,crop:null!=+ba&&ba?"1":"0",fit:null!=Y&&Y?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:da,sheetsDown:ha}};EditorUi.prototype.setMode=function(c,g){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 g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m++1));try{g=JSON.parse(c)}catch(n){}}}return g};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 g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||+(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(I){var M=null!=c.data?c.data:"";null!=I&&0<I.length&&(0<M.length&&(M+="\n"),M+=I);I=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return n};+this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),+ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();aa()}));ja();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};+EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,O){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));+if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ja=0;ja<aa.length;ja++)x.setAttributeForCell(M,aa[ja].nodeName,0<aa[ja].nodeValue.length?aa[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "++M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var Y=c.getAttribute("geometry");if(null!=Y){Y=JSON.parse(Y);var da=x.getCellGeometry(M);if(null!=da){da=da.clone();for(key in Y){var ha=parseFloat(Y[key]);"dx"==key?da.x+=ha:"dy"==key?da.y+=ha:"dw"==key?da.width+=ha:"dh"==key?da.height+=ha:+da[key]=parseFloat(Y[key])}x.model.setGeometry(M,da)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}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,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.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{F.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=+x.getDate(),I=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+I+"-"+M+"-"+x))}return m=mxResources.get("copyOf",[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!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 F=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);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");+this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));x=!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.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?+"on":"off")+"_theme_"+I})}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(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}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)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=+function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var I=c[F].node.cloneNode(!1);I.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");I.appendChild(M);null!=g&&(g.eltCount+=I.getElementsByTagName("*").length,g.nodeCount+=I.getElementsByTagName("mxCell").length);+m=(m<<5)-m+this.hashValue(I,function(L,K,aa,ja){return!ja||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==L.nodeName&&"previous"==K?null:aa:Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){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,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=+c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,I=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=I&&(n^=this.hashValue(F,g,m)+this.hashValue(I,g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=+function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,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 g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\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 g=this.sidebar.palettes[c];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));+c=null!=c?c:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var n=g.previousSibling;m.insertBefore(g,c);m.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var m=mxUtils.parseXml(c.getData());if("mxlibrary"==m.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(c,n,m.documentElement.getAttribute("title"),g)}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.showSearchWindow=function(c,g){var m=c?"findReplace":"find",n=m+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(m))});this[n].window.addListener("hide",+function(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==+c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,M=mxUtils.bind(this,function(ha,Z){0==ha.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(ha,+Z)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ha){M(g,ha)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");+K.style.backgroundColor="inherit";n.style.position="relative";var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=+ja?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var ca=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),+ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=aa.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),+g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ja||c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(Z)})))}),Y=mxUtils.bind(this,function(ha,Z,k,v){ha=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var O=ca.getCellGeometry(ha[J]);null!=O&&O.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&+(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),da=mxUtils.bind(this,function(ha){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ha),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=ca.getSelectionCells(),k=ca.view.getBounds(Z);if(null!=k&&0<k.width&&+0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;Y(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor=+"light-dark(#fefefe, #000000)",L.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,da(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.graphHandler.first&&+(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor=+"";L.style.backgroundColor="";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,O,T,V,U,X){if(null!=Z&&"image/"==k.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,O,T),Z)],Z[0].vertex=!0,Y(Z,new mxRectangle(0,0,O,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=+I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ha);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=la.documentElement.getElementsByTagName("diagram");+for(ya=0;ya<wa.length;ya++){var Ia=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ia);null!=Aa&&Y(Ia,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=X&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(X,function(la){na(la,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Z,k)}}));ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ha){L.style.cursor="";L.style.backgroundColor="";ha.stopPropagation();ha.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));K.insertBefore(aa,K.firstChild);mxEvent.addListener(aa,"click",m);m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));K.insertBefore(m,K.firstChild);mxEvent.addListener(m,"click",da);".scratchpad"==c.title&&(this.addSelectionToScratchpad=da);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,@@ -3636,15 +3635,15 @@ function(K,aa,ja,ca){if("_blank"==aa||null!=K&&0<K.length){var ba=m("_blank"==aafunction(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,aa,oa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(Y){this.spinner.stop();this.handleError(Y)}))}),null!=ca?ja(ca):this.pickFolder(aa,ja)))}});x=[App.MODE_BROWSER];I||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,aa,ja){M(K.value,aa,K,ja);this.hideDialog(null,null,L.container)}),x,null,"application/pdf");this.showDialog(L.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,m,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,m){g(null)};EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var Y=g?null:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);null==Y&&0==g&&(Y=this.editor.graph.shapeBackgroundColor);var da=this.editor.graph.addForeignObjectWarning;-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ha=mxUtils.lightDarkColorSupported,Z=mxUtils.preferDarkColor;if("light"==aa||"dark"==aa)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==aa;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),N=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ha=mxUtils.lightDarkColorSupported,Z=mxUtils.preferDarkColor;if("light"==aa||"dark"==aa)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==aa;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),O=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);O.apply(this,arguments)};var T=this.editor.graph.getSvg(Y,c,I,M,null,m,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!ca,aa,ja);mxUtils.lightDarkColorSupported=ha;mxUtils.preferDarkColor=Z;this.editor.graph.addForeignObjectWarning=da;n&&this.editor.graph.addSvgShadow(T);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,I));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var X=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(la,aa,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,X,this.thumbImageCache)):X(la)});ca?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ja,ca,ba,oa,Y){var da=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");da.setAttribute("x",ca);da.setAttribute("y",ba+.5);da.setAttribute("width",oa.width);da.setAttribute("height",oa.height);null==da.setAttributeNS?da.setAttribute("xlink:href",Y):da.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Y);ja.replaceChild(da,ja.lastChild);M()}function x(){if(I<aa.length)aa[I++](x)}var F="";g=c.getElementsByTagName("style");for(var I=0;I<g.length;I++)F+=g[I].innerHTML;g=c.getElementsByTagName("switch");counter=g.length;var M=mxUtils.bind(this,function(){counter--;0==counter&&m(c)}),L={},K={},aa=[];for(I=0;I<g.length;I++)mxUtils.bind(this,function(ja){var ca=ja.getElementsByTagName("div");if(0<ca.length)try{var ba=ca[0].cloneNode(!0),oa=parseInt(ba.style.marginLeft),Y=parseInt(ba.style.paddingTop),da=ba.getElementsByTagName("div")[1],ha=ca=!1,Z=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;ha="vertical-"==v.substring(0,9);ca="-rl"==v.substring(v.length--3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&ca?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=L[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?da.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?-da.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,Y,v,J),L[N]=T);"1px"==ba.style.height&&("unsafe center"==Z?Y-=T.height/2:"unsafe flex-end"==Z&&(Y-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,Y,T.width,T.height+parseInt(da.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=-K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,function(X){n(ja,oa,Y,T,X);K[N]=X;V()}),F):(n(ja,oa,Y,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"++3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&ca?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var O=ba.outerHTML,T=L[O];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?da.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?+da.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,Y,v,J),L[O]=T);"1px"==ba.style.height&&("unsafe center"==Z?Y-=T.height/2:"unsafe flex-end"==Z&&(Y-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,Y,T.width,T.height+parseInt(da.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=+K[O];null==U?Graph.htmlToPng(O,T.width,T.height,mxUtils.bind(this,function(X){n(ja,oa,Y,T,X);K[O]=X;V()}),F):(n(ja,oa,Y,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();L.id=I;null!=M&&L.setAttribute("name",M);m&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);n&&L.setAttribute("disabled","disabled");F&&(c.appendChild(L),m=document.createElement("label"),mxUtils.write(m,g),m.setAttribute("for",I),c.appendChild(m),x||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,g){var m=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var I=document.createElement("option");I.setAttribute("value","custom");mxUtils.write(I,mxResources.get("custom")+"...");F.appendChild(I);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==F.value){var M=new FilenameDialog(this,x,mxResources.get("ok"),function(L){null!=L?(x=L,I.setAttribute("title",L)):(F.value="blank",I.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(M.container,300,80,!0,!1);M.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));@@ -3670,9 +3669,9 @@ oa.appendChild(ba);ba=document.createElement("option");mxUtils.write(ba,mxResour"text"),da.style.width="50px",da.style.marginLeft="6px",da.style.marginBottom="10px",da.value=m+"px",ca.appendChild(da),mxUtils.br(ca);var ha=this.addLinkSection(ca,n),Z=K?this.addCheckbox(ca,mxResources.get("transparentBackground"),!1):null;null!=Z&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ja&&(mxUtils.write(ca,mxResources.get("pages")+":"),ca.appendChild(k),mxUtils.br(ca),c+=30),v=this.addCheckbox(ca,mxResources.get("selectedPage")+": "+g));var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginTop="16px";ja=document.createElement("option");ja.setAttribute("value","0");mxUtils.write(ja,mxResources.get("light"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","1");mxUtils.write(ja,mxResources.get("dark"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","auto");mxUtils.write(ja,mxResources.get("automatic"));ja.setAttribute("selected","selected");J.appendChild(ja);aa&&(mxUtils.write(ca,-mxResources.get("appearance")+":"),ca.appendChild(J),mxUtils.br(ca),c+=30);var N=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,N),V=T.getEditInput();n&&(V.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=V.style.marginLeft;U.style.marginTop="8px";var X=this.addCheckbox(ca,mxResources.get("tags"),!0);X.style.marginLeft=V.style.marginLeft;X.style.marginBottom="16px";-X.style.marginTop="16px";mxEvent.addListener(N,"change",function(){N.checked?(U.removeAttribute("disabled"),V.removeAttribute("disabled"),X.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));V.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ha.getTarget(),ha.getColor(),null==-v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=Y?Y.value:null,null!=da?da.value:null,X.checked,oa.value,null!=Z?Z.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=Y?(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ha.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");+mxResources.get("appearance")+":"),ca.appendChild(J),mxUtils.br(ca),c+=30);var O=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,O),V=T.getEditInput();n&&(V.style.marginLeft=O.style.marginLeft,O.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=V.style.marginLeft;U.style.marginTop="8px";var X=this.addCheckbox(ca,mxResources.get("tags"),!0);X.style.marginLeft=V.style.marginLeft;X.style.marginBottom="16px";+X.style.marginTop="16px";mxEvent.addListener(O,"change",function(){O.checked?(U.removeAttribute("disabled"),V.removeAttribute("disabled"),X.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));V.checked&&O.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ha.getTarget(),ha.getColor(),null==+v?!1:v.checked,O.checked,T.getLink(),U.checked,null!=Y?Y.value:null,null!=da?da.value:null,X.checked,oa.value,null!=Z?Z.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=Y?(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ha.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");F.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:"+(x?"10":"4")+"px";F.appendChild(I);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";F.appendChild(M);mxUtils.write(F,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ja=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ja&&(ja.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ba=parseInt(L.value)||0;m(!K.checked,null!=aa?aa.checked:!1,null!=ja?ja.checked:!1,ca,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,I,M,L){I=null!=I?I:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace=@@ -3681,13 +3680,13 @@ mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.se"checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!aa.isSelectionEmpty()||"selectionOnly"!=c[ca]){var Z=document.createElement("option");mxUtils.write(Z,mxResources.get(c[ca]));Z.setAttribute("value",c[ca]);ha.appendChild(Z)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ha),mxUtils.br(K),ja+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(Y.checked=!0)})):F&&(K.appendChild(da),mxUtils.write(K,mxResources.get("crop")),mxUtils.br(K),ja+=30,mxEvent.addListener(Y,"change",function(){Y.checked?da.removeAttribute("disabled"):da.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?L&&(Y.style.display="none",Y.nextSibling.style.display="none",Y.nextSibling.nextSibling.style.display="none",ja-=30):(ha.value="diagram",da.setAttribute("checked","checked"),da.defaultChecked=!0,mxEvent.addListener(Y,"change",function(){ha.value=Y.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=M&&"webp"!=M),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));v.appendChild(L);"svg"==M&&mxUtils.lightDarkColorSupported?-(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),+(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),O=null;if("png"==M||"jpeg"==M||"webp"==M)O=this.addCheckbox(K,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ja+=30;aa=null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<aa?":":""),I,null,null,"jpeg"!=M&&"webp"!=M),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="28px";"png"==M||"svg"==M?(I=function(){T.checked?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),V.appendChild(F),F=document.createElement("option"),F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),V.appendChild(F),1<aa?(T.style.marginBottom="12px",V.style.marginBottom="16px",K.appendChild(V),mxUtils.br(K),ja+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(V.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",I),I()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),mxUtils.write(K,mxResources.get("embedImages")),mxUtils.br(K),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(X),mxUtils.write(K,mxResources.get("embedFonts")),mxUtils.br(K),ja+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);I=document.createElement("option");I.setAttribute("value","blank");mxUtils.write(I,mxResources.get("openInNewWindow"));fa.appendChild(I);I=document.createElement("option");I.setAttribute("value","self");mxUtils.write(I,mxResources.get("openInThisWindow"));fa.appendChild(I);I=document.createElement("div");mxUtils.write(I,mxResources.get("LinksLost"));I.style.margin="7px";I.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(I),mxUtils.br(K),mxUtils.br(K),ja+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=V.value;x(ba.value,k.checked,!Y.checked,J.checked,T.checked,U.checked&&g,oa.value,da.checked,("png"==M||"svg"==M)&&"currentPage"==V.value,-fa.value,null!=N?N.checked:null,null!=v?v.value:null,ha.value,X.checked)}),null,m,n);this.showDialog(m.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText=+fa.value,null!=O?O.checked:null,null!=v?v.value:null,ha.value,X.checked)}),null,m,n);this.showDialog(m.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),I.shadowVisible&&n,!n),aa=this.addCheckbox(F,m),ja=this.addCheckbox(F,mxResources.get("lightbox"),!0),ca=this.addEditButton(F,ja),ba=ca.getEditInput(),oa=1<I.model.getChildCount(I.model.getRoot()),Y=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);Y.style.marginLeft=ba.style.marginLeft;Y.style.marginBottom="12px";Y.style.marginTop="8px";mxEvent.addListener(ja,"change",function(){ja.checked?(oa&&Y.removeAttribute("disabled"),ba.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,aa.checked,ja.checked,ca.getLink(),Y.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,I,M){function L(ba){var oa=" ",Y="";n&&(oa=" 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!=aa?"&page="+aa:"")+(x?"&edit=_blank":@@ -3752,14 +3751,14 @@ null!=aa&&0<aa.length&&(ba=this.importXml(aa,m,n,K,null,null!=ja?mxEvent.isContr(ca=!0,this.importGraphML(c,oa)):null!=L&&null!=I&&EditorUi.isVisioFilename(I)?(ca=!0,this.importVisio(L,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,g=mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?oa(Y.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==Y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,g,I):this.parseFile(L,g,I)):0==c.indexOf("PK")&&null!=L?(ca=!0,this.importZipFile(L,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(ba)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ja?mxEvent.isControlDown(ja):null));ca||null==M||M(ba);return ba};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){n=null!=n?n:this.maxImageSize;K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var Y=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var da=aa||this.resampleThreshold,ha=0;ha<c.length;ha++)if("image/svg"!==c[ha].type.substring(0,9)&&"image/"===c[ha].type.substring(0,6)&&c[ha].size>da){Y=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[Y],"crop",[ba],"resizeImages",[oa],"ignoreEmbeddedXml",-[ja],"evt",[ca]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,fa,na,la,qa,ya,wa,Ja,Aa){try{if(null!=X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(X,fa,na,la,qa,ya,wa,Ja,Aa,ba,ja,ca)}catch(Ba){return this.handleError(Ba),-null}});F=null!=F?F:mxUtils.bind(this,function(X){k.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],V=mxUtils.bind(this,function(X,fa){T[X]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var la=T[X]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(X){var fa=c[X];if(null!=fa){var na=new FileReader;-na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ja=mxUtils.parseXml(wa),Aa=Ja.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==-Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(X,mxUtils.bind(this,function(){try{if(null!=Ja){var Ca=Ja.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Oa=Da.getAttribute("viewBox");if(null==Oa||-0==Oa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Qa=Oa.split(" ");3<Qa.length&&(va=parseFloat(Qa[2]),Na=parseFloat(Qa[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ra=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+X*v,m+X*v,Math.max(1,Math.round(va*Ra)),Math.max(1,Math.round(Na*Ra)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,-Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):V(X,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+X*v,m+X*v,0,0,fa.name)}))}else V(X,mxUtils.bind(this,function(){return null}))}else{ya=-!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var ra=new Image;ra.src=la.target.result;V(X,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+X*v,m+X*v,ra.width,ra.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(X,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Oa=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+X*v,m+X*v,Math.round(va*Oa),Math.round(Na*Oa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=+[ja],"evt",[ca]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,fa,na,la,qa,ya,wa,Ia,Aa){try{if(null!=X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(X,fa,na,la,qa,ya,wa,Ia,Aa,ba,ja,ca)}catch(Ba){return this.handleError(Ba),+null}});F=null!=F?F:mxUtils.bind(this,function(X){k.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,O=J,T=[],V=mxUtils.bind(this,function(X,fa){T[X]=fa;if(0==--O){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var la=T[X]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(X){var fa=c[X];if(null!=fa){var na=new FileReader;+na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ia=mxUtils.parseXml(wa),Aa=Ia.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==+Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(X,mxUtils.bind(this,function(){try{if(null!=Ia){var Ca=Ia.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ra=Da.getAttribute("viewBox");if(null==Ra||+0==Ra.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Ta=Ra.split(" ");3<Ta.length&&(va=parseFloat(Ta[2]),Na=parseFloat(Ta[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ua=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+X*v,m+X*v,Math.max(1,Math.round(va*Ua)),Math.max(1,Math.round(Na*Ua)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,+Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var B=qa.indexOf(";");0<B&&(qa=qa.substring(0,B)+qa.substring(qa.indexOf(",",B+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(B){}return null})):V(X,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+X*v,m+X*v,0,0,fa.name)}))}else V(X,mxUtils.bind(this,function(){return null}))}else{ya=+!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var sa=new Image;sa.src=la.target.result;V(X,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+X*v,m+X*v,sa.width,sa.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(X,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Ra=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+X*v,m+X*v,Math.round(va*Ra),Math.round(Na*Ra),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=la.target.result,x(qa,fa.type,g+X*v,m+X*v,240,160,fa.name,function(Ca){V(X,function(){return Ca})},fa)}catch(Ca){V(X,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else V(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+X*v,m+X*v,240,160,fa.name,function(la){V(X,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(Y){Y=[];for(ha=0;ha<c.length;ha++)Y.push(c[ha]);c=Y;this.confirmImageResize(function(k){oa=k;Z()},L)}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,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,I){if(F||g)mxSettings.setResizeImages(F?I:null),mxSettings.save();m();c(I)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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):@@ -3768,44 +3767,44 @@ action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=fu0,0,ja,ca);var oa=ba.toDataURL();if(oa.length<g.length){var Y=document.createElement("canvas");Y.width=ja;Y.height=ca;var da=Y.toDataURL();oa!==da&&(g=oa,M=ja,L=ca)}}}catch(ha){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,I):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=m&&(n.onerror=m);n.src=c}catch(x){if(null!=m)m(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=-function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==+function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,O){var T=JSON.parse(O);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=X,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:V,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};g.cellEditor.editMermaidData=-function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,X),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,config:T.config},-null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,-"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(V){c.handleError(V)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,J){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(V){c.handleError(V)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&+function(v,J,O){var T=JSON.parse(O);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,X),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,config:T.config},+null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var O=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=O)this.editPlantUmlData(v,J,O);else if(O=this.graph.getAttributeForCell(v,"mermaidData"),null!=O&&window.isMermaidEnabled)this.editMermaidData(v,J,O);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,+"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(V){c.handleError(V)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,J){var O=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);O=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(V){c.handleError(V)}return O};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var F=g.setBackgroundImage;g.setBackgroundImage=function(v){null!=v&&null!=v.originalSrc&&(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.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(v,J){v=-null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+1),J=J.getProperty("patches"),N=0;N<J.length;N++)if(null!=J[N][EditorUi.DIFF_UPDATE]&&null!=J[N][EditorUi.DIFF_UPDATE][v]||null!=J[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var I=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J){var N=I.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=-J?c.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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==-urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(V,U,X){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,X)&&mxEvent.consume(V);null!=T&&T(V,U,X)};L.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,-null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var aa=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=-function(v,J,N){if(c.editor.graph.isSelectionEmpty())aa.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,J,N):this.addPopupMenuArrangeItems(v,J,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&-g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=+null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var O=v.indexOf(",");if(0<O)for(v=v.substring(O+1),J=J.getProperty("patches"),O=0;O<J.length;O++)if(null!=J[O][EditorUi.DIFF_UPDATE]&&null!=J[O][EditorUi.DIFF_UPDATE][v]||null!=J[O][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[O][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var I=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J,O){var T=I.apply(this,arguments);null!=T&&null!=T.originalSrc&&(T=+J?c.createImageForPageLink(T.originalSrc,O,null,!0):{src:T.originalSrc});return T};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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==urlParams.dev&&+(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,O){var T=J;J=function(V,U,X){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,X)&&mxEvent.consume(V);null!=T&&T(V,U,X)};L.call(this,v,J,O)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,+null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,O){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,O);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,O);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,O)};var aa=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=+function(v,J,O){if(c.editor.graph.isSelectionEmpty())aa.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,O);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,J,O):this.addPopupMenuArrangeItems(v,J,O),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,O),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,O),this.addMenuItems(v,["lockUnlock","-"],null,O),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&+g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,O)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,O);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"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.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ja=g.getExportVariables;g.getExportVariables=function(){var v=ja.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var ca=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var Y=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");-if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))Y.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var da=this.actions.get("print");da.setEnabled(!mxClient.IS_IOS||!navigator.standalone);da.visible=da.isEnabled();if(!this.editor.chromeless||+null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var Y=g.labelLinkClicked;g.labelLinkClicked=function(v,J,O){var T=J.getAttribute("href");+if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(O)&&mxEvent.isPopupTrigger(O))Y.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(O)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var da=this.actions.get("print");da.setEnabled(!mxClient.IS_IOS||!navigator.standalone);da.visible=da.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&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,J){null!=J&&g.isEnabled()&&!g.isEditing()&&null!=J.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),-this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,N=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),-mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?+this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,O=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=O&&(O.parentNode.removeChild(O),O=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==O&&(O=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),+mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=O&&(O.parentNode.removeChild(O),O=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,X)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(V),X*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){da=this.editor.graph.view;var ha=mxSettings.getUnit();da.setUnit(ha);Editor.pageSizeUnit=ha==mxConstants.METERS?mxConstants.MILLIMETERS:ha;da.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,da.unit);this.refresh()}if("1"==urlParams.styledev){da=document.getElementById("geFooter");null!=da&&(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)})),da.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:Z.apply(this,arguments)}}da=document.getElementById("geInfo");null!=da&&da.parentNode.removeChild(da);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});-mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,X=J.y/-V-T.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(X=U=null),this.importFiles(N,U,X,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(X=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,-null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,X,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):-(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,X,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ja=Math.max(1,wa.width);-wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ja)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,X,Ja*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,X,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),+mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),O=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,X=J.y/+V-T.y;if(0<O.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(O,!0)):(mxEvent.isAltDown(v)&&(X=U=null),this.importFiles(O,U,X,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(X=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,+null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,X,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;O=J.getElementsByTagName("img");null!=O&&1==O.length?(na=O[0].getAttribute("src"),null==na&&(na=O[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(O=J.getElementsByTagName("a"),null!=O&&1==O.length?na=O[0].getAttribute("href"):+(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,X,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ia=Math.max(1,wa.width);+wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ia)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,X,Ia*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,X,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),U,X,!0))}}v.stopPropagation();v.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(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});-g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,-N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"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(da=Editor.currentTheme,"simple"==da||"sketch"==da)this.doSetCurrentTheme(da,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||+g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),O=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,+O-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"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(da=Editor.currentTheme,"simple"==da||"sketch"==da)this.doSetCurrentTheme(da,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));da=!1;if(null!=urlParams.dark)da=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)da="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||da&&"auto"!=mxSettings.settings.darkMode||(da=mxSettings.settings.darkMode);"auto"==da&&this.isAutoDarkModeSupported()&&(da=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof da?"1"==da:da);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){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);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,J){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&-c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||-this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));+c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var C=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||+this.toggleFormatPanel(!0));this.lastWindowWidth=c}C.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var F=null,I=null,M=null,L=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){L=parseInt(this.diagramContainer.style.height);I=mxEvent.getClientY(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){M=parseInt(this.diagramContainer.style.width);F=mxEvent.getClientX(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(K){var aa=!1;null!=F&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(K)-F)+"px",aa=!0);null!=I&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(K)-I)+"px",aa=!0);aa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(K){null==F&&null==I||mxEvent.consume(K);I=F=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";@@ -3896,14 +3895,14 @@ F);this.isCompatibleString(x)?g(x):g(null,n,I)}))}))};EditorUi.prototype.readTypnull!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(m=g.getElementsByTagName("img"),1==m.length&&(n=m[0].getAttribute("src"),m=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(m=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(m=x)}catch(F){}}null!=m&&(mxUtils.setTextContent(g,m),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,m){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,c,g,m)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var m=this.editor,n=m.graph,-x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,N=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var X=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);-la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ja=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ja/(X.height/ha.view.scale),la.width*wa/(X.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(X=n.getBoundingBox(n.getSelectionCells())),la.width=(X.width+1)*wa/ha.view.scale,la.height=(X.height+-1)*wa/ha.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==Z){Z=PrintDialog.createPrintPreview(ha,wa,null,0,fa,na,qa);Z.title=this.getBaseFilename(!0);Z.pageSelector=!1;Z.mathEnabled=!1;fa=g.border;isNaN(fa)||(Z.pageMargin=fa);g.selection&&(Z.isCellVisible=function(Ma){return ha.isCellSelected(Ma)});var Aa=Z.writeHead;Z.writeHead=function(Ma,ra){ra=null!=ra?ra:"";g.shadows||(ra+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');-mxClient.IS_GC&&(ra+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(ra+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ha.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'+-mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=Z.drawBackgroundImage;Z.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(ra){ra.setAttribute("href","javascript:void(0)")}))}}var Ga=Z.addGraphFragment;Z.addGraphFragment=function(Ma,ra,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");-if(this.graph.shadowVisible)for(var Oa=va.getElementsByTagName("svg"),Qa=0;Qa<Oa.length;Qa++)ha.addSvgShadow(Oa[Qa])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{X=ha.background;if(null==X||""==X||X==mxConstants.NONE)X="#ffffff";Z.backgroundColor=X;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,+x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,O=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var X=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);+la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ia=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ia/(X.height/ha.view.scale),la.width*wa/(X.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(X=n.getBoundingBox(n.getSelectionCells())),la.width=(X.width+1)*wa/ha.view.scale,la.height=(X.height++1)*wa/ha.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==Z){Z=PrintDialog.createPrintPreview(ha,wa,null,0,fa,na,qa);Z.title=this.getBaseFilename(!0);Z.pageSelector=!1;Z.mathEnabled=!1;fa=g.border;isNaN(fa)||(Z.pageMargin=fa);g.selection&&(Z.isCellVisible=function(Ma){return ha.isCellSelected(Ma)});var Aa=Z.writeHead;Z.writeHead=function(Ma,sa){sa=null!=sa?sa:"";g.shadows||(sa+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');+mxClient.IS_GC&&(sa+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(sa+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ha.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'++mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=Z.drawBackgroundImage;Z.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(sa){sa.setAttribute("href","javascript:void(0)")}))}}var Ga=Z.addGraphFragment;Z.addGraphFragment=function(Ma,sa,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");+if(this.graph.shadowVisible)for(var Ra=va.getElementsByTagName("svg"),Ta=0;Ta<Ra.length;Ta++)ha.addSvgShadow(Ra[Ta])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{X=ha.background;if(null==X||""==X||X==mxConstants.NONE)X="#ffffff";Z.backgroundColor=X;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.appendGraph(ha,wa,fa,na,k,!0,v,la,g.selection?ha.getSelectionCells():null);k=ha.getCustomFonts();if(null!=Z.wnd)for(la=0;la<k.length;la++)fa=k[la].name,na=k[la].url,Graph.isCssFontUrl(na)?Z.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(na)+'" charset="UTF-8" type="text/css">'):(Z.wnd.document.writeln('<style type="text/css">'),Z.wnd.document.writeln('@font-face {\nfont-family: "'+-mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),Z.wnd.document.writeln("</style>"))}J&&(ha.useCssTransforms=J,ha.currentTranslate=N,ha.currentScale=T,ha.view.translate=V,ha.view.scale=U);return Z}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||(K=parseInt(M)-1,F=parseInt(L)-1);for(var aa=K;aa<=+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),Z.wnd.document.writeln("</style>"))}J&&(ha.useCssTransforms=J,ha.currentTranslate=O,ha.currentScale=T,ha.view.translate=V,ha.view.scale=U);return Z}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||(K=parseInt(M)-1,F=parseInt(L)-1);for(var aa=K;aa<=F;aa++){var ja=this.pages[aa];M=ja==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var ca=K=!1,ba=null,oa=null;null==ja.viewState&&null==ja.root&&this.updatePageRoot(ja);null!=ja.viewState&&(L=ja.viewState.pageVisible,K=ja.viewState.mathEnabled,ca=ja.viewState.shadowVisible,ba=ja.viewState.background,oa=ja.viewState.backgroundImage,M.pageFormat=ja.viewState.pageFormat,M.gridSize=ja.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ja));M.background=ba;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=ca;var Y=M.getGraphBounds;M.getGraphBounds=function(){var ha=Y.apply(this,arguments),Z=this.backgroundImage;if(null!=Z&&null!=Z.width&&null!=Z.height){var k=this.view.translate,v=this.view.scale;ha=mxRectangle.fromRectangle(ha);ha.add(new mxRectangle((k.x+Z.x)*v,(k.y+Z.y)*v,Z.width*v,Z.height*v))}return ha};var da=M.getGlobalVariable;M.getGlobalVariable=function(ha){return"page"==ha?ja.getName():"pagenumber"==ha?aa+1:"pagecount"==ha?null!=this.pages?this.pages.length:1:da.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ja);M.model.setRoot(ja.root)}x=I(M,x,aa!=F,ja.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=I(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):@@ -3931,37 +3930,37 @@ this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(x){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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(x){c||this.handleError(x)}};EditorUi.prototype.installMessageHandler=function(c){var g=null,m=!1,n=!1,x=null,F=mxUtils.bind(this,function(L,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var K=-L.data,aa=null,ja=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(Ca){}return ra});if("json"==urlParams.proto){var ca=-!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(ra){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));-return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(ra){null!=ra?I.postMessage(JSON.stringify({event:"prompt",value:ra,message:K}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,+L.data,aa=null,ja=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(Ca){}return sa});if("json"==urlParams.proto){var ca=+!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(sa){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));+return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(sa){null!=sa?I.postMessage(JSON.stringify({event:"prompt",value:sa,message:K}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,!1);ba.init();return}if("draft"==K.action){var oa=ja(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):-null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){I.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var Y=1==K.enableRecent,da=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,-!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(ra,Ca,Da,va){ra=ra||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(ra,L,ra!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):-null,da?mxUtils.bind(this,function(ra,Ca){this.remoteInvoke("searchDiagrams",[ra,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:ra,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=-this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=-K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=-(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(ra){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==-K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var V=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(ra,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(V,this.editor.graph,null,!0,function(va){U(ra,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);-this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=ra;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),X=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==K.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(ra)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var ra=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Qa){return"page"==Qa?Ca.getName():"pagenumber"==Qa?1:ra.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=-v.model,Na=va.getChildCells(va.getRoot()),Oa={};for(Da=0;Da<K.layerIds.length;Da++)Oa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Oa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Qa){X(Qa.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){X(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),-m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else if(na=mxUtils.bind(this,-function(){var ra=this.createLoadMessage("export");ra.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();ra.xml=mxUtils.getXml(Ca);ra.data=this.getFileData(null,null,!0,null,null,null,Ca);ra.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),ra.data=this.getHtml(Ca,this.editor.graph),ra.xml=mxUtils.getXml(Ca),ra.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?-K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=K.asText?Na:Editor.createSvgDataUri(Na);I.postMessage(JSON.stringify(ra),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,-null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||-K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Oa){Da(mxUtils.getXml(Oa))})):Da(mxUtils.getXml(Na))}));return}I.postMessage(JSON.stringify(ra),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;+null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&this.actions.get("exit").funct()}));try{ba.init()}catch(sa){I.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var Y=1==K.enableRecent,da=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,+!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(sa,Ca,Da,va){sa=sa||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(sa,L,sa!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,Y?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):+null,da?mxUtils.bind(this,function(sa,Ca){this.remoteInvoke("searchDiagrams",[sa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:sa,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=+this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=+K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,O=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(O-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=+(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(sa){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==+K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var V=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(sa,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(V,this.editor.graph,null,!0,function(va){U(sa,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);+this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=sa;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),X=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==K.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(sa)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var sa=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Ta){return"page"==Ta?Ca.getName():"pagenumber"==Ta?1:sa.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=+v.model,Na=va.getChildCells(va.getRoot()),Ra={};for(Da=0;Da<K.layerIds.length;Da++)Ra[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Ra[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ta){X(Ta.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){X(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),+m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?U("data:image/png;base64,"+sa.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else if(na=mxUtils.bind(this,+function(){var sa=this.createLoadMessage("export");sa.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();sa.xml=mxUtils.getXml(Ca);sa.data=this.getFileData(null,null,!0,null,null,null,Ca);sa.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),sa.data=this.getHtml(Ca,this.editor.graph),sa.xml=mxUtils.getXml(Ca),sa.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?+K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=K.asText?Na:Editor.createSvgDataUri(Na);I.postMessage(JSON.stringify(sa),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,+null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(sa.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||+K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Ra){Da(mxUtils.getXml(Ra))})):Da(mxUtils.getXml(Na))}));return}I.postMessage(JSON.stringify(sa),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){ca=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.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+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=K.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=K.noSaveBtn);if(null!=K.rough){var qa=Editor.sketchMode;this.doSetSketchMode(K.rough);qa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=K.dark&&this.setDarkMode(K.dark);null!=K.border&&(this.embedExportBorder=K.border);null!=K.theme&&(this.embedExportTheme=K.theme);null!=K.background&&(this.embedExportBackground=K.background);null!=K.viewport&&(this.embedViewport=K.viewport);this.embedExitPoint=null;if(null!=K.rect){var ya=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,K.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,K.rect.top)+"px";this.minInlineWidth=K.minWidth;this.minInlineHeight=K.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=-"";var wa=K.maxFitScale,Ja=K.rect.width+2*ya,Aa=K.rect.height+2*ya;aa=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();Ja=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ja):Ja,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,ra.height-80);this.diagramContainer.style.width=Ja+"px";this.diagramContainer.style.height=ra+"px";var Ca=this.editor.graph;ra=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);-if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=ra;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);-var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(ra){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();-null!=Ba&&(oa=ja(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(ra){I.postMessage(JSON.stringify({event:"merge",message:K,error:ra}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),-"*");return}}catch(ra){this.handleError(ra)}}var Ga=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(ra,Ca){m=!0;try{c(ra,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),+"";var wa=K.maxFitScale,Ia=K.rect.width+2*ya,Aa=K.rect.height+2*ya;aa=mxUtils.bind(this,function(){var sa=mxUtils.getDocumentSize();Ia=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ia):Ia,sa.width-80);sa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,sa.height-80);this.diagramContainer.style.width=Ia+"px";this.diagramContainer.style.height=sa+"px";var Ca=this.editor.graph;sa=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);+if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=sa;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);+var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(sa){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();+null!=Ba&&(oa=ja(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(sa){I.postMessage(JSON.stringify({event:"merge",message:K,error:sa}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),+"*");return}}catch(sa){this.handleError(sa)}}var Ga=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(sa,Ca){m=!0;try{c(sa,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));x=Da}),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)Ca=this.createLoadMessage("load"),Ca.xml=ra,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(ra){Ma(ra,L)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ja)):-null!=K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ma(ra.responseText,L):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===-typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(ra){Ma(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(ra){Ma(Ga(),L)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):+g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=sa,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(sa){Ma(sa,L)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ja)):+null!=K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?Ma(sa.responseText,L):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===+typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(sa){Ma(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(sa){Ma(Ga(),L)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(F,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(L,K,aa){M.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:L,target:K,allowOpener:aa}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,m,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=m?" ("+m+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),@@ -3971,24 +3970,24 @@ function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new Textn.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=F}catch(I){this.handleError(I)}}));x.setAttribute("title","copy");x.className="geBtn";m.appendChild(x)}),!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(c){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(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"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,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g)}))};EditorUi.prototype.doImportCsv=function(c,g){try{var m=c.split("\n"),n=[],x=[],F=[],I={};if(0<m.length){var M=-{},L=this.editor.graph,K=null,aa=null,ja=null,ca=null,ba=null,oa=null,Y=null,da="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",N=!1,T=null,V=null,U=40,X=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ta):(L.setSelectionCells(ta),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ja=null,Aa="auto";Z=null;for(var Ba=[],-Ga=null,Ma=null,ra=0;ra<m.length&&"#"==m[ra].charAt(0);){c=m[ra].replace(/\r$/,"");for(ra++;ra<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ra].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ra].substring(1)),ra++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ja=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?Y=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==-Da?da=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):-"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?X=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[ra])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[ra].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ja&&(Ja="%"+Da[0]+-"%");if(null!=Ba)for(var Oa=0;Oa<Ba.length;Oa++)null==M[Ba[Oa].to]&&(M[Ba[Oa].to]={});ha=[];for(va=ra+1;va<m.length;va++){var Qa=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Qa){var Ra=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Ra+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ha.push(Qa)}L.model.beginUpdate();try{for(va=0;va<ha.length;va++){Qa=ha[va];var za=null,Ea=null!=c?k+Qa[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=-mxUtils.indexOf(n,za));var C=new mxCell(Ja,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var P=0;P<Qa.length;P++)L.setAttributeForCell(C,Da[P],Qa[P]),null==za||m||L.setAttributeForCell(za,Da[P],Qa[P]);if(null!=ba&&null!=Y){var R=Y[C.getAttribute(ba)];null!=R&&(L.labelChanged(C,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ja){var W=ja[C.getAttribute(ca)];null!=W&&(C.style=W)}L.setAttributeForCell(C,-"placeholders","1");C.style=L.replacePlaceholders(C,C.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(L.model.setStyle(za,C.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=C;if(!m)for(Oa=0;Oa<Ba.length;Oa++)M[Ba[Oa].to][za.getAttribute(Ba[Oa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);-Z=null!=Ca?L.model.getCell(k+Qa[Ca]):null;if(za.vertex){Ra=null!=Z?0:ya;ra=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ra+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ra+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ia.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):+{},L=this.editor.graph,K=null,aa=null,ja=null,ca=null,ba=null,oa=null,Y=null,da="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",O=!1,T=null,V=null,U=40,X=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ia=null,Aa="auto";Z=null;for(var Ba=[],+Ga=null,Ma=null,sa=0;sa<m.length&&"#"==m[sa].charAt(0);){c=m[sa].replace(/\r$/,"");for(sa++;sa<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[sa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[sa].substring(1)),sa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ia=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?Y=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==+Da?da=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?O="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):+"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?X=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]++"%");if(null!=Ba)for(var Ra=0;Ra<Ba.length;Ra++)null==M[Ba[Ra].to]&&(M[Ba[Ra].to]={});ha=[];for(va=sa+1;va<m.length;va++){var Ta=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Ta){var Ua=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Ua+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ha.push(Ta)}L.model.beginUpdate();try{for(va=0;va<ha.length;va++){Ta=ha[va];var za=null,Ea=null!=c?k+Ta[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=+mxUtils.indexOf(n,za));var B=new mxCell(Ia,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");B.collapsed=O;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,O);for(var P=0;P<Ta.length;P++)L.setAttributeForCell(B,Da[P],Ta[P]),null==za||m||L.setAttributeForCell(za,Da[P],Ta[P]);if(null!=ba&&null!=Y){var R=Y[B.getAttribute(ba)];null!=R&&(L.labelChanged(B,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ja){var W=ja[B.getAttribute(ca)];null!=W&&(B.style=W)}L.setAttributeForCell(B,+"placeholders","1");B.style=L.replacePlaceholders(B,B.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[B])):(L.model.setStyle(za,B.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=B;if(!m)for(Ra=0;Ra<Ba.length;Ra++)M[Ba[Ra].to][za.getAttribute(Ba[Ra].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);+Z=null!=Ca?L.model.getCell(k+Ta[Ca]):null;if(za.vertex){Ua=null!=Z?0:ya;sa=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ua+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=sa+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ia.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ia.height+na:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+X}m?(null==I[Ea]&&(I[Ea]=[]),I[Ea].push(za)):(n.push(za),null!=Z?(Z.style=L.replacePlaceholders(Z,da,K),L.addCell(za,Z),x.push(Z)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ka="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?x[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ka||"auto"!=-J&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=F.slice(),ta=F.slice();for(Oa=0;Oa<Ba.length;Oa++){var ua=Ba[Oa];for(va=0;va<n.length;va++){za=n[va];var Ia=mxUtils.bind(this,function(kb,ob,hb){var pb=ob.getAttribute(hb.from);if(null!=pb&&""!=pb){pb=pb.split(",");for(var sb=0;sb<pb.length;sb++){var ib=M[hb.to][pb[sb]];if(null==ib&&null!=oa){ib=new mxCell(pb[sb],new mxGeometry(ya,wa,0,0),oa);ib.style=L.replacePlaceholders(ob,ib.style,K);var mb=this.editor.graph.getPreferredSizeForCell(ib);+J&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=F.slice(),ra=F.slice();for(Ra=0;Ra<Ba.length;Ra++){var ua=Ba[Ra];for(va=0;va<n.length;va++){za=n[va];var Ja=mxUtils.bind(this,function(kb,ob,hb){var pb=ob.getAttribute(hb.from);if(null!=pb&&""!=pb){pb=pb.split(",");for(var sb=0;sb<pb.length;sb++){var ib=M[hb.to][pb[sb]];if(null==ib&&null!=oa){ib=new mxCell(pb[sb],new mxGeometry(ya,wa,0,0),oa);ib.style=L.replacePlaceholders(ob,ib.style,K);var mb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=mb.width+na;ib.geometry.height=mb.height+na;M[hb.to][pb[sb]]=ib;ib.vertex=!0;ib.id=pb[sb];F.push(L.addCell(ib))}if(null!=ib){mb=hb.label;null!=hb.fromlabel&&(mb=(ob.getAttribute(hb.fromlabel)||"")+(mb||""));null!=hb.sourcelabel&&(mb=L.replacePlaceholders(ob,hb.sourcelabel,K)+(mb||""));null!=hb.tolabel&&(mb=(mb||"")+(ib.getAttribute(hb.tolabel)||""));null!=hb.targetlabel&&(mb=(mb||"")+L.replacePlaceholders(ib,hb.targetlabel,K));var nb="target"==hb.placeholders==!hb.invert?ib:kb;nb=null!=hb.style?L.replacePlaceholders(nb,hb.style,K):L.createCurrentEdgeStyle();mb=L.insertEdge(null,null,mb||"",hb.invert?ib:kb,hb.invert?kb:ib,nb);if(null!=hb.labels)for(nb=0;nb<hb.labels.length;nb++){var qb=hb.labels[nb],ub=new mxCell(qb.label||nb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!hb.invert?ib:kb,ub.value,K));if(null!=-qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);mb.insert(ub)}if(null!=hb.data)for(var zb in hb.data)L.setAttributeForCell(mb,zb,hb.data[zb]);ta.push(mb);mxUtils.remove(hb.invert?kb:ib,xa)}}}});Ia(za,za,ua);if(null!=I[za.id])for(P=0;P<I[za.id].length;P++)Ia(za,I[za.id][P],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],P=0;P<Ma.length;P++)L.setAttributeForCell(za,mxUtils.trim(Ma[P]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=-U;Va.checkOverlap=!0;var Wa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());for(var kb=0;kb<F.length;kb++){var ob=L.getCellGeometry(F[kb]);ob.x=Math.round(L.snap(ob.x));ob.y=Math.round(L.snap(ob.y));"auto"==v&&(ob.width=Math.round(L.snap(ob.width)));"auto"==J&&(ob.height=Math.round(L.snap(ob.height)))}};if("["==Aa.charAt(0)){var Ta=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Wa();Ta()});la=null}else if("circle"==Aa){var ab=new mxCircleLayout(L);ab.disableEdgeStyle=-!1;ab.resetEdges=!1;var Pa=ab.isVertexIgnored;ab.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){ab.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ta.length==2*F.length-1&&1==xa.length){L.view.validate();var Sa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Sa.levelDistance=X;Sa.edgeRouting=!1;Sa.resetEdges=!1;Sa.sortEdges=!0;this.executeLayout(function(){Sa.execute(L.getDefaultParent(),-0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=X;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ta);L.moveCells(ta,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,-2,fa,X),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ta.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*X;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());-Wa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?+qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);mb.insert(ub)}if(null!=hb.data)for(var zb in hb.data)L.setAttributeForCell(mb,zb,hb.data[zb]);ra.push(mb);mxUtils.remove(hb.invert?kb:ib,xa)}}}});Ja(za,za,ua);if(null!=I[za.id])for(P=0;P<I[za.id].length;P++)Ja(za,I[za.id][P],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],P=0;P<Ma.length;P++)L.setAttributeForCell(za,mxUtils.trim(Ma[P]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=+U;Va.checkOverlap=!0;var Oa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());for(var kb=0;kb<F.length;kb++){var ob=L.getCellGeometry(F[kb]);ob.x=Math.round(L.snap(ob.x));ob.y=Math.round(L.snap(ob.y));"auto"==v&&(ob.width=Math.round(L.snap(ob.width)));"auto"==J&&(ob.height=Math.round(L.snap(ob.height)))}};if("["==Aa.charAt(0)){var Sa=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Oa();Sa()});la=null}else if("circle"==Aa){var Za=new mxCircleLayout(L);Za.disableEdgeStyle=+!1;Za.resetEdges=!1;var Pa=Za.isVertexIgnored;Za.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){Za.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ra.length==2*F.length-1&&1==xa.length){L.view.validate();var Qa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Qa.levelDistance=X;Qa.edgeRouting=!1;Qa.resetEdges=!1;Qa.sortEdges=!0;this.executeLayout(function(){Qa.execute(L.getDefaultParent(),+0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=X;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,+2,fa,X),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ra.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*X;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());+Oa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(m,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,m,n,x){c=new LinkDialog(this,c,g,m,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){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++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"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==c||c.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));@@ -4030,29 +4029,29 @@ return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=ffunction(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,m,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,m,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),n=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<n.length){var x="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,f,l,u,y,q){function B(){for(var Y=M.getElementsByTagName("div"),da=0,ha=0;ha<Y.length;ha++)"none"!=Y[ha].style.display&&Y[ha].parentNode==M&&da++;L.style.display=0==da?"block":"none"}function H(Y,da,ha,Z){function k(){da.removeChild(N);da.removeChild(T);J.style.display="block";v.style.display="block"}x={div:da,comment:Y,saveCallback:ha,deleteOnCancel:Z};var v=da.querySelector(".geCommentTxt"),J=da.querySelector(".geCommentActionsList"),N=document.createElement("textarea");-N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=Y.content;da.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(da.parentNode.removeChild(da),B()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";Y.content=N.value;mxUtils.write(v,Y.content);k();ha(Y);x=null});mxEvent.addListener(N,"keydown",-mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(U.click(),mxEvent.consume(X)):27==X.keyCode&&(V.click(),mxEvent.consume(X)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);da.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(Y,da){da.innerText="";Y=new Date(Y.modifiedDate);var ha=b.timeSince(Y);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(da,+var CommentsWindow=function(b,f,l,u,y,q){function C(){for(var Y=M.getElementsByTagName("div"),da=0,ha=0;ha<Y.length;ha++)"none"!=Y[ha].style.display&&Y[ha].parentNode==M&&da++;L.style.display=0==da?"block":"none"}function H(Y,da,ha,Z){function k(){da.removeChild(O);da.removeChild(T);J.style.display="block";v.style.display="block"}x={div:da,comment:Y,saveCallback:ha,deleteOnCancel:Z};var v=da.querySelector(".geCommentTxt"),J=da.querySelector(".geCommentActionsList"),O=document.createElement("textarea");+O.className="geCommentEditTxtArea";O.style.minHeight=v.offsetHeight+"px";O.value=Y.content;da.insertBefore(O,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(da.parentNode.removeChild(da),C()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";Y.content=O.value;mxUtils.write(v,Y.content);k();ha(Y);x=null});mxEvent.addListener(O,"keydown",+mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(U.click(),mxEvent.consume(X)):27==X.keyCode&&(V.click(),mxEvent.consume(X)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);da.insertBefore(T,v);J.style.display="none";v.style.display="none";O.focus()}function S(Y,da){da.innerText="";Y=new Date(Y.modifiedDate);var ha=b.timeSince(Y);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(da,mxResources.get("timeAgo",[ha],"{1} ago"));da.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString())}function E(Y){var da=document.createElement("img");da.className="geCommentBusyImg";da.src=IMAGE_PATH+"/spin.gif";Y.appendChild(da);Y.busyImg=da}function Q(Y){Y.style.border="1px solid red";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function c(Y){Y.style.border="";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function g(Y,da,ha,Z,k){function v(na,la,qa){var ya=document.createElement("li");-ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ja){la(Ja,Y);Ja.preventDefault();mxEvent.consume(Ja)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(Y);return{pdiv:qa,replies:la}}function N(na,la,qa,ya,wa){function Ja(){E(Ma);-Y.addReply(Ga,function(ra){Ga.id=ra;Y.replies.push(Ga);c(Ma);qa&&qa()},function(ra){Aa();Q(Ma);b.handleError(ra,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(ra){Ja()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=Y.id;null==Y.replies&&(Y.replies=[]);var Ma=g(Ga,Y.replies,Ba,Z+1);la?Aa():Ja()}if(k||!Y.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",+ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,Y);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(Y);return{pdiv:qa,replies:la}}function O(na,la,qa,ya,wa){function Ia(){E(Ma);+Y.addReply(Ga,function(sa){Ga.id=sa;Y.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();Q(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(sa){Ia()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=Y.id;null==Y.replies&&(Y.replies=[]);var Ma=g(Ga,Y.replies,Ba,Z+1);la?Aa():Ia()}if(k||!Y.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",Y.id);T.style.marginLeft=20*Z+5+"px";Y.isResolved&&(F.style.opacity="0.7");var V=document.createElement("div");V.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=Y.user&&null!=Y.user.pictureUrl?Y.user.pictureUrl:Editor.userImage;V.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";V.appendChild(U);var X=document.createElement("div");X.className="geCommentUsername";mxUtils.write(X,null!=Y.user?Y.user.displayName:mxResources.get("unknownUser"));U.appendChild(X);X=document.createElement("div");X.className="geCommentDate";X.setAttribute("data-commentId",Y.id);S(Y,X);U.appendChild(X);T.appendChild(V);V=document.createElement("div");V.className="geCommentTxt";mxUtils.write(V,Y.content||"");T.appendChild(V);Y.isLocked&&(T.style.opacity="0.5");V=document.createElement("div");V.className="geCommentActions";var fa=document.createElement("ul");fa.className="geCommentActionsList";V.appendChild(fa);m||Y.isLocked||0!=-Z&&!n||v(mxResources.get("reply"),function(){N("",!0)},Y.isResolved);U=b.getCurrentUser();null==U||null==Y.user||U.id!=Y.user.id||m||Y.isLocked||(v(mxResources.get("edit"),function(){function na(){H(Y,T,function(){E(T);Y.editComment(Y.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},Y.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);Y.deleteComment(function(na){if(!0===+Z&&!n||v(mxResources.get("reply"),function(){O("",!0)},Y.isResolved);U=b.getCurrentUser();null==U||null==Y.user||U.id!=Y.user.id||m||Y.isLocked||(v(mxResources.get("edit"),function(){function na(){H(Y,T,function(){E(T);Y.editComment(Y.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},Y.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);Y.deleteComment(function(na){if(!0===na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=J(Y).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<da.length;na++)if(da[na]==Y){da.splice(na,1);break}L.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(na){Q(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},-Y.isResolved));m||Y.isLocked||0!=Z||v(Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";Y.isResolved=!Y.isResolved;mxUtils.write(qa,Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=Y.isResolved?"none":"",wa=J(Y).replies,Ja="light-dark("+(Y.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ja;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),-Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}B()}Y.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=Y.replies&&ha<Y.replies.length;ha++)V=Y.replies[ha],V.isResolved=Y.isResolved,g(V,Y.replies,null,Z+1,k);null!=x&&(x.comment.id==Y.id?(k=Y.content,Y.content=x.comment.content,H(Y,T,x.saveCallback,+Y.isResolved));m||Y.isLocked||0!=Z||v(Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";Y.isResolved=!Y.isResolved;mxUtils.write(qa,Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=Y.isResolved?"none":"",wa=J(Y).replies,Ia="light-dark("+(Y.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ia;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),+Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}C()}Y.isResolved?O(mxResources.get("reOpened")+": ",!0,la,!1,!0):O(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=Y.replies&&ha<Y.replies.length;ha++)V=Y.replies[ha],V.isResolved=Y.isResolved,g(V,Y.replies,null,Z+1,k);null!=x&&(x.comment.id==Y.id?(k=Y.content,Y.content=x.comment.content,H(Y,T,x.saveCallback,x.deleteOnCancel),Y.content=k):null==x.comment.id&&x.comment.pCommentId==Y.id&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var I=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(I)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=I;K.style.padding="3px 4px 4px 4px";I=document.createElement("a");I.className="geButton";if(!m){var aa=I.cloneNode();aa.style.backgroundImage="url("+Editor.plusImage+")";aa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(aa,"click",function(Y){function da(){H(ha,Z,function(k){E(Z);b.addComment(k,function(v){k.id=v;ba.push(k);c(Z)},function(v){Q(Z);da();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ha=b.newComment("",b.getCurrentUser()),Z=g(ha,ba,null,0);da();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(aa)}var ja=I.cloneNode();ja.style.backgroundImage="url("+Editor.checkImage+")";ja.setAttribute("title",mxResources.get("showResolved"));var ca=!1;mxEvent.addListener(ja,"click",function(Y){(ca=!ca)?ja.classList.add("geActiveItem"):ja.classList.remove("geActiveItem");oa();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(ja);b.commentsRefreshNeeded()&&(aa=I.cloneNode(),aa.style.backgroundImage="url("+Editor.refreshImage+")",aa.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(aa,"click",function(Y){oa();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(aa));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geButton geAdaptiveAsset",mxEvent.addListener(I,"click",function(Y){q();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(I));F.appendChild(K);var ba=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var Y=x.div.querySelector(".geCommentEditTxtArea"),da=x.div.querySelector(".geCommentEditBtns");x.comment.content=Y.value;Y.parentNode.removeChild(Y);da.parentNode.removeChild(da)}catch(ha){b.handleError(ha)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ha){function Z(k){if(null!=k){k.sort(function(J,N){return new Date(J.modifiedDate)-new Date(N.modifiedDate)});for(var v=0;v<k.length;v++)Z(k[v].replies)}}ha.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";ba=ha;for(ha=0;ha<ba.length;ha++)Z(ba[ha].replies),+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ha){function Z(k){if(null!=k){k.sort(function(J,O){return new Date(J.modifiedDate)-new Date(O.modifiedDate)});for(var v=0;v<k.length;v++)Z(k[v].replies)}}ha.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";ba=ha;for(ha=0;ha<ba.length;ha++)Z(ba[ha].replies),g(ba[ha],ba,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ha){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ha&&ha.message?": "+ha.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function Y(v){var J=ha[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)Y(v.replies[J])}if(this.window.isVisible()){for(var da=M.querySelectorAll(".geCommentDate"),ha={},Z=0;Z<da.length;Z++){var k=da[Z];ha[k.getAttribute("data-commentId")]=k}for(Z=0;Z<ba.length;Z++)Y(ba[Z])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),F,f,l,u,y,!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,l,u,y,q,B,H,S,E,Q){var c=document.createElement("div");c.style.textAlign="center";Q=null!=Q?Q:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=Q+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),+this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,C,H,S,E,Q){var c=document.createElement("div");c.style.textAlign="center";Q=null!=Q?Q:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=Q+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),g.appendChild(f),c.appendChild(g));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=H&&(q.innerHTML=H+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");-b.editor.cancelFirst&&E.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});E.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);c.appendChild(E);S?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop=+b.editor.cancelFirst&&E.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});E.appendChild(n);null!=C?(n.innerHTML=C+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);c.appendChild(E);S?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):E.style.marginTop="12px";this.init=function(){n.focus()};this.container=c},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,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,l){this.ui=b;this.page=f;this.previous=this.name=l}@@ -4067,19 +4066,19 @@ EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&nullEditorUi.prototype.createImageForPageLink=function(b,f,l,u){var y=b.indexOf(","),q=null;0<y&&(y=this.getPageById(b.substring(y+1)),null!=y&&y!=f&&(q=this.getImageForPage(y,f,l,u),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};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,l,u){l=null!=l?l:this.editor.graph;var y=l.getGlobalVariable;l=this.createTemporaryGraph(l.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);l.getGlobalVariable=function(H){return"pagenumber"==H?q+1:"page"==H&&null!=f?f.getName():y.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=-"";u=l.getSvg(null,null,null,null,null,null,null,null,null,null,u,null,null,null,!0,!0);var B=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(u)),B.width,B.height,B.x,B.y)};+"";u=l.getSvg(null,null,null,null,null,null,null,null,null,null,u,null,null,null,!0,!0);var C=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(u)),C.width,C.height,C.x,C.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(){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(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 l=b.sizeDidChange,u=null,y=this;b.sizeDidChange=-function(){var B=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&(u=y.currentPage,y.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);-this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,H){C=H.getProperty("edit").changes;for(H=0;H<C.length;H++)if(C[H]instanceof RenamePage||C[H]instanceof ChangePage||C[H]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==C.length&&C[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var l=b.sizeDidChange,u=null,y=this;b.sizeDidChange=+function(){var C=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&(u=y.currentPage,y.pageSelected());return C};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);+this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,H){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};EditorUi.prototype.scrollToPage=function(b,f){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),u=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(u!=this.lastScrollPage||f)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=u)};EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var u=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(u.setViewState(f),this.editor.updateGraphComponents(),u.view.revalidate(),u.sizeDidChange()),u.container.scrollLeft=u.view.translate.x*u.view.scale+f.scrollLeft,u.container.scrollTop=u.view.translate.y*u.view.scale+f.scrollTop,u.restoreSelection(l))};-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=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!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:B,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=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!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,u,y),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,f,l,u){l||(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);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),u=this.getBackgroundImageObject(b.backgroundImage,u),null!=u&&f.setAttribute("backgroundImage",-JSON.stringify(u)));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(y){return y.name+"^"+y.url}).join("|"))};+Graph.prototype.saveViewState=function(b,f,l,u,y){l||(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);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),u=this.getBackgroundImageObject(b.backgroundImage,+u,y),null!=u&&f.setAttribute("backgroundImage",JSON.stringify(u)));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(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;@@ -4092,20 +4091,20 @@ u=!0;for(y=0;y<l.length;y++)if(l[y].name==b){u=!1;break}u&&this.extFonts.push({nEditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var l=Editor.extractParserError(f);if(l)throw Error(l);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),l=new mxCodec(f.ownerDocument),b.root=l.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(l=Editor.extractParserError(f))throw Error(l);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 l=new mxCodec(b.node.ownerDocument),u=new mxGraphModel;l.decode(b.node,u);l=new mxCodec(f.ownerDocument);var y=new mxGraphModel;l.decode(f,y);this.selectPage(b.page);f=this.diffCells(u.root,y.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,l){try{if(b!=this.currentPage){var u=this.editor.graph;u.isEditing()&&u.stopEditing(!1);f=null!=f?f:!1;u.isMouseDown=!1;u.reset();var y=u.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,l);q.execute();y.add(q);y.notify();f||u.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(B){this.handleError(B)}};+EditorUi.prototype.selectPage=function(b,f,l){try{if(b!=this.currentPage){var u=this.editor.graph;u.isEditing()&&u.stopEditing(!1);f=null!=f?f:!1;u.isMouseDown=!1;u.reset();var y=u.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,l);q.execute();y.add(q);y.notify();f||u.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(C){this.handleError(C)}};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,l){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),l),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,l){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,l);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var u=this.currentPage;u==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,u=this.pages[l]):1>=this.pages.length&&(u=this.insertPage(),f.model.execute(new RenamePage(this,u,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,u))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};-EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},B=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,B),[l.root]);l.viewState=b==this.currentPage?u.getViewState():b.viewState;this.initDiagramNode(l);+EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},C=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,C),[l.root]);l.viewState=b==this.currentPage?u.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(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return l};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=[],l=[],u=0;u<b.length;u++)try{l.push(this.clonePage(b[u]))}catch(y){f.push(mxResources.get("pageWithNumber",[u+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(y){}throw b;}return l};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,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(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),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))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var l=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(y,q){q.className="geTab gePageTab";this.pages[y]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",-"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text","<diagram/>"),l=y):mxEvent.consume(B)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(B){l=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(B){null!=l&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(B){null!=l&&-y!=l&&this.movePage(l,y);B.stopPropagation();B.preventDefault()}));f.appendChild(q)})(u,this.createTabForPage(this.pages[u],u+1));u=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();+"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(C){b.isEnabled()?(mxClient.IS_FF&&C.dataTransfer.setData("Text","<diagram/>"),l=y):mxEvent.consume(C)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(C){l=null;C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(C){null!=l&&(C.dataTransfer.dropEffect="move");C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(C){null!=l&&+y!=l&&this.movePage(l,y);C.stopPropagation();C.preventDefault()}));f.appendChild(q)})(u,this.createTabForPage(this.pages[u],u+1));u=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=u;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(y){this.checkTabScrollerOverflow()}))}};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("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):this.rightScrollTab.classList.remove("mxDisabled")):(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};@@ -4115,59 +4114,59 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(nEditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,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.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var l=mxEvent.getClientX(b),u=mxEvent.getClientY(b);f.popup(l,u,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var l=this.createTab(),u=b.getName()||mxResources.get("untitled"),y=b.getId();l.setAttribute("title",u+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,u);l.appendChild(f);this.addTabListeners(b,l);return l};-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,B=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),H=mxUtils.bind(this,+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==u)||mxEvent.isPopupTrigger(S))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var E=new mxPopupMenu(this.createPageMenu(b));E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var Q=mxEvent.getClientX(S),c=mxEvent.getClientY(S);E.popup(Q,c,null,S);-this.setCurrentMenu(E,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,B,null,H);mxEvent.addGestureListeners(f,B,null,H)};+this.setCurrentMenu(E,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,C,null,H);mxEvent.addGestureListeners(f,C,null,H)};EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,u){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),u));this.editor.graph.isEnabled()&&(l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",-[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,B,H){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(u,q[E]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=-[];this.traverse(y,!0,mxUtils.bind(this,function(H,S){var E=null!=S&&this.isTreeEdge(S);E&&q.push(S);H==y||null!=S&&!E||q.push(H);return(null==S||E)&&(H==y||!this.model.isCollapsed(H))}));this.model.setCollapsed(y,u);for(var B=0;B<q.length;B++)this.model.setVisible(q[B],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,B,H,S){return this.model.filterCells(this.getEdges(u,y,q,B,H,S),mxUtils.bind(this,+[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,H){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(u,q[E]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=+[];this.traverse(y,!0,mxUtils.bind(this,function(H,S){var E=null!=S&&this.isTreeEdge(S);E&&q.push(S);H==y||null!=S&&!E||q.push(H);return(null==S||E)&&(H==y||!this.model.isCollapsed(H))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,H,S){return this.model.filterCells(this.getEdges(u,y,q,C,H,S),mxUtils.bind(this,function(E){return this.isTreeEdge(E)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!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 u(Z){return x.isVertex(Z)&&q(Z)}function y(Z){var k=!1;null!=Z&&(k="1"==-n.getCurrentCellStyle(Z).treeMoving);return k}function q(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),k="tree"==(null!=k?k.style:n.getCellStyle(Z)).containerType);return k}function B(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),n.view.getState(Z),k=null!=(null!=k?k.style:n.getCellStyle(Z)).childLayout);return k}function H(Z){Z=n.view.getState(Z);if(null!=Z){var k=n.getIncomingTreeEdges(Z.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=-k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==Z.y&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==Z.y+Z.height&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>Z.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Z,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=n.cloneCells([J[0],Z]);n.model.setTerminal(N[0],n.model.getTerminal(J[0],-!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?Z.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?Z.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=V.x,N[1].geometry.y-=V.y);var U=n.view.getState(Z),X=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-N[1].geometry.width-10)*X:fa.y+=-(k?Z.geometry.height+10:-N[1].geometry.height-10)*X;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/-X),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/X))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ja=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ja.push(Ba);(null==Ba||Ga)&&Ja.push(Aa);return null==Ba||Ga});n.moveCells(Ja,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(N,-v)}finally{n.model.endUpdate()}}function E(Z){n.model.beginUpdate();try{var k=H(Z),v=n.getIncomingTreeEdges(Z),J=n.cloneCells([v[0],Z]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],Z,!1);var N=n.model.getParent(Z),T=N.geometry,V=[];n.view.currentRoot!=N&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(Z,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&V.push(na);(null==na||la)&&V.push(fa);return null==na||la});var U=Z.geometry.width+40,-X=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,X=-X):k==mxConstants.DIRECTION_WEST?(U=-U,X=0):k==mxConstants.DIRECTION_EAST&&(X=0);n.moveCells(V,U,X);return n.addCells(J,N)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==-n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var X=n.model.getTerminal(J[U],!1);null!=X&&k.push(X)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height--V.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-V.x+10,T[1].geometry.y-=T[1].geometry.height+V.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+V.x+40):T[1].geometry.x+(T[1].geometry.width-V.x+40),T[1].geometry.y=null==fa?Z.geometry.y+(Z.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-V.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}-function c(Z,k,v){Z=n.getOutgoingTreeEdges(Z);v=n.view.getState(v);var J=[];if(null!=v&&null!=Z){for(var N=0;N<Z.length;N++){var T=n.view.getState(n.model.getTerminal(Z[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(V,U){return k?V.x+V.width-U.x-U.width:V.y+V.height-U.y-U.height})}return J}function g(Z,k){var v=H(Z),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||+n.getCurrentCellStyle(Z).treeMoving);return k}function q(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),k="tree"==(null!=k?k.style:n.getCellStyle(Z)).containerType);return k}function C(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),n.view.getState(Z),k=null!=(null!=k?k.style:n.getCellStyle(Z)).childLayout);return k}function H(Z){Z=n.view.getState(Z);if(null!=Z){var k=n.getIncomingTreeEdges(Z.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=+k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==Z.y&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==Z.y+Z.height&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>Z.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Z,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),O=n.cloneCells([J[0],Z]);n.model.setTerminal(O[0],n.model.getTerminal(J[0],+!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?O[1].geometry.x+=k?Z.geometry.width+10:-O[1].geometry.width-10:O[1].geometry.y+=k?Z.geometry.height+10:-O[1].geometry.height-10;n.view.currentRoot!=v&&(O[1].geometry.x-=V.x,O[1].geometry.y-=V.y);var U=n.view.getState(Z),X=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-O[1].geometry.width-10)*X:fa.y+=+(k?Z.geometry.height+10:-O[1].geometry.height-10)*X;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/+X),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/X))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(O,+v)}finally{n.model.endUpdate()}}function E(Z){n.model.beginUpdate();try{var k=H(Z),v=n.getIncomingTreeEdges(Z),J=n.cloneCells([v[0],Z]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],Z,!1);var O=n.model.getParent(Z),T=O.geometry,V=[];n.view.currentRoot!=O&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(Z,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&V.push(na);(null==na||la)&&V.push(fa);return null==na||la});var U=Z.geometry.width+40,+X=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,X=-X):k==mxConstants.DIRECTION_WEST?(U=-U,X=0):k==mxConstants.DIRECTION_EAST&&(X=0);n.moveCells(V,U,X);return n.addCells(J,O)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),O=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],O=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==+n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],O));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var X=n.model.getTerminal(J[U],!1);null!=X&&k.push(X)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;O==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height-+V.y+40):O==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-V.x+10,T[1].geometry.y-=T[1].geometry.height+V.y+40):(T[1].geometry.x=O==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+V.x+40):T[1].geometry.x+(T[1].geometry.width-V.x+40),T[1].geometry.y=null==fa?Z.geometry.y+(Z.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-V.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}+function c(Z,k,v){Z=n.getOutgoingTreeEdges(Z);v=n.view.getState(v);var J=[];if(null!=v&&null!=Z){for(var O=0;O<Z.length;O++){var T=n.view.getState(n.model.getTerminal(Z[O],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(V,U){return k?V.x+V.width-U.x-U.width:V.y+V.height-U.y-U.height})}return J}function g(Z,k){var v=H(Z),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)==J&&v!=k?m.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(Z),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(Z),null!=v&&0<v.length&&(J=c(n.model.getTerminal(v[0],!0),J,Z),Z=n.view.getState(Z),null!=Z&&(Z=mxUtils.indexOf(J,Z),0<=Z&&(Z+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=Z&&Z<=J.length-1&&n.setSelectionCell(J[Z].cell)))))}var m=this,n=m.editor.graph,x=n.getModel(),F=m.menus.createPopupMenu;m.menus.createPopupMenu=function(Z,k,v){F.apply(this,arguments);if(1==n.getSelectionCount()){k=n.getSelectionCell();var J=n.getOutgoingTreeEdges(k);Z.addSeparator();0<J.length&&(u(n.getSelectionCell())&&this.addMenuItems(Z,["selectChildren"],null,v),this.addMenuItems(Z,["selectDescendants"],null,v));u(n.getSelectionCell())?(Z.addSeparator(),0<n.getIncomingTreeEdges(k).length&&this.addMenuItems(Z,["selectSiblings","selectParent"],null,v)):0<n.model.getEdgeCount(k)&&this.addMenuItems(Z,["selectConnections"],null,v)}};m.actions.addAction("selectChildren",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();Z=mxEvent.isControlDown(Z)?null:n.getOutgoingTreeEdges(k);if(null!=Z&&0<Z.length){k=[];for(var v=0;v<Z.length;v++)k.push(n.model.getTerminal(Z[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");m.actions.addAction("selectDescendants",function(Z){var k=n.getSelectionCell();-if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(Z)||n.traverse(k,!0,function(J,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(Z)&&v.push(N);(null==N||T)&&v.push(J);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(Z){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(Z=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k),+if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(Z)||n.traverse(k,!0,function(J,O){var T=null!=O&&n.isTreeEdge(O);T&&mxEvent.isControlDown(Z)&&v.push(O);(null==O||T)&&v.push(J);return null==O||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(Z){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(Z=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k),null!=Z&&0<Z.length?n.setSelectionCell(n.model.getTerminal(Z[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");m.actions.addAction("selectSiblings",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k);Z=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var J=0;J<v.length;J++)Z.push(n.model.getTerminal(v[J],!1));0==Z.length&&(Z=n.model.getChildren(n.model.getParent(k)));-n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var N=Z[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(V,U){var X=null!=U&&n.isTreeEdge(U);X&&T.push(U);(null==U||X)&&T.push(V);return null==U||X});0<T.length&&(v=v.concat(T),-N=n.getIncomingTreeEdges(Z[J]),Z=Z.concat(N))}else null!=N&&v.push(Z[J])}Z=v;return I.apply(this,arguments)};m.hoverIcons.getStateAt=function(Z,k,v){return u(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(Z,k){Z=null!=Z?Z:this.getSelectionCells();for(var v=Z.slice(0),J=0;J<v.length;J++){var N=n.view.getState(v[J]);if(null!=N&&u(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],Z)}}this.model.beginUpdate();-try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var X=this.cloneCell(T[0]);this.addEdge(X,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,N,T,V){for(var U=null,X=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!B(Z[fa])&&this.isCellCollapsed(Z[fa])?X=X.concat(this.getSubtree(Z[fa])):-X.push(Z[fa]);Z=mxUtils.removeDuplicates(X);this.model.beginUpdate();try{X=N;var na=this.getCurrentCellStyle(N);if(null!=Z&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){N=n.model.getParent(Z[fa]);break}if(null!=X&&N!=X&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(X);+n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var O=Z[J];x.isEdge(O)&&q(O)&&(v.push(O),O=x.getTerminal(O,!1));if(u(O)){var T=[];n.traverse(O,!0,function(V,U){var X=null!=U&&n.isTreeEdge(U);X&&T.push(U);(null==U||X)&&T.push(V);return null==U||X});0<T.length&&(v=v.concat(T),+O=n.getIncomingTreeEdges(Z[J]),Z=Z.concat(O))}else null!=O&&v.push(Z[J])}Z=v;return I.apply(this,arguments)};m.hoverIcons.getStateAt=function(Z,k,v){return u(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(Z,k){Z=null!=Z?Z:this.getSelectionCells();for(var v=Z.slice(0),J=0;J<v.length;J++){var O=n.view.getState(v[J]);if(null!=O&&u(O.cell)){var T=n.getIncomingTreeEdges(O.cell);for(O=0;O<T.length;O++)mxUtils.remove(T[O],Z)}}this.model.beginUpdate();+try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var X=this.cloneCell(T[0]);this.addEdge(X,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,O,T,V){for(var U=null,X=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!C(Z[fa])&&this.isCellCollapsed(Z[fa])?X=X.concat(this.getSubtree(Z[fa])):+X.push(Z[fa]);Z=mxUtils.removeDuplicates(X);this.model.beginUpdate();try{X=O;var na=this.getCurrentCellStyle(O);if(null!=Z&&u(O)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){O=n.model.getParent(Z[fa]);break}if(null!=X&&O!=X&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(X);null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=Z&&U.length==Z.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(X)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],X,!0);else if(u(Z[fa])&&(la=n.getIncomingTreeEdges(Z[fa]),0<la.length))if(!J)u(X)&&0>mxUtils.indexOf(Z,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],X,!0);else if(0==-n.getIncomingTreeEdges(U[fa]).length){na=X;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(N.isEdge(T[V])&&null==N.getTerminal(T[V],!0)){N.setTerminal(T[V],Z,!0);var U=-n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ja={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?+n.getIncomingTreeEdges(U[fa]).length){na=X;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var O=n.model,T=null;O.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(O.isEdge(T[V])&&null==O.getTerminal(T[V],!0)){O.setTerminal(T[V],Z,!0);var U=+n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{O.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ja={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?aa[Z.keyCode]:mxEvent.isAltDown(Z)?ja[Z.keyCode]:null;null!=v?(v.funct(Z),mxEvent.consume(Z)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==Z.which?v=mxEvent.isShiftDown(Z)?E(k):Q(k):13==Z.which&&(v=S(k,!mxEvent.isShiftDown(Z)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(Z)):37==Z.keyCode?(g(k,mxConstants.DIRECTION_WEST),-mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||ca.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,N,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var X=H(Z),fa=X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||-k==mxConstants.DIRECTION_WEST;return X==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||B(Z)||n.traverse(Z,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,-arguments);(y(this.state.cell)||u(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),+mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||ca.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,O,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var X=H(Z),fa=X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||+k==mxConstants.DIRECTION_WEST;return X==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||C(Z)||n.traverse(Z,!0,function(v,J){var O=null!=J&&n.isTreeEdge(J);O&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||O)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||O});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,+arguments);(y(this.state.cell)||u(this.state.cell))&&!C(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(Z){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(Z)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var Y=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){Y.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 da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Z){da.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=Z?"":"none")};var ha=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Z,k){ha.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 u=l.apply(this,arguments),y=this.graph,q=this;return u.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);B.insert(E);B.insert(H);B.insert(S);return q.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};');+function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);C.insert(E);C.insert(H);C.insert(S);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);var Q=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};');Q.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),E.style);c.geometry.relative=!0;c.edge=!0;H.insertEdge(c,!0);Q.insertEdge(c,!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 m=new mxCell("",new mxGeometry(0,0,0,0),E.style);m.geometry.relative=!0;m.edge=!0;H.insertEdge(m,!0);g.insertEdge(m,!1);var n=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};');-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;H.insertEdge(x,!0);n.insertEdge(x,!1);B.insert(E);B.insert(c);B.insert(m);B.insert(x);B.insert(H);B.insert(S);B.insert(Q);B.insert(g);B.insert(n);return q.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 q.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 q.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 q.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,+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;H.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(E);C.insert(c);C.insert(m);C.insert(x);C.insert(H);C.insert(S);C.insert(Q);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=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;');+C.vertex=!0;return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=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};');+C.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;C.insertEdge(H,!1);return q.createVertexTemplateFromCells([C,H],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=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};');C.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;C.insertEdge(H,!1);return q.createVertexTemplateFromCells([C,H],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.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"};');y.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);var Q=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"};');Q.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.relative=-!0;c.edge=!0;H.insertEdge(c,!0);Q.insertEdge(c,!1);B.insert(E);B.insert(c);B.insert(H);B.insert(S);B.insert(Q);return q.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"};');y.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return q.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 q.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 E=new mxCell("",new mxGeometry(0,0,0,0),H.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;S.insertEdge(E,!1);return q.createVertexTemplateFromCells([H,E,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+!0;c.edge=!0;H.insertEdge(c,!0);Q.insertEdge(c,!1);C.insert(E);C.insert(c);C.insert(H);C.insert(S);C.insert(Q);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=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"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],+C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=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"};');C.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;C.insertEdge(H,!1);return q.createVertexTemplateFromCells([C,H],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.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;C.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 E=new mxCell("",new mxGeometry(0,0,0,0),H.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;S.insertEdge(E,!1);return q.createVertexTemplateFromCells([H,E,C,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;EditorUi.initMinimalTheme=function(){function b(E,Q){if(EditorUi.windowed){var c=E.editor.graph;c.popupMenuHandler.hideMenu();null==E.formatWindow?(E.formatWindow=new WrapperWindow(E,"",Math.max(10,E.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";E.createFormat(g).init()}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.formatWindow.window.setTitle(mxResources.get("format"))})),E.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){E.formatWindow.window.fit()})),E.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):E.formatWindow.window.setVisible(null!=Q?Q:!E.formatWindow.window.isVisible())}else null==E.formatElt&&(E.formatElt=E.createSidebarContainer(),E.createFormat(E.formatElt).init(),E.formatElt.style.border="none",E.formatElt.style.width="240px",E.formatElt.style.borderLeftWidth="1px",E.formatElt.style.borderLeftStyle="solid",E.formatElt.style.right="0px"),Q=E.diagramContainer.parentNode,null!=E.formatElt.parentNode?(E.formatElt.parentNode.removeChild(E.formatElt),Q.style.right="0px"):(Q.parentNode.appendChild(E.formatElt),Q.style.right=E.formatElt.style.width)}function f(E,Q){if(EditorUi.windowed){var c=E.editor.graph;c.popupMenuHandler.hideMenu();null==E.sidebarWindow?(E.sidebarWindow=new WrapperWindow(E,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(g){E.createShapesPanel(g)}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),@@ -4176,23 +4175,23 @@ E.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){E.sdocument.body.clientWidth}catch(E){}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;EditorUi.prototype.closableScratchpad=!1;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.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var y=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(E,Q){null!=Q.shortcut&&900>l&&!mxClient.IS_IOS?E.firstChild.nextSibling.setAttribute("title",Q.shortcut):y.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=-function(E){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=E?E:!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 q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(E){B.apply(this,+function(E){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=E?E:!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 q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var C=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(E){C.apply(this,arguments);if(E){var Q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=Q&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=Q&&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(){};EditorUi.prototype.installFormatToolbar=function(E){var Q=this.editor.graph,c=document.createElement("div");c.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%;";Q.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<Q.getSelectionCount()?(E.appendChild(c),c.innerHTML="Selected: "+Q.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var E=this.formatWindow.window.toggleMinimized,Q=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(Q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+Q-140+"px"):(this.div.style.width=Q+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-Q+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(J,N,T){var V=n.menus.get(J);N=I.addMenu(mxResources.get(J),mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(J));n.menus.menuCreated(V,N,"geButton");null!=T&&-(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function Q(J,N,T,V,U,X){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=X?fa.style.backgroundImage="url("+X+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",-"disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&N.appendChild(J[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>l,N=E("diagram",null,J?Editor.menuImage:null);c([N,Q(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),-n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=E("insert",!0,J?ja:null);c([N,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")++mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(J,O,T){var V=n.menus.get(J);O=I.addMenu(mxResources.get(J),mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));O.className="geButton";O.setAttribute("title",mxResources.get(J));n.menus.menuCreated(V,O,"geButton");null!=T&&+(O.style.backgroundImage="url("+T+")",O.innerText="");return O}function Q(J,O,T,V,U,X){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=X?fa.style.backgroundImage="url("+X+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&O(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",+"disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,O,T){O=document.createElement("div");O.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&O.appendChild(J[T]);F.appendChild(O);return O}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>l,O=E("diagram",null,J?Editor.menuImage:null);c([O,Q(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),+n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);O=E("insert",!0,J?ja:null);c([O,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||O.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")+" ("+da.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ha.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([Z,k]),520<=l&&c([v,640<=l?Q("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?Q("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||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<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var I=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var N=-J.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",J.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),aa=n.updateTabContainer;+EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var I=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var O=+J.getMode();"google"==O?O="googleDrive":"github"==O?O="gitHub":"gitlab"==O?O="gitLab":"onedrive"==O&&(O="oneDrive");O=mxResources.get(O);F.setAttribute("title",J.getTitle()+(null!=O?" ("+O+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),aa=n.updateTabContainer;n.updateTabContainer=function(){aa.apply(this,arguments);n.tabContainer.appendChild(K)};var ja=Editor.addBoxImage;if(null!=n.hoverIcons){var ca=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());var oa=n.actions.get("zoomIn"),Y=n.actions.get("zoomOut");m=n.actions.get("resetView");var da=n.actions.get("undo"),ha=n.actions.get("redo"),Z=Q("",da.funct,null,"",da,Editor.undoImage),k=Q("",ha.funct,null,"",ha,Editor.redoImage),v=Q("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.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)}})();DrawioComment=function(b,f,l,u,y,q,B){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\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\nfindInDiagram=Find in Diagram\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\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\nshadows=Shadows\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\ntypeSlashToSearch=Type / to search\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\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\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\ncopyAsSvg=Copy as SVG\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.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpSpaces=Remember imported spaces\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;+(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)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\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\nfindInDiagram=Find in Diagram\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\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\nshadows=Shadows\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\ntypeSlashToSearch=Type / to search\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\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\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\ncopyAsSvg=Copy as SVG\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.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpSpaces=Remember imported spaces\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,f,l){this.init(b,f,l)};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,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};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=@@ -4209,7 +4208,7 @@ S);S();urlParams.page=u.currentPage;S=null;this.graph.getModel().beginUpdate();t(this.graph.panningHandler.isForcePanningEvent=function(x){return!mxEvent.isPopupTrigger(x.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.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var I=x.indexOf(",");u.selectPageById(x.substring(I+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=this.getGraphBounds();this.handleCustomLink(x,F);M.equals(this.getGraphBounds())||u.crop()}}catch(L){alert(L.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof l){var q=-this.getObservableParent(b),B=new l(mxUtils.bind(this,function(H){0<b.offsetWidth&&(B.disconnect(),y())}));B.observe(q,{attributes:!0})}else y()}};+this.getObservableParent(b),C=new l(mxUtils.bind(this,function(H){0<b.offsetWidth&&(C.disconnect(),y())}));C.observe(q,{attributes:!0})}else y()}};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 f=b.background,l=mxUtils.bind(this,function(u){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,u&&b.view.validateBackground())});this.addListener("graphChanged",function(){f=b.background;l(!0)});this.addListener("darkModeChanged",function(){l(!0)});l(!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,f=this.isDarkMode();f?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=f?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};@@ -4226,17 +4225,17 @@ this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWi(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},y=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",u),this.graph.addListener("size",u)):new ResizeSensor(this.graph.container,u));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,f.width+2*this.graph.border),0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;u=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",u):new ResizeSensor(this.graph.container,u))}else 9>=document.documentMode||this.graph.addListener("size",-u);var B=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var E=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||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>E)?(H=null,null!=E&&f.height+2*this.graph.border>E-2&&(H=(E-2*this.graph.border-2)/f.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-f.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+H.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){f=this.graph.getGraphBounds();y=null;B(H)}};+u);var C=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var E=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||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>E)?(H=null,null!=E&&f.height+2*this.graph.border>E-2&&(H=(E-2*this.graph.border-2)/f.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-f.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+H.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(H){f=this.graph.getGraphBounds();y=null;C(H)}};GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),l=b.border,u=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/u+l):l,null!=f.y?Math.floor(b.view.translate.y-f.y/u+l):l)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};-GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var H=0;H<u.length;H++){var S=b.getCell(u[H]);null!=S&&(f=!0,q[S.id]=!0)}else for(H=0;H<l.length;H++)S=b.getChildAt(b.root,parseInt(l[H])),null!=S&&(f=!0,q[S.id]=!0);for(H=0;f&&-H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,q[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),f.isVisible(f.getChildAt(f.root,H)))}finally{b.endUpdate()}q=!0}return q};+GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var H=0;H<u.length;H++){var S=b.getCell(u[H]);null!=S&&(f=!0,q[S.id]=!0)}else for(H=0;H<l.length;H++)S=b.getChildAt(b.root,parseInt(l[H])),null!=S&&(f=!0,q[S.id]=!0);for(H=0;f&&+H<C;H++)S=b.getChildAt(b.root,H),b.setVisible(S,q[S.id]||!1)}else for(H=0;H<C;H++)b.setVisible(b.getChildAt(b.root,H),f.isVisible(f.getChildAt(f.root,H)))}finally{b.endUpdate()}q=!0}return q};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 f=b.ownerDocument.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var l=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",l);this.toolbar=f;l();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");-mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),B=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=-"";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(B(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){B(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){B(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",-mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ba,oa){},mouseUp:function(ba,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<-S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,Y,da){ba=this.createToolbarButton(ba,oa,Y,da);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";+mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),C=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=+"";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(C(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){C(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){C(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",+mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||C(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ba,oa){},mouseUp:function(ba,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<+S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,Y,da){ba=this.createToolbarButton(ba,oa,Y,da);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";I=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",I);I()}else if("zoom"==I)this.zoomEnabled&&(Q(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),Q(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),Q(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"==I){if(this.layersEnabled){var K=Q(mxUtils.bind(this,function(ba){if(null!=g)g.parentNode.removeChild(g),@@ -4262,8 +4261,8 @@ this.graphConfig.highlight&&(l.highlight=this.graphConfig.highlight.substring(1)GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("src",Editor.closeBlackImage);l.style.position="fixed";l.style.top="32px";l.style.right="32px";l.style.cursor="pointer";l.className="geAdaptiveAsset";var u=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",u);q.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 y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(m){}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(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var B=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),H=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(f),-document.body.removeChild(l),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var E=q.editor.graph,Q=E.container;Q.style.overflow="hidden";Q.style.inset="0";this.lightboxChrome&&null==b?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(f.style.display="none",l.style.display="none");var c=this;E.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),H=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),+document.body.removeChild(l),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var E=q.editor.graph,Q=E.container;Q.style.overflow="hidden";Q.style.inset="0";this.lightboxChrome&&null==b?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;E.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(n){return c.getImageUrl(n)};return m};this.graphConfig.move&&(E.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(E,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),Q.style.outline="none",Q.style.zIndex=this.lightboxZIndex,l.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(Q)):(document.body.appendChild(Q),document.body.appendChild(l)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(E,this.graph),q.lightboxFit(),q.chromelessResize()}catch(m){q.handleError(m,null,function(){q.destroy()})}}),0);return q};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))};@@ -4280,11 +4279,11 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\"\t z-index: "+(GraphViewer.prototype.lightboxZIndex+2)+";","}\n.geBackground {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t position: fixed;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n opacity: 0.9;","\t z-index: "+(GraphViewer.prototype.lightboxZIndex+1)+";","}\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.geHelpIcon {\n width: 16px;\n margin: 0 4px;\n vertical-align: text-bottom;\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,f,l){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var u=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;u.open("GET",b);u.onload=function(){f(null!=u.getText?u.getText():u.responseText)};u.onerror=l;u.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function B(m,n){if(!m.resizedAttached)m.resizedAttached=+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function C(m,n){if(!m.resizedAttached)m.resizedAttached=new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.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>';m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],I=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var aa,ja,ca,ba;n=function(){if((ca=m.offsetWidth)!=aa||(ba=m.offsetHeight)!=ja)L=!0,aa=ca,ja=ba;M()};var oa=function(Y,da,ha){Y.attachEvent?Y.attachEvent("on"+da,ha):Y.addEventListener(da,ha)};oa(x,"scroll",n);oa(I,"scroll",n)}var H=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,E=!1;(new ResizeObserver(function(){E||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){E=!0;H();S=null;E=!1},200))})).observe(l)}else{var Q=Object.prototype.toString.call(l),c="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===-Q||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){Q=0;for(var g=l.length;Q<g;Q++)B(l[Q],H)}else B(l,H);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();+Q||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){Q=0;for(var g=l.length;Q<g;Q++)C(l[Q],H)}else C(l,H);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();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 a8b153f79..e14ea1e2d 100644--- a/src/main/webapp/js/viewer.min.js+++ b/src/main/webapp/js/viewer.min.js@@ -22,13 +22,13 @@ if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMaplang.substring(0,dash));0<=window.mxLanguages.indexOf(lang)&&(window.mxLanguage=lang)}}"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="1"));"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}"dark"==urlParams.ui&&null==urlParams.dark&&(urlParams.dark="1");"sketch"==a&&null==urlParams.sketch&&"ac.draw.io"===window.location.hostname&&(urlParams.sketch="1");return a}();-(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,-8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";+(function(){if("undefined"!==typeof JSON&&isLocalStorage){try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}try{a=localStorage.getItem(".configuration"),b=null,null!=a&&(b=JSON.parse(a).lockdown),null!=b&&(urlParams.lockdown=b)}catch(d){}}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&+(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,+b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlParams["gapi-stealth"]&&(urlParams.stealth="1");if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.gapi="1"==urlParams["gapi-stealth"]?"1":"0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"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:"28.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/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.1.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),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||@@ -54,8 +54,8 @@ unescape(c)):mxResources.resources[d]=c}}}},containsKey:function(a){return null!"/resources/editor",null,function(){mxResources.add(mxClient.basePath+"/resources/graph",null,a)})}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.intersect=function(a){if(null!=a){var b=this.x+this.width,c=a.x+a.width,d=this.y+this.height,e=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(b,c)-this.x;this.height=Math.min(d,e)-this.y}};-mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};-mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};+mxRectangle.prototype.intersectsPoint=function(a,b){return a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,q=(l.geometry.y-l.previous.y)*n,r=(l.geometry.width-l.previous.width)*n;n*=l.geometry.height-l.previous.height;0==d?(m.x-=p,m.y-=q,m.width-=r,m.height-=n):(m.x+=p/10,m.y+=q/10,m.width+=r/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},@@ -1886,8 +1886,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,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)};-Editor=function(b,f,l,u,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=u||this.createGraph(f,l);this.editable=null!=y?y:!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(q,B){this.status=q;this.statusFunction=B;this.fireEvent(new mxEventObject("statusChanged"))};-this.getStatus=function(){return this.status};this.graphChangeListener=function(q,B){q=null!=B?B.getProperty("edit"):null;null!=q&&q.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,f,l,u,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=u||this.createGraph(f,l);this.editable=null!=y?y:!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(q,C){this.status=q;this.statusFunction=C;this.fireEvent(new mxEventObject("statusChanged"))};+this.getStatus=function(){return this.status};this.graphChangeListener=function(q,C){q=null!=C?C.getProperty("edit"):null;null!=q&&q.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(f){}})();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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTI0MHYtODBoNzIwdjgwSDEyMFptMC0yMDB2LTgwaDcyMHY4MEgxMjBabTAtMjAwdi04MGg3MjB2ODBIMTIwWiIvPjwvc3ZnPg==";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";@@ -1957,7 +1957,7 @@ 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?"⌘":"Ctrl";Editor.altKey=mxClient.IS_MAC?"⌥":"Alt";Editor.shiftKey=mxClient.IS_MAC?"⇧":"Shift";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeClipboard=window==window.top&&null!=navigator.clipboard&&null!=navigator.clipboard.read;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;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 f=document.createElement("div");f.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(f.childNodes)}return null};-Editor.extractGraphModelFromPng=function(b){var f=null;try{var l=b.substring(b.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);EditorUi.parsePng(u,mxUtils.bind(this,function(y,q,B){y=u.substring(y+8,y+8+B);"zTXt"==q?(B=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,B)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(B+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==+Editor.extractGraphModelFromPng=function(b){var f=null;try{var l=b.substring(b.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);EditorUi.parsePng(u,mxUtils.bind(this,function(y,q,C){y=u.substring(y+8,y+8+C);"zTXt"==q?(C=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,C)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(C+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==y[0]||"mxfile"==y[0])&&(f=y[1]));if(null!=f||"IDAT"==q)return!0}))}catch(y){}null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));return f};Editor.soundex=function(b){if(null==b||0==b.length)return"";var f=[],l=1;f[0]=b[0].toUpperCase();for(var u=1,y=b.length;u<y;u++){var q=b[u].toUpperCase().charCodeAt(0)-65;if(0<=q&&25>=q&&"0"!="01230120022455012603010202"[q]&&("01230120022455012603010202"[q]!=f[l-1]&&(f[l]="01230120022455012603010202"[q],l++),3<l))break}if(3>=l)for(;3>=l;)f[l]="0",l++;return f.join("")};Editor.selectFilename=function(b){var f=b.value.lastIndexOf(".");if(0<f){var l=b.value.substring(f+1);"drawio"!=l&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],l)&&(l=b.value.lastIndexOf(".drawio.",f),0<l&&(f=l))}f=0<f?f:b.value.length;Editor.selectSubstring(b,0,f)};@@ -1966,7 +1966,7 @@ Editor.toUnit=function(b,f){return f==mxConstants.INCHES?Math.round(100*b/mxConsEditor.fromUnit=function(b,f){return f==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):f==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):f==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.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,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});+Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});mxEvent.addListener(window,"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var l=b.isCssTransformsSupported,u=this;b.isCssTransformsSupported=function(){return l.apply(this,arguments)&&(!u.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});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=@@ -1980,80 +1980,80 @@ Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var f=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,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],B=0;B<u.length;B++)null!=b.view.getState(u[B])&&(q.push(u[B]),-y||(b.scrollCellToVisible(u[B]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};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,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],C=0;C<u.length;C++)null!=b.view.getState(u[C])&&(q.push(u[C]),+y||(b.scrollCellToVisible(u[C]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};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,f,l,u,y,q,B,H,S,E,Q){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),-f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!Q)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=B;this.container=y;null!=E&&this.addResizeHandler(E);+function Dialog(b,f,l,u,y,q,C,H,S,E,Q){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),+f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!Q)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=C;this.container=y;null!=E&&this.addResizeHandler(E);b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,f){return new mxPoint(b,f)};-Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,B=mxUtils.bind(this,function(E){l=mxEvent.getClientX(E);u=mxEvent.getClientY(E);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,H,S);mxEvent.consume(E)}),-H=mxUtils.bind(this,function(E){if(null!=l&&null!=u){var Q=mxEvent.getClientX(E)-l,c=mxEvent.getClientY(E)-u;this.container.style.width=Math.max(b.width,y+2*Q)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(E)}}),S=mxUtils.bind(this,function(E){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,H,S),mxEvent.consume(E))});mxEvent.addGestureListeners(f,B,H,S);this.container.appendChild(f)};+Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(E){l=mxEvent.getClientX(E);u=mxEvent.getClientY(E);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,H,S);mxEvent.consume(E)}),+H=mxUtils.bind(this,function(E){if(null!=l&&null!=u){var Q=mxEvent.getClientX(E)-l,c=mxEvent.getClientY(E)-u;this.container.style.width=Math.max(b.width,y+2*Q)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(E)}}),S=mxUtils.bind(this,function(E){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,H,S),mxEvent.consume(E))});mxEvent.addGestureListeners(f,C,H,S);this.container.appendChild(f)};Dialog.prototype.close=function(b,f){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,f))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,f,l,u,y,q,B,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=+var ErrorDialog=function(b,f,l,u,y,q,C,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof l&&(l=l.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(l);c.appendChild(f);l=document.createElement("div");l.style.marginTop="12px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",l.appendChild(f),l.style.textAlign="center");null!=E&&(E=mxUtils.button(E,function(){null!=Q&&Q()}),E.className="geBtn",l.appendChild(E));-var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=B&&(u=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};-PrintDialog.prototype.create=function(b){function f(m){var n=B.checked||E.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/l.pageScale;if(n){var M=B.checked?1:parseInt(Q.value);isNaN(M)||(I=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);I*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):-n=!0;n=PrintDialog.createPrintPreview(l,I,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=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(m){B.checked=!B.checked;E.checked=!B.checked;mxEvent.consume(m)});mxEvent.addListener(B,"change",function(){E.checked=!B.checked});q.appendChild(H);y.appendChild(q);q=q.cloneNode(!1);var E=document.createElement("input");E.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(E);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,-"click",function(m){E.checked=!E.checked;B.checked=!E.checked;mxEvent.consume(m)});q.appendChild(H);var Q=document.createElement("input");Q.setAttribute("value","1");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("size","4");Q.setAttribute("disabled","disabled");Q.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(Q);mxUtils.write(H," "+mxResources.get("pages")+" (max)");q.appendChild(H);y.appendChild(q);mxEvent.addListener(E,"change",-function(){E.checked?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");B.checked=!E.checked});q=q.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");q.appendChild(H);H=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";H.appendChild(c);q.appendChild(H);y.appendChild(q);q=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){S&&b.hideDialog();null!=H&&H()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};+PrintDialog.prototype.create=function(b){function f(m){var n=C.checked||E.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/l.pageScale;if(n){var M=C.checked?1:parseInt(Q.value);isNaN(M)||(I=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);I*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):+n=!0;n=PrintDialog.createPrintPreview(l,I,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(C);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));+H.appendChild(S);mxEvent.addListener(S,"click",function(m){C.checked=!C.checked;E.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){E.checked=!C.checked});q.appendChild(H);y.appendChild(q);q=q.cloneNode(!1);var E=document.createElement("input");E.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(E);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,+"click",function(m){E.checked=!E.checked;C.checked=!E.checked;mxEvent.consume(m)});q.appendChild(H);var Q=document.createElement("input");Q.setAttribute("value","1");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("size","4");Q.setAttribute("disabled","disabled");Q.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(Q);mxUtils.write(H," "+mxResources.get("pages")+" (max)");q.appendChild(H);y.appendChild(q);mxEvent.addListener(E,"change",+function(){E.checked?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");C.checked=!E.checked});q=q.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");q.appendChild(H);H=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";H.appendChild(c);q.appendChild(H);y.appendChild(q);q=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 g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";H.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";H.appendChild(g);b.editor.cancelFirst||H.appendChild(S);q.appendChild(H);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};-PrintDialog.createPrintPreview=function(b,f,l,u,y,q,B){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";f.backgroundColor=B;var H=f.isTextLabel;f.isTextLabel=function(E){return"geHint"==!E.className&&H.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(E){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};+PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var H=f.isTextLabel;f.isTextLabel=function(E){return"geHint"==!E.className&&H.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(E){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};PrintDialog.previewEnabled=!0;var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(Q.style.backgroundImage="url("+x.src+")",Q.style.display="inline-block"):(Q.style.backgroundImage="",Q.style.display="none");Q.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(Q.style.backgroundColor=g,Q.style.display="inline-block")}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");-var q=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");q.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",l.pageFormat);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");q.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=l.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");-q.appendChild(B);B=document.createElement("td");var E=document.createElement("button");E.className="geBtn";E.style.margin="0px";mxUtils.write(E,mxResources.get("change")+"...");var Q=document.createElement("div");Q.style.display="inline-block";Q.style.verticalAlign="middle";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="contain";Q.style.border="1px solid lightGray";Q.style.borderRadius="4px";Q.style.marginRight="14px";Q.style.height="32px";-Q.style.width="64px";Q.style.cursor="pointer";Q.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,I,M,L){I||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(E,"click",n);mxEvent.addListener(Q,"click",n);f();B.appendChild(Q);B.appendChild(E);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");-B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";b.editor.cancelFirst&&B.appendChild(E);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,H.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&-(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";B.appendChild(n);b.editor.cancelFirst||B.appendChild(E);q.appendChild(B);y.appendChild(q);u.appendChild(y);this.container=u};-PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var B=document.createElement("select");B.style.position="relative";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";y.style.marginRight="6px";H.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));H.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";H.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,+var q=document.createElement("tr");var C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";mxUtils.write(C,mxResources.get("paperSize")+":");q.appendChild(C);C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(C,"pagesetupdialog",l.pageFormat);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("gridSize")+":");q.appendChild(C);+C=document.createElement("td");C.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=l.getGridSize();C.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");+q.appendChild(C);C=document.createElement("td");var E=document.createElement("button");E.className="geBtn";E.style.margin="0px";mxUtils.write(E,mxResources.get("change")+"...");var Q=document.createElement("div");Q.style.display="inline-block";Q.style.verticalAlign="middle";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="contain";Q.style.border="1px solid lightGray";Q.style.borderRadius="4px";Q.style.marginRight="14px";Q.style.height="32px";+Q.style.width="64px";Q.style.cursor="pointer";Q.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,I,M,L){I||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(E,"click",n);mxEvent.addListener(Q,"click",n);f();C.appendChild(Q);C.appendChild(E);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");+C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";b.editor.cancelFirst&&C.appendChild(E);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,H.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&+(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";C.appendChild(n);b.editor.cancelFirst||C.appendChild(E);q.appendChild(C);y.appendChild(q);u.appendChild(y);this.container=u};+PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var C=document.createElement("select");C.style.position="relative";C.style.marginBottom="4px";C.style.borderRadius="4px";C.style.borderWidth="1px";C.style.borderStyle="solid";+C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";y.style.marginRight="6px";H.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));H.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";H.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));H.appendChild(S);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.marginLeft="4px";E.style.fontSize="12px";E.style.width="210px";E.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.setAttribute("title",mxResources.get("width"));Q.style.textAlign="right";E.appendChild(Q);mxUtils.write(E," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign="right";E.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var m=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<m.length;n++){var x=document.createElement("option");x.setAttribute("value",m[n].unit);mxUtils.write(x,m[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;E.appendChild(g);-H.style.display="none";E.style.display="none";var F={},I=PageSetupDialog.getFormats();for(n=0;n<I.length;n++)m=I[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),B.appendChild(x);var M=function(){B.value="custom";for(var K=0;K<I.length;K++){var aa=I[K];null!=aa.format&&("a4"==aa.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==aa.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),-l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==aa.format.width&&l.height==aa.format.height?(B.value=aa.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==aa.format.height&&l.height==aa.format.width&&(B.value=aa.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==-B.value?(Q.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),B.value="custom",H.style.display="none",E.style.display=""):(H.style.display="",E.style.display="none")};M();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(E);var L=function(K,aa){K=F[B.value];null!=K.format?(Q.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),E.style.display=+H.style.display="none";E.style.display="none";var F={},I=PageSetupDialog.getFormats();for(n=0;n<I.length;n++)m=I[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),C.appendChild(x);var M=function(){C.value="custom";for(var K=0;K<I.length;K++){var aa=I[K];null!=aa.format&&("a4"==aa.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==aa.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),+l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==aa.format.width&&l.height==aa.format.height?(C.value=aa.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==aa.format.height&&l.height==aa.format.width&&(C.value=aa.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==+C.value?(Q.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),C.value="custom",H.style.display="none",E.style.display=""):(H.style.display="",E.style.display="none")};M();b.appendChild(C);mxUtils.br(b);b.appendChild(H);b.appendChild(E);var L=function(K,aa){K=F[C.value];null!=K.format?(Q.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),E.style.display="none",H.style.display=""):(H.style.display="none",E.style.display="");K=parseFloat(Q.value);if(isNaN(K)||0>=K)Q.value=Editor.toUnit(l.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(l.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(Q.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));aa||K.width==l.width&&K.height==l.height||(l=K,null!=u&&u(l))};mxEvent.addListener(f,"click",function(K){y.checked=!0;L(K);mxEvent.consume(K)});-mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(Q,"blur",L);mxEvent.addListener(Q,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(B,"change",function(K){L(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){Q.value=Editor.toUnit(Editor.fromUnit(Q.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,+mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(Q,"blur",L);mxEvent.addListener(Q,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){Q.value=Editor.toUnit(Editor.fromUnit(Q.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;L(K,!0);mxEvent.consume(K)});L(null,!0);return{set:function(K){l=K;M(null,null,!0)},get:function(){return l},widthInput:Q,heightInput:c}};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,f,l,u,y,q,B,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";+var FilenameDialog=function(b,f,l,u,y,q,C,H,S,E,Q){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))S&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-y||null==B)if(null!=Q?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=g.parentNode;if(null!=I){var M=null;mxEvent.addListener(I,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor=+y||null==C)if(null!=Q?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=g.parentNode;if(null!=I){var M=null;mxEvent.addListener(I,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor="#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(L){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),F.click());L.stopPropagation();L.preventDefault()}))}}};m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.gap="4px";m.style.whiteSpace="nowrap";m.appendChild(x);g.appendChild(m);-null==y&&null!=B||null==Q||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),-f.style.width="100%",m.appendChild(f));null!=B&&g.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=Q?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=E&&E()});m.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));+null==y&&null!=C||null==Q||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),+f.style.width="100%",m.appendChild(f));null!=C&&g.appendChild(C);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=Q?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=E&&E()});m.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));b.editor.cancelFirst&&row.appendChild(m);mxEvent.addListener(x,"keypress",function(I){13==I.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(m);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;-FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var B=f.value.lastIndexOf(".drawio.");B=0<B?B:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<B?f.value.substring(0,B+1)+q:f.value+"."+q;"createEvent"in-document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var B=0,H=0;H<l.length;H++){var S=l[H].extension,E=null;"drawio"!=S&&(E=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=E&&q.substring(q.length-E.length-1)=="."+E){B=H;break}}u.value=B};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};-var WrapperWindow=function(b,f,l,u,y,q,B,H){H=null!=H?H:document.createElement("div");this.window=new mxWindow(f,H,l,u,y,q,!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);B(H)};-(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(E){B.dblClick(E)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(E){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){null!=-B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(E)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(E))})))}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 E=this.graph;B=null!=B?B:1;var Q=mxUtils.getLightDarkColor(null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background).cssText,c=mxUtils.getLightDarkColor(E.defaultPageBorderColor).cssText,g=null!=Q&&this.gridColor!=Q.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==E.getAdaptiveColors()&&E.background!=mxConstants.NONE&&null!=E.background&&(Q=E.background);if(E.isGridEnabled()||E.gridVisible){n=-10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,B))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=E.gridSize*this.scale*this.gridSteps*B):m="url("+this.gridImage+")";var x=g=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=E.gridSize*this.scale*this.gridSteps,I=H%F;F=S%F;null!=E.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*-this.scale-g+H,n)+I*B)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*B)+"px"}B=E.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);g=!Editor.isDarkMode()&&E.enableDiagramBackground;null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=n,E.view.backgroundPageShape.node.style.backgroundImage=m,E.view.backgroundPageShape.node.style.backgroundColor=Q,E.view.backgroundPageShape.node.style.borderColor=c,E.view.backgroundPageShape.node.style.colorScheme=-"none"==E.getAdaptiveColors()?"light":"",B.style.backgroundImage="none",B.style.backgroundColor="",E.container.style.backgroundColor=g?E.diagramBackgroundColor:""):(B.style.backgroundPosition=n,B.style.backgroundImage=m,"1"==urlParams.transparent?E.container.style.background="transparent":!g||null!=E.background&&E.background!=mxConstants.NONE?B.style.backgroundColor=Q:(B.style.backgroundColor=E.diagramBackgroundColor,E.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 E=[],Q=1;Q<this.gridSteps;Q++){var c=Q*S;E.push("M 0 "+c+" L "+H+" "+c+" M "+c+" 0 L "+c+" "+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="'+E.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 E=this.gridSize*this.view.scale*this.view.gridSteps;E=-Math.round(E-mxUtils.mod(this.view.translate.x*this.view.scale+B,E))+"px "+-Math.round(E-mxUtils.mod(this.view.translate.y*this.view.scale+H,E))+"px";S.style.backgroundPosition=E}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var E=this.view.scale,Q=this.view.translate,c=this.pageFormat,g=E*this.pageScale,m=this.view.getBackgroundPageBounds();-H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ja=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),+FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var C=f.value.lastIndexOf(".drawio.");C=0<C?C:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<C?f.value.substring(0,C+1)+q:f.value+"."+q;"createEvent"in+document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,H=0;H<l.length;H++){var S=l[H].extension,E=null;"drawio"!=S&&(E=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=E&&q.substring(q.length-E.length-1)=="."+E){C=H;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};+var WrapperWindow=function(b,f,l,u,y,q,C,H){H=null!=H?H:document.createElement("div");this.window=new mxWindow(f,H,l,u,y,q,!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);C(H)};+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=C.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(C.container),S.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(E){C.dblClick(E)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(E){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){null!=+C.tooltipHandler&&C.tooltipHandler.isHideOnHover()&&C.tooltipHandler.hide();C.isMouseDown&&!mxEvent.isConsumed(E)&&C.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(E))}),mxUtils.bind(this,function(E){C.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(E))})))}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(C,H,S){var E=this.graph;C=null!=C?C:1;var Q=mxUtils.getLightDarkColor(null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background).cssText,c=mxUtils.getLightDarkColor(E.defaultPageBorderColor).cssText,g=null!=Q&&this.gridColor!=Q.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==E.getAdaptiveColors()&&E.background!=mxConstants.NONE&&null!=E.background&&(Q=E.background);if(E.isGridEnabled()||E.gridVisible){n=+10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=E.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=E.gridSize*this.scale*this.gridSteps,I=H%F;F=S%F;null!=E.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*+this.scale-g+H,n)+I*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*C)+"px"}C=E.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&E.enableDiagramBackground;null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=n,E.view.backgroundPageShape.node.style.backgroundImage=m,E.view.backgroundPageShape.node.style.backgroundColor=Q,E.view.backgroundPageShape.node.style.borderColor=c,E.view.backgroundPageShape.node.style.colorScheme=+"none"==E.getAdaptiveColors()?"light":"",C.style.backgroundImage="none",C.style.backgroundColor="",E.container.style.backgroundColor=g?E.diagramBackgroundColor:""):(C.style.backgroundPosition=n,C.style.backgroundImage=m,"1"==urlParams.transparent?E.container.style.background="transparent":!g||null!=E.background&&E.background!=mxConstants.NONE?C.style.backgroundColor=Q:(C.style.backgroundColor=E.diagramBackgroundColor,E.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(C,+H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var E=[],Q=1;Q<this.gridSteps;Q++){var c=Q*S;E.push("M 0 "+c+" L "+H+" "+c+" M "+c+" 0 L "+c+" "+H)}C=mxUtils.getLightDarkColor(C);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="'+E.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,H){b.apply(this,arguments);+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var E=this.gridSize*this.view.scale*this.view.gridSteps;E=-Math.round(E-mxUtils.mod(this.view.translate.x*this.view.scale+C,E))+"px "+-Math.round(E-mxUtils.mod(this.view.translate.y*this.view.scale+H,E))+"px";S.style.backgroundPosition=E}};mxGraph.prototype.updatePageBreaks=function(C,H,S){var E=this.view.scale,Q=this.view.translate,c=this.pageFormat,g=E*this.pageScale,m=this.view.getBackgroundPageBounds();+H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=C?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ja=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(aa+1)*n.height)),new mxPoint(Math.round(I),Math.round(m.y+(aa+1)*n.height))]:[new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(M))];null!=L[aa]?(L[aa].points=ja,L[aa].redraw()):(ja=new mxPolyline(ja,this.pageBreakColor),ja.dialect=this.dialect,ja.isDashed=this.pageBreakDashed,ja.pointerEvents=!1,ja.init(this.view.backgroundPane),ja.redraw(),L[aa]=ja)}for(aa=K;aa<L.length;aa++)null!=L[aa]&&L[aa].destroy();L.splice(K,L.length--K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var E=0;E<H.length;E++){if(this.graph.isTableCell(H[E])||this.graph.isTableRow(H[E]))return!1;if(this.graph.getModel().isVertex(H[E])){var Q=this.graph.getCellGeometry(H[E]);if(null!=Q&&Q.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=-function(){var B=l.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,E=this.graph.pageFormat,-Q=this.graph.pageScale,c=E.width*Q;E=E.height*Q;Q=Math.floor(Math.min(0,H)/c);var g=Math.floor(Math.min(0,S)/E);return new mxRectangle(this.scale*(this.translate.x+Q*c),this.scale*(this.translate.y+g*E),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/c)-Q)*c,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/E)-g)*E)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){u.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 y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,E,Q,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=-function(B,H,S){var E=this.graph.model.getParent(B);if(H){var Q=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);Q=!this.graph.model.isEdge(E)&&!this.graph.isSiblingSelected(B)&&(null!=Q&&Q.relative||!this.graph.isContainer(E)||this.graph.isPart(B))}else if(Q=q.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))Q=E,this.graph.isTable(Q)||(Q=this.graph.model.getParent(Q)),Q=!this.graph.selectionCellsHandler.isHandled(Q)||this.graph.isCellSelected(Q)&&this.graph.isToggleEvent(S.getEvent())||-this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(B);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var Y=q.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ha=this.view.translate,Z=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((ha.x+da.x)*Z,(ha.y+da.y)*Z,da.width*Z,da.height*Z))}return Y};y.useCssTransforms&&+K)}});C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,H,S){for(var E=0;E<H.length;E++){if(this.graph.isTableCell(H[E])||this.graph.isTableRow(H[E]))return!1;if(this.graph.getModel().isVertex(H[E])){var Q=this.graph.getCellGeometry(H[E]);if(null!=Q&&Q.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=+function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),H=0<C.width?C.x/this.scale-this.translate.x:0,S=0<C.height?C.y/this.scale-this.translate.y:0,E=this.graph.pageFormat,+Q=this.graph.pageScale,c=E.width*Q;E=E.height*Q;Q=Math.floor(Math.min(0,H)/c);var g=Math.floor(Math.min(0,S)/E);return new mxRectangle(this.scale*(this.translate.x+Q*c),this.scale*(this.translate.y+g*E),this.scale*(Math.ceil(Math.max(1,H+C.width/this.scale)/c)-Q)*c,this.scale*(Math.ceil(Math.max(1,S+C.height/this.scale)/E)-g)*E)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,H){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,H,S,E,Q,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=+function(C,H,S){var E=this.graph.model.getParent(C);if(H){var Q=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);Q=!this.graph.model.isEdge(E)&&!this.graph.isSiblingSelected(C)&&(null!=Q&&Q.relative||!this.graph.isContainer(E)||this.graph.isPart(C))}else if(Q=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))Q=E,this.graph.isTable(Q)||(Q=this.graph.model.getParent(Q)),Q=!this.graph.selectionCellsHandler.isHandled(Q)||this.graph.isCellSelected(Q)&&this.graph.isToggleEvent(S.getEvent())||+this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var H=this.graph.getModel(),S=H.getParent(C),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(C);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=S;S=H.getParent(S)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var Y=q.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ha=this.view.translate,Z=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((ha.x+da.x)*Z,(ha.y+da.y)*Z,da.width*Z,da.height*Z))}return Y};y.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(Y,da){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=-function(){return!1};y.panningHandler.isForcePanningEvent=function(Y){for(var da=Y.getSource();null!=da&&da!=y.container;){if("foreignObject"===da.nodeName||"text"===da.nodeName)return!1;da=da.parentNode}return!mxEvent.isPopupTrigger(Y.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(Y){try{y.getModel().isEdge(Y)?+function(){return!1};y.panningHandler.isForcePanningEvent=function(Y){for(var da=Y.getSource();null!=da&&da!=y.container;){if("foreignObject"===da.nodeName||"text"===da.nodeName)return!1;da=da.parentNode}return!mxEvent.isPopupTrigger(Y.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(Y){try{y.getModel().isEdge(Y)?S=y.pasteEdgeStyle=!1:H=!1;var da=y.getCellStyle(Y,!1),ha=[],Z=[],k;for(k in da)ha.push(da[k]),Z.push(k);y.getModel().isEdge(Y)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",ha,"cells",[Y],"force",!0));y.getModel().isEdge(Y)?S=y.pasteEdgeStyle=!0:H=!0}catch(v){this.handleError(v)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);H=S=y.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(Y,da){y.pasteCellStyles(y.includeDescendants(da.getProperty("cells")))});y.addListener("textInserted",function(Y,da){y.pasteCellStyles(da.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var E=mxUtils.bind(this,function(Y){null==Y&&(Y=window.event);return y.isEditing()||null!=Y&&this.isSelectionAllowed(Y)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=E,this.menubarContainer.onmousedown=E,this.toolbarContainer.onselectstart=E,this.toolbarContainer.onmousedown=E,this.diagramContainer.onselectstart=E,this.diagramContainer.onmousedown=E,this.sidebarContainer.onselectstart=E,this.sidebarContainer.onmousedown=E,this.formatContainer.onselectstart=E,this.formatContainer.onmousedown=E,null!=this.tabContainer&&(this.tabContainer.onselectstart=E),mxClient.IS_IOS&&(f=function(){var Y=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var da=@@ -2075,10 +2075,10 @@ this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.Format.linkEdgeImage.src):"flexArrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):"filledEdge"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.filledEdgeImage.src):"pipe"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.pipeEdgeImage.src):"wire"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var Y=y.currentVertexStyle.fontFamily||"Helvetica",da=String(y.currentVertexStyle.fontSize||"12"),ha=y.getView().getState(y.getSelectionCell());null!=ha&&(Y=ha.style[mxConstants.STYLE_FONTFAMILY]||Y,da=ha.style[mxConstants.STYLE_FONTSIZE]||da,10<Y.length&&(Y=Y.substring(0,8)+"..."));this.toolbar.setFontName(Y);this.toolbar.setFontSize(da)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(Y,da){Y=da.getProperty("cells");da=da.getProperty("parent");null!=da&&y.getModel().isLayer(da)&&!y.isCellVisible(da)&&null!=Y&&0<Y.length&&y.getModel().setVisible(da,!0)});Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var Y=y.getLayerForCells(y.getSelectionCells());-null!=Y&&y.setDefaultParent(Y)}});this.gestureHandler=mxUtils.bind(this,function(Y){null!=this.currentMenu&&mxEvent.getSource(Y)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=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(){y.view.validateBackground()}));-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;-EditorUi.parsePng=function(b,f,l){function u(H,S){var E=q;q+=S;return H.substring(E,q)}function y(H){H=u(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var B=u(b,4);if(null!=f&&f(q-8,B,l))break;value=u(b,l);u(b,4);if("IEND"==B)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);+null!=Y&&y.setDefaultParent(Y)}});this.gestureHandler=mxUtils.bind(this,function(Y){this.isHideCurrentMenuEvent(Y)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=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(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",+mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;+EditorUi.parsePng=function(b,f,l){function u(H,S){var E=q;q+=S;return H.substring(E,q)}function y(H){H=u(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);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 u=b.getRubberband();null!=u&&u.cancel()}));mxEvent.addListener(b.container,@@ -2086,33 +2086,33 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"arguments);l.updateActionStates()};b.showLinkDialog=mxUtils.bind(l,l.showLinkDialog);b.editLink=l.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,f=b.getSelectionCells(),l=this.initSelectionState(),u=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(l,f[y],f,u),u=!1)}this.updateSelectionStateForTableCells(l);if(Editor.enableCustomProperties&&null!=this.format){l.customProperties={};b=l.vertices;f=l.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],l.customProperties,0==y,l);for(y=0;y<f.length;y++)this.findCommonProperties(f[y],l.customProperties,0==b.length&&0==y,l)}return l};-EditorUi.prototype.findCommonProperties=function(b,f,l,u){if(null!=f){var y=mxUtils.bind(this,function(B){if(null!=B)if(l)for(var H=0;H<B.length;H++){if("function"!==typeof B[H].isVisible||B[H].isVisible(u,this.format))f[B[H].name]=B[H]}else for(var S in f){var E=!1;for(H=0;H<B.length;H++)if(B[H].name==S&&B[H].type==f[S].type){E=!0;break}E||delete f[S]}}),q=this.editor.graph.view.getState(b);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)),y(q.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{y(JSON.parse(b))}catch(B){}}};+EditorUi.prototype.findCommonProperties=function(b,f,l,u){if(null!=f){var y=mxUtils.bind(this,function(C){if(null!=C)if(l)for(var H=0;H<C.length;H++){if("function"!==typeof C[H].isVisible||C[H].isVisible(u,this.format))f[C[H].name]=C[H]}else for(var S in f){var E=!1;for(H=0;H<C.length;H++)if(C[H].name==S&&C[H].type==f[S].type){E=!0;break}E||delete f[S]}}),q=this.editor.graph.view.getState(b);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)),y(q.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{y(JSON.parse(b))}catch(C){}}};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 f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),B=y.getIndex(u),H=null,S=1,E=1,Q=0,c=B<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,B+1),q):null;Q<f.length-1;){var g=f[++Q];null==c||c!=g||null!=H&&S!=H||(H=S,S=0,E++,u=l.getParent(c),c=B+E<y.getChildCount()?l.getChildAt(l.getChildAt(y,B+E),q):null);var m=this.editor.graph.view.getState(g);+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),H=null,S=1,E=1,Q=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;Q<f.length-1;){var g=f[++Q];null==c||c!=g||null!=H&&S!=H||(H=S,S=0,E++,u=l.getParent(c),c=C+E<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+E),q):null);var m=this.editor.graph.view.getState(g);if(g==l.getChildAt(u,q+S)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))S++;else break}Q==E*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=E)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};-EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(H){y.clear()&&(u=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(H):this.handleError(H))}),B=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(B);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};+EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(H){y.clear()&&(u=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(H):this.handleError(H))}),C=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(C);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(l){null!=f?f(l):this.handleError(l)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(u.model.isEdge(b[B])||u.model.isVertex(b[B])){var H=u.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<y.length;S++)try{var E=H[y[S]];if(mxUtils.isLightDarkColor(E)){var Q=mxUtils.getLightDarkColor(E);u.setCellStyles(y[S],Q.light,[b[B]])}}catch(g){}f&&u.isHtmlLabel(b[B])&&-"0"!=mxUtils.getValue(H,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[B])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[B],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){Q=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,Q.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var H=u.getCellStyle(b[C],!1);if(null!=H)for(var S=0;S<y.length;S++)try{var E=H[y[S]];if(mxUtils.isLightDarkColor(E)){var Q=mxUtils.getLightDarkColor(E);u.setCellStyles(y[S],Q.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&+"0"!=mxUtils.getValue(H,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[C])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[C],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){Q=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,Q.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,f,l,u){l=this.editor.graph;b.cells.push(f);if(l.getModel().isVertex(f)){b.connections=0<l.model.getEdgeCount(f);b.unlocked=b.unlocked&&!l.isCellLocked(f);b.resizable=b.resizable&&l.isCellResizable(f);b.rotatable=b.rotatable&&l.isCellRotatable(f);b.movable=b.movable&&l.isCellMovable(f)&&!l.isTableRow(f)&&!l.isTableCell(f);b.swimlane=b.swimlane||l.isSwimlane(f);b.table=b.table||l.isTable(f);b.cell=b.cell||l.isTableCell(f);b.row=b.row||l.isTableRow(f);b.vertices.push(f);var y=l.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else l.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);q=l.view.getState(f);null!=q&&(b.html=b.html&&l.isHtmlLabel(f),b.autoSize=b.autoSize||l.isAutoSizeState(q),b.glass=b.glass&&l.isGlassState(q),b.rounded=b.rounded&&l.isRoundedState(q),b.lineJumps=b.lineJumps&&l.isLineJumpState(q),b.image=b.image||l.isImageState(q),b.shadow=b.shadow&&l.isShadowState(q),b.fill=b.fill&&l.isFillState(q),b.gradient=b.fill&&l.isGradientState(q),b.stroke=b.stroke&&l.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==f,l.mergeStyle(q.style,b.style,u))};EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,E){"mouseDown"==E.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,E){if(this.isEnabled())if(null!=E||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(Q.x,Q.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,E,Q){var c=Q.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?B.apply(this,arguments):this.graph.connectVertex(S.cell,E,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(Q.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=+l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(S,E,Q){var c=Q.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(S.cell,E,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(Q.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(Q.getGraphX(),Q.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),E)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,E){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var Q=E.getProperty("arrow"),c=E.getProperty("direction"),g=E.getProperty("event");Q=Q.getBoundingClientRect();var m=mxUtils.getOffset(b.container),n=b.container.scrollLeft+Q.x-m.x;m=b.container.scrollTop+Q.y-m.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,m,x,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(M,L,K){K(I);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(I))},function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,Q,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,E){null!=H&&window.clearTimeout(H)}))}};EditorUi.prototype.centerShapePicker=function(b,f,l,u,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(l-=q.width/2-10,u-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(l-=q.width/2-10,u+=f.height+6):y==mxConstants.DIRECTION_WEST?(l-=q.width+6,u-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(l+=f.width+6,u-=q.height/2-10);b.style.left=l+"px";b.style.top=u+"px"};-EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,B,H,S){var E=null;this.editor.graph.freehand.isDrawing()||(H=H||null==l,E=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,H),q,B,H,S),null!=E&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=E));return E};-EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,B,H,S,E,Q){Q=null!=Q?Q:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,I=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,I=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-I))};if(null!=B&&0<B.length){var m=this;c=this.editor.graph;g=document.createElement("div");+EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,H,S){var E=null;this.editor.graph.freehand.isDrawing()||(H=H||null==l,E=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,H),q,C,H,S),null!=E&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=E));return E};+EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,H,S,E,Q){Q=null!=Q?Q:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,I=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,I=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-I))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");y=c.view.getState(l);var n=null==l||null!=y&&c.isTransparentState(y)?null:c.copyStyle(l);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");H||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var I=x.geometry;c.model.isEdge(x)&&(I=I.getTerminalPoint(!1),I=new mxRectangle(0,0,I.x,I.y));null!=I&&(I=this.sidebar.createVertexTemplateFromCells([x],I.width,I.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=S([L]);c.model.isEdge(L)?L.geometry.translate(K.x,K.y):(L.geometry.x=K.x,L.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);Q&&c.startEditing(L);null!=m.hoverIcons&&m.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=l?[l]:c.getSelectionCells()),c.updateShapes(x,L);null!=q&&q(M);mxEvent.consume(M)}}),25,25,null,null,l),I.style.display="flex",I.style.alignItems=-"center",I.style.justifyContent="center",F.appendChild(I))});for(E=0;E<(H?Math.min(B.length,4):B.length);E++)y(B[E]);B=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<B&&(g.style.top=Math.max(c.container.scrollTop+22,f-B)+"px");B=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<B&&(g.style.left=Math.max(c.container.scrollLeft+22,b-B)+"px")}return g};-EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,B,H,S){return u.createVertex(null,null,S||"",0,0,B||120,H||60,q,!1)});f=mxUtils.bind(this,function(q,B,H){q=new mxCell(H||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=B?B:0),!1);q.geometry.points=null!=B?[new mxPoint(q.geometry.width/2,B)]:[];q.geometry.relative=!0;q.edge=+"center",I.style.justifyContent="center",F.appendChild(I))});for(E=0;E<(H?Math.min(C.length,4):C.length);E++)y(C[E]);C=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<C&&(g.style.top=Math.max(c.container.scrollTop+22,f-C)+"px");C=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<C&&(g.style.left=Math.max(c.container.scrollLeft+22,b-C)+"px")}return g};+EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,H,S){return u.createVertex(null,null,S||"",0,0,C||120,H||60,q,!1)});f=mxUtils.bind(this,function(q,C,H){q=new mxCell(H||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=!0;return q});if(null!=b)try{b=u.cloneCell(b),u.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(u.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",u.vertexFontSize),40,20,"Text"),u.model.isVertex(b)&&u.isAutoSizeCell(b)&&Graph.createOffscreenGraph(u.getStylesheet()).updateCellSize(b));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),y("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),y("triangle;whiteSpace=wrap;html=1;",60,80),y("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),y("shape=tape;whiteSpace=wrap;html=1;",120,100),y("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),y("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];l&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),@@ -2127,17 +2127,17 @@ EditorUi.prototype.getImageForMarker=function(b,f,l){return"flexArrow"==l?null!=b?"1"!=f?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=f?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,f=this.actions.get("paste"),l=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));l.setEnabled(f.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var B=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||q.getSelectionCells();B=q.getExportableCells(q.model.getTopmostCells(B));for(var H={},S=q.createCellLookup(B),E=q.cloneCells(B,null,H),Q=new mxGraphModel,c=Q.getChildAt(Q.getRoot(),-0),g=0;g<E.length;g++){Q.add(c,E[g]);var m=q.view.getState(B[g]);if(null!=m){var n=q.getCellGeometry(E[g]);null!=n&&n.relative&&!Q.isEdge(B[g])&&null==S[mxObjectIdentity.get(Q.getParent(B[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(H,S),E);mxClipboard.insertCount=1;mxClipboard.setCells(E)}b.updatePasteActionStates();return B};var l=mxClipboard.paste;mxClipboard.paste=function(q){var B=-null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=l.apply(this,arguments);b.updatePasteActionStates();return B};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,B){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};+EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var H={},S=q.createCellLookup(C),E=q.cloneCells(C,null,H),Q=new mxGraphModel,c=Q.getChildAt(Q.getRoot(),+0),g=0;g<E.length;g++){Q.add(c,E[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(E[g]);null!=n&&n.relative&&!Q.isEdge(C[g])&&null==S[mxObjectIdentity.get(Q.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(H,S),E);mxClipboard.insertCount=1;mxClipboard.setCells(E)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=+null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):C=l.apply(this,arguments);b.updatePasteActionStates();return C};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,C){y.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 U=this.graph.getPageLayout(),X=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*X.width),this.scale*(this.translate.y+U.y*X.height),this.scale*U.width*X.width,this.scale*U.height*X.height)};b.getPreferredPageSize=function(U,X,fa){U=this.getPageLayout();X=this.getPageSize();return new mxRectangle(0,0,U.width*X.width,U.height*X.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,X,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,-Ja=mxRectangle.fromRectangle(la);Ja.x=Ja.x/wa-ya.x;Ja.y=Ja.y/wa-ya.y;Ja.width/=wa;Ja.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(X||1,Ga/Ja.width)):wa;X=(Ga-U*Ja.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ja.height)/this.lightboxVerticalDivider/U;qa&&(X=Math.max(X,0),Ma=Math.max(Ma,-0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(X-Ja.x),Math.floor(Ma-Ja.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+Ia=mxRectangle.fromRectangle(la);Ia.x=Ia.x/wa-ya.x;Ia.y=Ia.y/wa-ya.y;Ia.width/=wa;Ia.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(X||1,Ga/Ia.width)):wa;X=(Ga-U*Ia.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ia.height)/this.lightboxVerticalDivider/U;qa&&(X=Math.max(X,0),Ma=Math.max(Ma,+0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(X-Ia.x),Math.floor(Ma-Ia.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",u)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=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 q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,X,fa){B++;+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var C=0;q=mxUtils.bind(this,function(U,X,fa){C++;var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",X);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var H=Graph.sanitizeLink(y.backBtn.url);null!=H&&q(mxUtils.bind(this,function(U){window.location.href=H;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),E=document.createElement("div");E.style.fontFamily=Editor.defaultHtmlFont;E.style.display="inline-block";E.style.verticalAlign="top";E.style.fontWeight="bold";E.style.marginTop="8px";E.style.fontSize="14px";E.style.cursor="default";E.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(E);var Q=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){E.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(E,U+1+" / "+this.pages.length);E.setAttribute("title",mxResources.get("currentPage")+@@ -2157,16 +2157,16 @@ F():I(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"moub.container.scrollLeft)<ja&&Math.abs(this.scrollTop-b.container.scrollTop)<ja&&Math.abs(this.startX-X.getGraphX())<ja&&Math.abs(this.startY-X.getGraphY())<ja&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ca=b.view.validate,ba=new mxPoint,oa=!1,Y=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&Y!=l.currentPage){Y=l.currentPage;oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var X=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(X.x!=this.translate.x||X.y!=this.translate.y)this.invalidate(),this.translate.x=X.x,this.translate.y=X.y}X=b.getPagePadding();var fa=b.getPageSize();U=X.x-(this.x0||0)*fa.width;X=X.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=X)this.invalidate(),this.translate.x=U,this.translate.y=X}ca.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var X=this.getPageLayout(),fa=this.getDefaultTranslate(X),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=X.x;this.view.y0=X.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;-U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=window.setTimeout(mxUtils.bind(this,+U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,O=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||O)k=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)),Z.style.transformOrigin="",ha.style.transformOrigin="",mxClient.IS_SF?(Z.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){Z.style.transform="";ha.style.transform=""},0)):(Z.style.transform="",ha.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var X=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=J&&(la+=X.x-J.x,qa+=X.y-J.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor--1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,X,fa,na){na=null!=na?na:this.zoomFactor;(X=X||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop++1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=O=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,X,fa,na){na=null!=na?na:this.zoomFactor;(X=X||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=Z.getAttribute("filter")&&(T=Z.getAttribute("filter"),Z.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=X||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-b.container.offsetLeft;var la=X||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;Z.style.transformOrigin=na+"px "+la+"px";Z.style.transform="scale("+U+")";ha.style.transformOrigin=na+"px "+la+"px";ha.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(X||null==v?b.container.clientWidth/2+b.container.scrollLeft-na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+"px")+" "+(X||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",U))}V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,X,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),-na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(X?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(X?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):+na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(X?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(X?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),O=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),na=-1),b.lazyZoom(X,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),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;if(null!=this.format){var f=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+f+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,@@ -2175,11 +2175,11 @@ EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();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,f){try{var l=mxUtils.parseXml(b);this.editor.setGraphXml(l.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=f&&(this.editor.setFilename(f),this.updateDocumentTitle())}catch(u){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+u.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,f){this.showDialog((new PrintDialog(this,b,f)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,f,l,u){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(b);y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});y.popup(f,l,null,u);this.setCurrentMenu(y)};-EditorUi.prototype.setCurrentMenu=function(b,f){this.currentMenuElt=f;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 f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(l){}};-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,f){this.replaceDiagramData(xUtils.getXml(f))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};-EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,l;for(l in urlParams)b=0==f?b+"?":b+"&",b+=l+"="+urlParams[l],f++;return b};-EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,l=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();l!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};+EditorUi.prototype.isHideCurrentMenuEvent=function(b){b=mxEvent.getSource(b);if(null!=this.currentMenu){if(b==this.currentMenu.div)return!1;for(var f=this.currentMenu.activeRow;null!=f;){if(b==f.div)return!1;f=f.activeRow}return!0}return!1};EditorUi.prototype.setCurrentMenu=function(b,f){this.currentMenuElt=f;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 f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(l){}};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,f){this.replaceDiagramData(xUtils.getXml(f))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};+EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,l;for(l in urlParams)b=0==f?b+"?":b+"&",b+=l+"="+urlParams[l],f++;return b};EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,l=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();l!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,f=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),l=b.view.translate,u=b.view.scale;f.x=f.x/u-l.x;f.y=f.y/u-l.y;f.width/=u;f.height/=u;null!=b.backgroundImage&&f.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==f.width||0==f.height?(b.zoomTo(1),this.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(f.x-=l.x,f.y-=l.y,f.width+=l.width+l.x,f.height+=l.height+l.y),b.fitWindow(f))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,f=b.container;if(!this.editor.extendCanvas)f.scrollTop=0,f.scrollLeft=0,mxUtils.hasScrollbars(f)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(f))if(b.pageVisible){var l=b.getPagePadding();f.scrollTop=Math.floor(l.y);f.scrollLeft=Math.floor(Math.min(l.x,(f.scrollWidth-f.clientWidth)/2));l=b.getGraphBounds();0<l.width&&0<l.height&&(l.x>f.scrollLeft+.9*f.clientWidth&&(f.scrollLeft=Math.min(l.x+@@ -2187,8 +2187,8 @@ l.width-f.clientWidth,l.x-10)),l.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=M(f.clientHeight-u)/4)))}else{l=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());u=b.view.translate;var y=b.view.scale;l.x=l.x/y-u.x;l.y=l.y/y-u.y;l.width/=y;l.height/=y;b.view.setTranslate(Math.floor(Math.max(0,(f.clientWidth-l.width)/2)-l.x+2),Math.floor((b.pageVisible?0:Math.max(0,(f.clientHeight-l.height)/4))-l.y+1))}};EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,l=mxUtils.hasScrollbars(f.container),u=0,y=0;l&&(u=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(l){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();l&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-u,f.container.scrollTop=f.view.translate.y*f.view.scale-y);f.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};-EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){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),E=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,B-S));q=Math.max(0,Math.min(q,H-E));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,E)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,+EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,C-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var C=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,+H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),E=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-S));q=Math.max(0,Math.min(q,H-E));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,E)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,"resize",u);b.window.destroy();null!=l&&l()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,l,u,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=l;this.previousFormat=this.format=u;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var l=this.previousImage;null!=l&&Graph.isPageLink(l.src)&&(l=this.ui.createImageForPageLink(l.src,this.ui.currentPage));this.ui.setBackgroundImage(l);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,f=b.pageFormat,this.previousFormat.width!=f.width||this.previousFormat.height!=f.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=f);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))};@@ -2217,17 +2217,17 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(l,100);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setOpacity(l,0);window.setTimeout(mxUtils.bind(this,function(){null!=l.parentNode&&l.parentNode.removeChild(l)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var f=document.createElement("div");f.className="geStatusDiv";f.setAttribute("title",b);f.innerText=b;return f};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.createDiv=function(b){var f=document.createElement("div");f.className=b;return f};-EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=B){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,H+(f?g.x-B.x:B.y-g.y)-l));mxEvent.consume(c);H!=Q()&&(S=!0,E=null)}}function q(c){y(c);B=H=null}var B=null,H=null,S=!0,E=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var Q=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){B=new mxPoint(mxEvent.getClientX(c),+EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,H+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);H!=Q()&&(S=!0,E=null)}}function q(c){y(c);C=H=null}var C=null,H=null,S=!0,E=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var Q=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));H=Q();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=E?E-l:0;E=Q();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};EditorUi.prototype.prompt=function(b,f,l){b=new FilenameDialog(this,f,mxResources.get("apply"),function(u){l(parseFloat(u))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};EditorUi.prototype.handleError=function(b,f,l,u,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,l,null,null,null,null,null,null,null,null,u?l:null)}else null!=l&&l()};-EditorUi.prototype.showError=function(b,f,l,u,y,q,B,H,S,E,Q,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,B,c,H,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,E||340,Q||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,B,H,S,E){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,B,H,S,E);this.dialogs.push(this.dialog)};+EditorUi.prototype.showError=function(b,f,l,u,y,q,C,H,S,E,Q,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,H,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,E||340,Q||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,H,S,E){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,H,S,E);this.dialogs.push(this.dialog)};EditorUi.prototype.hideDialog=function(b,f,l){var u=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){u=this.dialogs[y];break}null==u||null!=l&&l!=this.dialog.container.firstChild||(u.closing=!0,0==u.close(b,f)?delete u.closing:(delete u.closing,b=mxUtils.lastIndexOf(this.dialogs,u),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",u)),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 f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(B){this.handleError(B)}};-EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,B=q.cellEditor.saveSelection(),H=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(B);f(S)},function(){q.cellEditor.restoreSelection(B)},l,u,y);this.showDialog(b.container,230,H,!0,!1);b.init()};+EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(C){this.handleError(C)}};+EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),H=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(C);f(S)},function(){q.cellEditor.restoreSelection(C)},l,u,y);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,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var B=1024*q,H=Math.min(B+1024,l),S=Array(H-B),E=0;B<H;++E,++B)S[E]=b[B].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};+EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,H=Math.min(C+1024,l),S=Array(H-C),E=0;C<H;++E,++C)S[E]=b[C].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var l=b.indexOf("<mxGraphModel ");if(0<=l){var u=b.lastIndexOf("</mxGraphModel>");u>l&&(f=b.substring(l,u+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(y){}return f};EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,l=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(l=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==l||0==l.length)&&(l=b.getData("text/plain")),null!=l&&(l=Graph.zapGremlins(mxUtils.trim(l)),b=this.extractGraphModelFromHtml(l),null!=b&&(l=b))));null!=l&&this.isCompatibleString(l)&&(f=l);return f};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(f){this.save(f)}),null,mxUtils.bind(this,function(f){if(null!=f&&0<f.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};@@ -2235,16 +2235,16 @@ EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&t"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(f))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(f);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(l){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};EditorUi.prototype.executeLayouts=function(b,f){this.executeLayout(mxUtils.bind(this,function(){var l=new mxCompositeLayout(this.editor.graph,b),u=this.editor.graph.getSelectionCells();l.execute(this.editor.graph.getDefaultParent(),0==u.length?null:u)}),!0,f)};EditorUi.prototype.executeLayout=function(b,f,l){var u=this.editor.graph;u.getModel().beginUpdate();try{b()}catch(y){throw y;}finally{this.allowAnimation&&f&&u.isEnabled()?(b=new mxMorphing(u),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=l&&l()})),b.startAnimation()):(u.getModel().endUpdate(),null!=l&&l())}};-EditorUi.prototype.showImageDialog=function(b,f,l,u){u=this.editor.graph.cellEditor;var y=u.saveSelection(),q=mxUtils.prompt(b,f);u.restoreSelection(y);if(null!=q&&0<q.length){var B=new Image;B.onload=function(){l(q,B.width,B.height)};B.onerror=function(){l(null);mxUtils.alert(mxResources.get("fileNotFound"))};B.src=q}else l(null)};EditorUi.prototype.showLinkDialog=function(b,f,l){b=new LinkDialog(this,b,f,l);this.showDialog(b.container,420,90,!0,!0);b.init()};+EditorUi.prototype.showImageDialog=function(b,f,l,u){u=this.editor.graph.cellEditor;var y=u.saveSelection(),q=mxUtils.prompt(b,f);u.restoreSelection(y);if(null!=q&&0<q.length){var C=new Image;C.onload=function(){l(q,C.width,C.height)};C.onerror=function(){l(null);mxUtils.alert(mxResources.get("fileNotFound"))};C.src=q}else l(null)};EditorUi.prototype.showLinkDialog=function(b,f,l){b=new LinkDialog(this,b,f,l);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,null,new mxRectangle(0,0,440,220)),b.init())};EditorUi.prototype.showBackgroundImageDialog=function(b,f){b=null!=b?b:mxUtils.bind(this,function(u){u=new ChangePageSetup(this,null,u);u.ignoreColor=!0;this.editor.graph.model.execute(u)});var l=mxUtils.prompt(mxResources.get("backgroundImage"),null!=f?f.src:"");null!=l&&0<l.length?(f=new Image,f.onload=function(){b(new mxImage(l,f.width,f.height),!1)},f.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},f.src=l):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,f,l){mxUtils.confirm(b)?null!=f&&f():null!=l&&l()};EditorUi.prototype.createOutline=function(b){var f=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){f.update(!1)});return f};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",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};EditorUi.prototype.createKeyHandler=function(b){function f(c,g,m){if(!u.isSelectionEmpty()&&u.isEnabled()){g=null!=g?g:1;var n=u.getCompositeParents(u.getSelectionCells()),x=0<n.length?n[0]:null;if(null!=x)if(m){u.getModel().beginUpdate();try{for(x=0;x<n.length;x++)if(u.getModel().isVertex(n[x])&&u.isCellResizable(n[x])){var F=u.getCellGeometry(n[x]);null!=F&&(F=F.clone(),37==c?F.width=Math.max(0,F.width-g):38==c?F.height=Math.max(0,F.height-g):39==c?F.width+=g:40==c&&(F.height+=g),u.getModel().setGeometry(n[x],F))}}finally{u.getModel().endUpdate()}}else{F=u.model.getParent(x);var I=u.getView().scale;m=null;1==u.getSelectionCount()&&u.model.isVertex(x)&&null!=u.layoutManager&&!u.isCellLocked(x)&&(m=u.layoutManager.getLayout(F));if(null!=m&&m.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?u.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&u.model.add(F,x,Math.min(u.model.getChildCount(F),g+1));else{var M=u.graphHandler;null!=M&&(null==M.first&&M.start(x,0,0,u.getMovableCells(n)),null!=M.first&&(x=-n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*I,M.currentDy+=x*I,M.checkPreview(),M.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/I),K=M.roundLength(M.currentDy/I);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||+n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*I,M.currentDy+=x*I,M.checkPreview(),M.updatePreview()),null!=C&&window.clearTimeout(C),C=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/I),K=M.roundLength(M.currentDy/I);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&-(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?+(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=l.actions.get(l.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var m=document.getElementById("geOmniSearch");null!=m&&30<m.clientWidth&&m.focus()};if(null!=H[c.keyCode]&&!u.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(u.model.isVertex(u.getSelectionCell()))return function(){var m=u.connectVertex(u.getSelectionCell(),H[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(c,g,m,n){var x=this.actions.get(m);null!=x&&(m=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,m):y.bindControlKey(c,m):n?y.bindShiftKey(c,m):y.bindKey(c,m))});var E=this,Q=y.escape;y.escape=function(c){Q.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){u.exitGroup()});y.bindControlShiftKey(35,function(){u.enterGroup()});y.bindShiftKey(36,function(){u.home()});y.bindKey(35,function(){u.refresh()});@@ -2253,57 +2253,57 @@ y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zy.bindAction(65,!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){u.isEnabled()&&u.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,l){var u=document.createElement("a");this.addMenuHandler(u,f,l);mxUtils.write(u,b);u.className="geItem";return u};-EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,B=mxUtils.bind(this,function(H){null!=l&&l(H);if(!mxEvent.isConsumed(H)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();-var E=mxUtils.getOffset(b);S.popup(E.x,E.y+b.offsetHeight,null,H);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(H)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(H){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&B(H)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(H){!this.menus.autoPopup&&-null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(H)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(H).nodeName?H.preventDefault():H.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(H){B(H);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(H){B(H);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(H){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,-function(H){this.hideCurrentMenu();13!=H.keyCode&&27!=H.keyCode&&(B(H),q=!0)})))}};+EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(H){null!=l&&l(H);if(!mxEvent.isConsumed(H)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();+var E=mxUtils.getOffset(b);S.popup(E.x,E.y+b.offsetHeight,null,H);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(H)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(H){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(H)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(H){!this.menus.autoPopup&&+null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(H)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(H).nodeName?H.preventDefault():H.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(H){C(H);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(H){C(H);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(H){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,+function(H){this.hideCurrentMenu();13!=H.keyCode&&27!=H.keyCode&&(C(H),q=!0)})))}};EditorUi.prototype.addShapePicker=function(b,f){var l=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(u){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(u)}))};EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var l=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,-function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),-mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var q=mxUtils.bind(this,function(B,H,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(B){if(27==B.keyCode||13==B.keyCode||9==B.keyCode)27==B.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),-this.hideCurrentMenu(),mxEvent.consume(B)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(B,H){q(B,H,H.getProperty("factor"))}))})(f);return f};+function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),+mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,H,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),+this.hideCurrentMenu(),mxEvent.consume(C)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(C,H){q(C,H,H.getProperty("factor"))}))})(f);return f};EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(l){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(l)}));return f};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 f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,B){return l(Graph.sanitizeHtml(u),y,q,B)}})();+null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,C){return l(Graph.sanitizeHtml(u),y,q,C)}})();Date.prototype.toISOString||function(){function b(f){f=String(f);1===f.length&&(f="0"+f);return f}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,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=-arguments[2])}var H=Number(y.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),l);for(var S=f(this)?Object(new this(H)):Array(H),E=0,Q;E<H;)Q=y[E],S[E]=q?"undefined"===typeof B?q(Q,E):q.call(B,Q,E):Q,E+=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(" ");+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,C;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(C=+arguments[2])}var H=Number(y.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),l);for(var S=f(this)?Object(new this(H)):Array(H),E=0,Q;E<H;)Q=y[E],S[E]=q?"undefined"===typeof C?q(Q,E):q.call(C,Q,E):Q,E+=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(f){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";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,f,l){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),this.clippedImage=b;b=this.clippedSvg}return b};(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,l,u,y,q){return"default"==y&&null!=q?"fillcolor"==u.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,l,u){null==u&&(u=f);return b.apply(this,[f,l,u])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,B,H,S){var E=b.apply(this,arguments);if(null!=l){var Q=E.getElementsByTagName("img");0<Q.length&&(Q[0].className="geButton")}return E}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,H,S){var E=b.apply(this,arguments);if(null!=l){var Q=E.getElementsByTagName("img");0<Q.length&&(Q[0].className="geButton")}return E}})();Graph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);-return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,E=null,Q=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(J.cell);-if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),V=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=V+2;T.grow(V);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+-N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){V*=v;var X=2*V;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,X))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,X,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,X))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,X,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,-k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(V=N.getHandleForEvent(k),null!=V&&(N.start(k.getGraphX(),k.getGraphY(),V),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(N=this.getActualStartSize(J.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(N.x-N.width-1)*v+(0==N.x?J.width:0),J.y,1,J.height))||(0<N.y||-0<N.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(N.y-N.height-1)*v+(0==N.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(J.cell),null!=N&&null!=N.customHandles&&(V=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),V),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&-this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(B=new mxPoint(k.getGraphX(),k.getGraphY()),Q=this.isCellSelected(J.cell),S=J,H=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?E=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(E=v.getHandleForEvent(k))))}}));-this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=B&&null!=S&&null!=H){if(J=S,null!=E||Math.abs(B.x-v.getGraphX())>N||Math.abs(B.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=-T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),X=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=N&&(V=E,null==V&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?V=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?V=T.bends.length-1:null!=N&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&-(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,B.x,B.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!X&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?-this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());Q=!1;B=H=S=E=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==-k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=J.absolutePoints,null!=N)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&-U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(J.x,-J.y-2,J.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(J.x,J.y+J.height-2,J.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(J.x-2,J.y,4,J.height))&&this.model.getChildAt(v,0)!=J.cell||mxUtils.intersects(k,new mxRectangle(J.x+J.width-2,J.y,4,J.height)))T="col-resize";for(v=J;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),-V=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*V+(0==N.x?v.width*V:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*V+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){E=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=+return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,H=null,S=null,E=null,Q=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var O=this.selectionCellsHandler.getHandler(J.cell);+if(null==O||null==O.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),V=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;O=V+2;T.grow(V);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-O,k.getGraphY()-O)&&mxUtils.contains(J,k.getGraphX()-O,k.getGraphY()+O)&&mxUtils.contains(J,k.getGraphX()+O,k.getGraphY()+O)&&mxUtils.contains(J,k.getGraphX()++O,k.getGraphY()-O))){var U=this.model.getParent(J.cell);O=this.model.getParent(U);if(!this.isCellSelected(O)){V*=v;var X=2*V;if(this.model.getChildAt(O,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,X))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,X,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,X))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,X,J.height)))U=this.selectionCellsHandler.isHandled(O),this.selectCellForEvent(O,+k.getEvent()),O=this.selectionCellsHandler.getHandler(O),null!=O&&(V=O.getHandleForEvent(k),null!=V&&(O.start(k.getGraphX(),k.getGraphY(),V),O.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(O=this.getActualStartSize(J.cell),(0<O.x||0<O.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(O.x-O.width-1)*v+(0==O.x?J.width:0),J.y,1,J.height))||(0<O.y||+0<O.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(O.y-O.height-1)*v+(0==O.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),O=this.selectionCellsHandler.getHandler(J.cell),null!=O&&null!=O.customHandles&&(V=mxEvent.CUSTOM_HANDLE-O.customHandles.length+1,O.start(k.getGraphX(),k.getGraphY(),V),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&+this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),Q=this.isCellSelected(J.cell),S=J,H=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?E=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(E=v.getHandleForEvent(k))))}}));+this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var O=this.tolerance;if(null!=C&&null!=S&&null!=H){if(J=S,null!=E||Math.abs(C.x-v.getGraphX())>O||Math.abs(C.y-v.getGraphY())>O){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=+T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),X=U==mxEdgeStyle.EntityRelation;O=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=O&&(V=E,null==V&&(k=new mxRectangle(C.x,C.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,O[0].x,O[0].y)?V=0:mxUtils.contains(k,O[O.length-1].x,O[O.length-1].y)?V=T.bends.length-1:null!=O&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&+(null!=U&&(2==O.length||3==O.length&&(0==Math.round(O[0].x-O[1].x)&&0==Math.round(O[1].x-O[2].x)||0==Math.round(O[0].y-O[1].y)&&0==Math.round(O[1].y-O[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,C.x,C.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!X&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?+this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());Q=!1;C=H=S=E=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==+k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),O=J.absolutePoints,null!=O)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,O[0].x,O[0].y)||mxUtils.contains(k,O[O.length-1].x,O[O.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&+U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<O.length-1&&0<=v&&(T=0==Math.round(O[v].x-O[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){O=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(O);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),O=this.model.getParent(v),!this.isCellSelected(O)))if(mxUtils.intersects(k,new mxRectangle(J.x,+J.y-2,J.width,4))&&this.model.getChildAt(O,0)!=v||mxUtils.intersects(k,new mxRectangle(J.x,J.y+J.height-2,J.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(J.x-2,J.y,4,J.height))&&this.model.getChildAt(v,0)!=J.cell||mxUtils.intersects(k,new mxRectangle(J.x+J.width-2,J.y,4,J.height)))T="col-resize";for(v=J;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(O=this.getActualStartSize(v.cell),+V=this.view.scale,(0<O.x||0<O.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(O.x-O.width-1)*V+(0==O.x?v.width*V:0),v.y,1,v.height))?T="col-resize":(0<O.y||0<O.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(O.y-O.height-1)*V+(0==O.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){E=C=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};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(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)v.push(new mxRectangle(((U.x+X)*T+N.x)*V,(U.y*J+N.y)*V,T*V,J*V));for(X=1;X<U.height;X++)v.push(new mxRectangle((U.x*T+N.x)*V,((U.y+X)*J+N.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,N=[],T=0;T<v.length;T++){var V=-this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==V||J.get(V)||(J.put(V,!0),N.push(V))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&-this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,N,T,V){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};+this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,O=this.graph.pageScale,T=J.width*O;J=J.height*O;O=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)v.push(new mxRectangle(((U.x+X)*T+O.x)*V,(U.y*J+O.y)*V,T*V,J*V));for(X=1;X<U.height;X++)v.push(new mxRectangle((U.x*T+O.x)*V,((U.y+X)*J+O.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,O=[],T=0;T<v.length;T++){var V=+this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==V||J.get(V)||(J.put(V,!0),O.push(V))}return O};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,O){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&+this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,O,T,V){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=O&&this.graph.applyNewEdgeStyle(O,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),M=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;L.apply(this,arguments);k!=this.currentState?(I=(new Date).getTime(),M=0):M=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<M||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(k){return aa.apply(this,arguments)||mxEvent.isShiftDown(k)};var ja=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ja=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=-ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):+ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var O=this.getClickableLinkForCell(J);null!=O?this.isCustomLink(O)?this.customLinkClicked(O,J):this.openLink(O):v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(k,v){var J=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,J,null,!0);if(this.isToggleEvent(v))for(J=0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var Y=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:Y.apply(this,arguments)};var da=this.updateMouseEvent;this.updateMouseEvent=function(k){k=da.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),-k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ha=this.isCellSelectable;this.isCellSelectable=function(k){return ha.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var Z=null;+k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,O){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ha=this.isCellSelectable;this.isCellSelectable=function(k){return ha.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var Z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),Z=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var J=v.getProperty("cell");null==J?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,k.y)):null!=Z?this.addSelectionCells(Z):1<this.getSelectionCount()&&this.isCellSelected(J)&&this.removeSelectionCell(J);Z=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var J=k.view.graph;return v&&(J.isCellSelected(k.cell)||J.isTableRow(k.cell)&&J.selectionCellsHandler.isHandled(J.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var k=this.connectionHandler.constraintHandler;null!=k.currentFocus&&k.isStateIgnored(k.currentFocus,!0)&&(k.currentFocus=null,k.constraints=null,k.destroyIcons());k.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;@@ -2317,14 +2317,14 @@ Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveGraph.createOffscreenGraph=function(b){var f=new Graph(document.createElement("div"));f.stylesheet.styles=mxUtils.clone(b.styles);f.resetViewOnRootChange=!1;f.setConnectable(!1);f.gridEnabled=!1;f.autoScroll=!1;f.setTooltips(!1);f.setEnabled(!1);f.container.style.visibility="hidden";f.container.style.position="absolute";f.container.style.overflow="hidden";f.container.style.height="1px";f.container.style.width="1px";return f};Graph.createSvgImage=function(b,f,l,u,y){l=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+f+'px" '+(null!=u&&null!=y?'viewBox="0 0 '+u+" "+y+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+l+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0)),b,f)};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,f,l,u,y){var q=mxUtils.createXmlDocument(),B=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&B.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.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",-l+"px");B.setAttribute("height",u+"px");B.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(B);return B};-Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=f*q;B.height=l*q;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var E=B.getContext("2d");E.scale(q,q);E.drawImage(H,0,0);u(B.toDataURL())}catch(Q){u(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=+Graph.createSvgNode=function(b,f,l,u,y){var q=mxUtils.createXmlDocument(),C=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&C.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);C.setAttribute("version","1.1");C.setAttribute("width",+l+"px");C.setAttribute("height",u+"px");C.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(C);return C};+Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var E=C.getContext("2d");E.scale(q,q);E.drawImage(H,0,0);u(C.toDataURL())}catch(Q){u(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(E){u(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==B&&null!=f&&(B={}),null!=B&&(B[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){B=null;for(var E=0;E<q[S].style.length;E++){var Q=q[S].style.item(E),c=q[S].style.getPropertyValue(Q);H=y(q[S],Q,c)||H}"FONT"==q[S].nodeName&&-""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),H=y(q[S],"color",c)||H);null!=f&&null!=B&&q[S].setAttribute(f,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),B;for(B in q){var H=q[B];""==H?(b[u].style[B]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[B]=H;l=!0}}}catch(S){}return l};+Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,H=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){C=null;for(var E=0;E<q[S].style.length;E++){var Q=q[S].style.item(E),c=q[S].style.getPropertyValue(Q);H=y(q[S],Q,c)||H}"FONT"==q[S].nodeName&&+""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),H=y(q[S],"color",c)||H);null!=f&&null!=C&&q[S].setAttribute(f,JSON.stringify(C))}return H};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var H=q[C];""==H?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=H;l=!0}}}catch(S){}return l};Graph.getGivenColor=function(b,f){var l=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var u=b.getAttribute(Graph.backupStyleAttribute);if(null!=u){var y=JSON.parse(u);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?l=b.getAttribute("color"):""!=y[f]&&(l=y[f]))}}catch(q){}null==l&&""!=b.style[f]&&(l=b.style[f])}return l};-Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),B=[],H=0;H<q.length;H++)B.push({node:q[H],value:q[H].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);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[y]&&""==b[H].style[y])try{if(q=b[H].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=+Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],H=0;H<q.length;H++)C.push({node:q[H],value:q[H].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<C.length&&C[H].node==b[H]&&C[H].value!=b[H].style[y]&&""==b[H].style[y])try{if(q=b[H].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]="";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(E){}if(l&&b[H].getAttribute("color")==u||b[H].style[y]==u){l&&b[H].getAttribute("color")==u&&b[H].removeAttribute("color");b[H].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[H].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(E){}if(l&&mxClient.IS_FF){f=b[H];l=f.firstChild;if(null!=l&&"A"==l.nodeName&&null==l.nextSibling&&null!=l.firstChild){f.parentNode.insertBefore(l,f);for(u=l.firstChild;null!=u;)y=u.nextSibling,f.appendChild(u),u=y;l.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=b.charCodeAt(l);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=String.fromCharCode(b[l]);return f.join("")};Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,l){return String.fromCharCode(parseInt(l,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};@@ -2332,7 +2332,7 @@ Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var l=b.bGraph.arrayBufferIndexOfString=function(b,f,l){var u=f.charCodeAt(0),y=1,q=-1;for(l=l||0;l<b.byteLength;l++)if(b[l]==u){q=l;break}for(l=q+1;-1<q&&l<b.byteLength&&l<q+f.length-1;l++){if(b[l]!=f.charCodeAt(y))return Graph.arrayBufferIndexOfString(b,f,q+1);y++}return y==f.length-1?q:-1};Graph.compress=function(b,f){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=f?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,f,l){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));f=decodeURIComponent(f?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return l?f:Graph.zapGremlins(f)};Graph.fadeNodes=function(b,f,l,u,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,f);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+y+"ms ease-in-out");Graph.setOpacityForNodes(b,l);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=u&&u()},y)},0)};-Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function B(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=+Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function C(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=l&&null!=l.pageSize?l.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=u.model.getCell(x.sourceCellId),I=u.getEdges(F,null,!0,!0,!1,!0),M=[],L=0;L<I.length;L++)null!=I[L].getTerminal(!0)&&null!=I[L].getTerminal(!1)&&u.isCellVisible(I[L])&&!u.isEdgeIgnored(I[L])&&u.isCellVisible(I[L].getTerminal(!0))&&u.isCellVisible(I[L].getTerminal(!1))&&u.isCellVisible(u.getLayerForCell(I[L]))&&M.push(I[L]);M=I=M;if(null!=g.startIndex||0<pageSize&&I.length>pageSize){var K=g.startIndex||0;M=I.slice(Math.max(0,K),Math.min(I.length,K+pageSize))}M=u.getOpposites(M,F).concat(M);var aa=c.cloneCells(M);for(L=0;L<M.length;L++)if(aa[L].sourceCellId=M[L].id,c.model.isEdge(aa[L]))for(aa[L].geometry.x=0,aa[L].geometry.y=0,aa[L].geometry.points=null,aa[L].setStyle(aa[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),aa[L].setTerminal(x,null==aa[L].getTerminal(!0)),F=0;F<aa[L].getChildCount();F++){var ja=aa[L].getChildAt(F);null!=ja.geometry&&ja.geometry.relative&&(ja.setStyle(ja.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ja.geometry.offset=new mxPoint(0,0),ja.geometry.y=0,ja.geometry.x=.5>ja.geometry.x?-.8:.5<ja.geometry.x?.8:0)}if(0<g.startIndex){var ca=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(I.length/pageSize)+")",@@ -2341,49 +2341,49 @@ c.getModel().getCell(oa);Y!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,Y)&&2,da.y=n-da.height/2));var ha=g.length,Z=2*Math.PI/ha,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ha;m++)da=c.getModel().getGeometry(g[m]),null!=da&&(da=da.clone(),da.x+=k*Math.sin(m*Z),da.y+=k*Math.cos(m*Z),c.getModel().setGeometry(g[m],da))}finally{c.getModel().endUpdate()}}}var H=document.createElement("div");H.style.position="absolute";H.style.display="block";H.style.overflow="auto";H.style.width="100%";H.style.height="100%";H.style.left="0px";H.style.top="0px";H.style.zIndex=2;H.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";H.appendChild(S);var E=document.createElement("div");E.style.position="absolute";E.style.cursor="pointer";E.style.right="38px";E.style.top="14px";E.style.textAlign="right";E.style.verticalAlign="top";mxUtils.write(E,mxResources.get("close"));H.appendChild(E);document.body.appendChild(H);var Q=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",Q);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,-"keydown",Q);c.parentNode.removeChild(c);u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(E,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?B(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-+"keydown",Q);c.parentNode.removeChild(c);u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(E,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var I=!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){I||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,I=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var aa=K.layout;K.layout=function(ja){K.spacing=Math.min(60,Math.max(30,60-5*ja.length));aa.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();-g.refresh();q(g);I=!1}))});B(g,F)})(H)})(b,f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};+g.refresh();q(g);I=!1}))});C(g,F)})(H)})(b,f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=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 u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(u=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,u.outerHTML))}b=l}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var f=document.createElement("a");f.setAttribute("href",b);Graph.sanitizeNode(f);return f.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,f){window.DOM_PURIFY_CONFIG.IN_PLACE=f;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),B=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length--1)?parseFloat(q):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=y[0].getAttribute("viewBox");if(null!=H&&!isNaN(q)&&!isNaN(B)){var S=H.split(" ");4<=H.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var E=y[0].getBBox();if(0<E.width&&0<E.height){q=0;var Q=y[0].querySelectorAll("[stroke-width]");for(B=0;B<Q.length;B++)q=Math.max(q,parseFloat(Q[B].getAttribute("stroke-width")));E=new mxRectangle(E.x,+Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),C=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-+1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var H=y[0].getAttribute("viewBox");if(null!=H&&!isNaN(q)&&!isNaN(C)){var S=H.split(" ");4<=H.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/C,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var E=y[0].getBBox();if(0<E.width&&0<E.height){q=0;var Q=y[0].querySelectorAll("[stroke-width]");for(C=0;C<Q.length;C++)q=Math.max(q,parseFloat(Q[C].getAttribute("stroke-width")));E=new mxRectangle(E.x,E.y,E.width,E.height);E.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",E.x+" "+E.y+" "+E.width+" "+E.height);f.getElementsByTagName("svg")[0].setAttribute("width",E.width/l);f.getElementsByTagName("svg")[0].setAttribute("height",E.height/u)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};Graph.createRemoveIcon=function(b,f){var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.clearImage);l.setAttribute("title",b);l.setAttribute("width","13");l.setAttribute("height","10");l.style.marginLeft="4px";l.style.marginBottom="-1px";l.style.cursor="pointer";mxEvent.addListener(l,"click",f);return l};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};-Graph.rewritePageLinks=function(b,f){function l(y,q){var B=y.getAttribute(q);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=q;f&&"xlink:href"==q&&(y.removeAttribute(q),H="href");y.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"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,f){function l(y,q){var C=y.getAttribute(q);if(null!=C){Graph.isPageLink(C)&&(C="#"+C.substring(C.indexOf(":")+1));var H=q;f&&"xlink:href"==q&&(y.removeAttribute(q),H="href");y.setAttribute(H,C)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"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, #000000)";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(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,B=null,H=mxUtils.bind(this,function(Q){q=!0;B=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q))}),S=mxUtils.bind(this,function(Q){q=q&&null!=B&&Math.abs(B.x-mxEvent.getClientX(Q))<y&&Math.abs(B.y-mxEvent.getClientY(Q))<y}),E=mxUtils.bind(this,function(Q){if(q)for(var c=mxEvent.getSource(Q);null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,H=mxUtils.bind(this,function(Q){q=!0;C=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q))}),S=mxUtils.bind(this,function(Q){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(Q))<y&&Math.abs(C.y-mxEvent.getClientY(Q))<y}),E=mxUtils.bind(this,function(Q){if(q)for(var c=mxEvent.getSource(Q);null!=c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,Q);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,H,S,E);mxEvent.addListener(u.node,"click",function(Q){mxEvent.consume(Q)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=u&&this.graph.isCustomLink(u)&&(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&this.graph.customLinkClicked(u)&&mxEvent.consume(l))}))}}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(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==H||"pipe"==H||"wire"==H||"filledEdge"==H||"flexArrow"==H||"mxgraph.arrows2.wedgeArrow"==-H)};Graph.prototype.isGradientState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(B)&&"wire"!=H&&"pipe"!=H};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=H?"color":"background-color",E=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,S);null==E&&null!=B&&B!=this.cellEditor.textarea.parentNode;)E=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,S),B=B.parentNode;-if("rgba(0, 0, 0, 0)"==E||"transparent"==E)E=mxConstants.NONE;return E};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(E){return B&&S.isVertex(E)||H&&S.isEdge(E)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var E=JSON.parse(B),Q;for(Q in E)this.setCellStyles(Q,E[Q],H),"edgeStyle"==-Q&&"elbowEdgeStyle"==E[Q]&&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 E=this.view.getState(B[S]);null!=E&&this.mergeStyle(E.style,H,0==S)}return H};Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var E={},Q;for(Q in B){var c=B[Q];null!=c&&(E[Q]=!0,null==H[Q]&&S?H[Q]=c:H[Q]!=c&&delete H[Q])}for(Q in H)E[Q]||-delete H[Q]}};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,E){null!=B&&(E||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(Q){return 0>mxUtils.indexOf(S,Q)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,S,E,Q,c,g){var m=!1,n=!1;if(0<B.length)for(var x=0;x<B.length&&(m=this.getModel().isVertex(B[x])||m,!(n=this.getModel().isEdge(B[x])||-n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<H.length;x++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[x]),"strokeColor"!=H[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,H[x])||"shape"==H[x])if("shape"!=H[x]&&(m||B)&&(null==S[x]?delete E[H[x]]:E[H[x]]=S[x]),n||B)null==S[x]?delete Q[H[x]]:Q[H[x]]=S[x]};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,E,Q){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;Q=null!=Q?Q:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<B.length;c++){var g=B[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!E)for(var F=null!=m?m.split(";"):[],I=0;I<F.length;I++){var M=F[I],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),aa=mxUtils.indexOf(x,K);0<=aa&&x.splice(aa,+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(C){var H=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(C.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(C.style,"lineShape",null)&&(this.model.isVertex(C.cell)||"arrow"==H||"pipe"==H||"wire"==H||"filledEdge"==H||"flexArrow"==H||"mxgraph.arrows2.wedgeArrow"==+H)};Graph.prototype.isGradientState=function(C){var H=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=H&&"pipe"!=H};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,H){for(var S=H?"color":"background-color",E=C==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(C,S);null==E&&null!=C&&C!=this.cellEditor.textarea.parentNode;)E=C==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(C,S),C=C.parentNode;+if("rgba(0, 0, 0, 0)"==E||"transparent"==E)E=mxConstants.NONE;return E};Graph.prototype.isSpecialColor=function(C){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],C)};Graph.prototype.isGlassState=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return"label"==C||"rectangle"==C||"internalStorage"==C||"ext"==C||"umlLifeline"==C||"swimlane"==C||"process"==C};Graph.prototype.isRoundedState=function(C){return null!=+C.shape?C.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(C){var H=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(C.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==H)};Graph.prototype.isAutoSizeState=function(C){return"1"==mxUtils.getValue(C.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(C){return null!=+mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,H){C=null!=C?C:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(E){return C&&S.isVertex(E)||H&&S.isEdge(E)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,H,S){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var E=JSON.parse(C),Q;for(Q in E)this.setCellStyles(Q,E[Q],H),"edgeStyle"==+Q&&"elbowEdgeStyle"==E[Q]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var H={},S=0;S<C.length;S++){var E=this.view.getState(C[S]);null!=E&&this.mergeStyle(E.style,H,0==S)}return H};Graph.prototype.mergeStyle=function(C,H,S){if(null!=C){var E={},Q;for(Q in C){var c=C[Q];null!=c&&(E[Q]=!0,null==H[Q]&&S?H[Q]=c:H[Q]!=c&&delete H[Q])}for(Q in H)E[Q]||+delete H[Q]}};Graph.prototype.getStartEditingCell=function(C,H){H=this.getCellStyle(C);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==H)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),H=this.getCellStyle(C),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==H)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(H=0;H<this.model.getChildCount(C);H++){var S=+this.model.getChildAt(C,H);if(this.isCellEditable(S)){C=S;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,H,S,E){null!=C&&(E||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(C,function(Q){return 0>mxUtils.indexOf(S,Q)})),this.updateCellStyles(C,H))};Graph.prototype.copyCellStyles=function(C,H,S,E,Q,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||+n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<H.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,H[x]),"strokeColor"!=H[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,H[x])||"shape"==H[x])if("shape"!=H[x]&&(m||C)&&(null==S[x]?delete E[H[x]]:E[H[x]]=S[x]),n||C)null==S[x]?delete Q[H[x]]:Q[H[x]]=S[x]};Graph.prototype.includeDescendants=function(C){for(var H=[],S=0;S<C.length;S++)H=H.concat(this.model.getDescendants(C[S]));return H};Graph.prototype.pasteCellStyles=function(C,+H,S,E,Q){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;Q=null!=Q?Q:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!E)for(var F=null!=m?m.split(";"):[],I=0;I<F.length;I++){var M=F[I],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),aa=mxUtils.indexOf(x,K);0<=aa&&x.splice(aa,1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ja=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ja,K))for(var ca=0;ca<ja.length;ca++){var ba=mxUtils.indexOf(x,ja[ca]);0<=ba&&x.splice(ba,1)}}}}var oa=this.model.isEdge(g);n=oa?S:H;for(I=0;I<x.length;I++){K=x[I];var Y=n[K];null!=Y&&("edgeStyle"!=K||Q)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,Y),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==Y&&null==n.curved&&-(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}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 E=this.getCellStyle(H[S],!1),Q=E[mxConstants.STYLE_PERIMETER],c=!1;for(m in B){var g=B[m];if(E[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==+(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,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 E=this.getCellStyle(H[S],!1),Q=E[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(E[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==E[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[H[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,Q,[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,E,Q,c){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,E,Q,c){E=null!=E?E:!0;Q=null!=Q?Q:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(B,H,m,E,Q,-c);if(null!=n)return n;if(this.isCellVisible(m)&&(Q&&this.model.isEdge(m)||E&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,B,H))&&this.intersects(n,B,H)))return m}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=[],E=0;E<B.length;E++){var Q=this.getCompositeParent(B[E]);this.isTableCell(Q)&&(Q=this.graph.model.getParent(Q));this.isTableRow(Q)&&(Q=this.graph.model.getParent(Q));-null==Q||H.get(Q)||(H.put(Q,!0),S.push(Q))}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=[],E=0;E<H.length;E++)B(H[E])||S.push(H[E]);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 f=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);f.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 l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(B){B=l.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 u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=u.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 y=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);y.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var E=this.useCssTransforms,Q=this.view.scale,c=this.view.translate;E&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);E&&(this.view.scale=+Graph.prototype.getCellAt=function(C,H,S,E,Q,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,H,S,E,Q,c){E=null!=E?E:!0;Q=null!=Q?Q:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(C,H,m,E,Q,+c);if(null!=n)return n;if(this.isCellVisible(m)&&(Q&&this.model.isEdge(m)||E&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,C,H))&&this.intersects(n,C,H)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(C){return!this.isSwimlane(C.cell)&&0<this.model.getChildCount(C.cell)&&!this.isCellCollapsed(C.cell)&&"1"==mxUtils.getValue(C.style,"recursiveResize","1")&&null==mxUtils.getValue(C.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(C){for(var H=+this.getCellGeometry(C);null!=H&&H.relative;)C=this.getModel().getParent(C),H=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var H=new mxDictionary,S=[],E=0;E<C.length;E++){var Q=this.getCompositeParent(C[E]);this.isTableCell(Q)&&(Q=this.graph.model.getParent(Q));this.isTableRow(Q)&&(Q=this.graph.model.getParent(Q));+null==Q||H.get(Q)||(H.put(Q,!0),S.push(Q))}return S};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var H=this.getCellGeometry(C);null!=H&&H.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var H=this.model.getParent(C);if(!this.model.isVertex(H))break;C=H}return C};Graph.prototype.filterSelectionCells=function(C){var H=+this.getSelectionCells();if(null!=C){for(var S=[],E=0;E<H.length;E++)C(H[E])||S.push(H[E]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;C=new mxRectangle((C.x+2*S.x)*H-S.x,(C.y+2*S.y)*H-S.y,C.width*H,C.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);+return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,S=this.graph.currentScale;C=new mxRectangle((C.x+H.x)*S,(C.y+H.y)*S,C.width*S,C.height*S)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){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);f.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 l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var H=[],S=+0;S<C.length;S++)this.isTableRow(C[S])||this.isTableCell(C[S])||H.push(C[S]);return H};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var H=[],S=0;S<C.length;S++)this.isTable(C[S])||this.isTableRow(C[S])||this.isTableCell(C[S])||H.push(C[S]);return H};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var H=C.getAttribute("transform");C.setAttribute("transformOrigin",+"0 0");var S=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=+function(){var C=this.graph.useCssTransforms,H=this.scale,S=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=H,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,H,S){var E=this.useCssTransforms,Q=this.view.scale,c=this.view.translate;E&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);E&&(this.view.scale=Q,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,f,l){var u=f.getAttribute("href");u!=Graph.sanitizeLink(u)&&Graph.sanitizeNode(f);if(null!=u&&!this.isCustomLink(u)&&(mxEvent.isLeftMouseButton(l)&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(u)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(u),b);mxEvent.consume(l)}};Graph.prototype.openLink=function(b,f,l){var u=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)u=window.open(b,null!=f?f:"_blank",l?null:"noopener,noreferrer"),null==u||l||(u.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return u};@@ -2396,13 +2396,13 @@ b.childLayout)return f=new mxCompactTreeLayout(this.graph),f.horizontal="1"==mxUf.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),f;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(u){null!=window.console&&console.error(u)}}return null}};Graph.prototype.createLayouts=function(b){for(var f=[],l=0;l<b.length;l++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[l].layout)){var u="mxOrgChartLayout"==b[l].layout&&null!=b[l].config?new window[b[l].layout](this,b[l].config.branchOptimizer):new window[b[l].layout](this);if(null!=b[l].config)for(var y in b[l].config)if("mxOrgChartLayout"!=b[l].layout||"branchOptimizer"!=y)u[y]=b[l].config[y];f.push(u)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[l].layout]));return f};-Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var B=0;B<q.length;B++)y[q[B].nodeName]=q[B].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};+Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var C=0;C<q.length;C++)y[q[C].nodeName]=q[C].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};Graph.prototype.getNodesForCells=function(b){for(var f=[],l=0;l<b.length;l++){var u=this.view.getState(b[l]);if(null!=u){for(var y=this.cellRenderer.getShapesForState(u),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=u.control&&null!=u.control.node&&f.push(u.control.node)}}return f};Graph.prototype.createWipeAnimations=function(b,f){for(var l=[],u=0;u<b.length;u++){var y=this.view.getState(b[u]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?l.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&l.push(this.createVertexWipeAnimation(y,f)))}return l};-Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[l[0]];H=B/H;f||(H=1-H);for(var E=y*H,Q=1;Q<q;Q++)if(E<=u[Q-1]){S.push(new mxPoint(l[Q-1].x+(l[Q].x-l[Q-1].x)*E/u[Q-1],l[Q-1].y+(l[Q].y-l[Q-1].y)*E/u[Q-1]));break}else E-=u[Q-1],S.push(l[Q]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,H){if(null!=b.shape){var S=[l[0]];H=C/H;f||(H=1-H);for(var E=y*H,Q=1;Q<q;Q++)if(E<=u[Q-1]){S.push(new mxPoint(l[Q-1].x+(l[Q].x-l[Q-1].x)*E/u[Q-1],l[Q-1].y+(l[Q].y-l[Q-1].y)*E/u[Q-1]));break}else E-=u[Q-1],S.push(l[Q]);b.shape.points=S;b.shape.redraw();0==C&&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=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.createVertexWipeAnimation=function(b,f){var l=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(u,y){null!=b.shape&&(y=u/y,f||(y=1-y),b.shape.bounds=new mxRectangle(l.x,l.y,l.width*y,l.height),b.shape.redraw(),0==u&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,B=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var H=0;H<b.length;H++)b[H].stop();null!=f&&f()}else for(H=0;H<b.length;H++)b[H].execute(q,l);q++});y=window.setInterval(B,u);B()};+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,C=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var H=0;H<b.length;H++)b[H].stop();null!=f&&f()}else for(H=0;H<b.length;H++)b[H].execute(q,l);q++});y=window.setInterval(C,u);C()};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,f,l){b=null!=b?b:this.getGraphBounds();f=null!=f?f:this.view.translate;l=null!=l?l:this.view.scale;var u=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var y=Math.floor(Math.ceil(b.x/l-f.x)/u.width),q=Math.floor(Math.ceil(b.y/l-f.y)/u.height);return new mxRectangle(y,q,Math.ceil((Math.floor((b.x+b.width)/l)-f.x)/u.width)-y,Math.ceil((Math.floor((b.y+b.height)/l)-f.y)/u.height)-q)};Graph.prototype.getDefaultTranslate=function(b){var f=this.getPagePadding(),l=this.getPageSize();return new mxPoint(f.x-b.x*l.width,f.y-b.y*l.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),f=this.getPagePadding(),l=this.getPageSize(),u=Math.ceil(2*f.x+b.width*l.width);b=Math.ceil(2*f.y+b.height*l.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=u||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,u,b)};@@ -2413,32 +2413,32 @@ Graph.prototype.isSplitTarget=function(b,f,l){return!this.model.isEdge(f[0])&&!mGraph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(f,"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 f=this.getLinkForCell(b);if(null!=f)return f;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var f=null;"date"==b?f=(new Date).toLocaleDateString():"time"==b?f=(new Date).toLocaleTimeString():"timestamp"==b?f=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),f=this.formatDate(new Date,b));return f};Graph.prototype.formatDate=function(b,f,l){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 u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,B=function(I,M){I=String(I);for(M=M||2;I.length<M;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var H=l?"getUTC":"get",S=b[H+"Date"](),E=b[H+"Day"](),Q=b[H+"Month"](),c=b[H+"FullYear"](),g=b[H+"Hours"](),m=b[H+"Minutes"](),n=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:B(S),ddd:u.i18n.dayNames[E],dddd:u.i18n.dayNames[E+7],m:Q+1,mm:B(Q+1),mmm:u.i18n.monthNames[Q],mmmm:u.i18n.monthNames[Q+-12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:B(g%12||12),H:g,HH:B(g),M:m,MM:B(m),s:n,ss:B(n),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+B(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in F?F[I]:I.slice(1,+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 u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,C=function(I,M){I=String(I);for(M=M||2;I.length<M;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||+/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var H=l?"getUTC":"get",S=b[H+"Date"](),E=b[H+"Day"](),Q=b[H+"Month"](),c=b[H+"FullYear"](),g=b[H+"Hours"](),m=b[H+"Minutes"](),n=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:C(S),ddd:u.i18n.dayNames[E],dddd:u.i18n.dayNames[E+7],m:Q+1,mm:C(Q+1),mmm:u.i18n.monthNames[Q],mmmm:u.i18n.monthNames[Q++12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(H,3),L:C(99<H?Math.round(H/10):H),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in F?F[I]:I.slice(1,I.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 f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var l=1;l<b.length;l++)if(!this.model.isAncestor(f,b[l])){f=null;break}}return f};-Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(B){function H(){u.isVisible(B)?(Q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(E,75)):(Q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(E,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",E=document.createElement("div");E.style.overflow=-"hidden";E.style.textOverflow="ellipsis";E.style.padding="2px";E.style.whiteSpace="nowrap";E.style.cursor="pointer";E.setAttribute("title",mxResources.get(u.isVisible(B)?"hideIt":"show",[S]));var Q=document.createElement("img");Q.setAttribute("draggable","false");Q.setAttribute("align","absmiddle");Q.setAttribute("border","0");Q.style.position="relative";Q.style.width="16px";Q.style.padding="0px 6px 0 4px";f&&(Q.style.filter="invert(100%)",Q.style.top="-2px");E.appendChild(Q);mxUtils.write(E,S);l.appendChild(E);-mxEvent.addListener(E,"click",function(){u.setVisible(B,!u.isVisible(B));H();null!=b&&b(B)});H()})(u.getChildAt(u.root,q));return l};-Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var B=null;if(match.index>y&&"%"==f.charAt(match.index-1))B=q.substring(1);else{var H=q.substring(1,q.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 E=this.getCellGeometry(b);-null!=E&&(B=E.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))E=this.getCellGeometry(b),null!=E&&(B=E.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(E=b;null!=E&&!this.model.isEdge(E);)E=this.model.getParent(E);E=this.view.getState(E);null!=E&&(B=Math.round(E.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!=l&&(B=l[H])}u.push(f.substring(y,match.index)+(null!=B?B:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};+Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function H(){u.isVisible(C)?(Q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(E,75)):(Q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(E,25))}var S=this.convertValueToString(C)||mxResources.get("background")||"Background",E=document.createElement("div");E.style.overflow=+"hidden";E.style.textOverflow="ellipsis";E.style.padding="2px";E.style.whiteSpace="nowrap";E.style.cursor="pointer";E.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[S]));var Q=document.createElement("img");Q.setAttribute("draggable","false");Q.setAttribute("align","absmiddle");Q.setAttribute("border","0");Q.style.position="relative";Q.style.width="16px";Q.style.padding="0px 6px 0 4px";f&&(Q.style.filter="invert(100%)",Q.style.top="-2px");E.appendChild(Q);mxUtils.write(E,S);l.appendChild(E);+mxEvent.addListener(E,"click",function(){u.setVisible(C,!u.isVisible(C));H();null!=b&&b(C)});H()})(u.getChildAt(u.root,q));return l};+Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var H=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)C=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var E=this.getCellGeometry(b);+null!=E&&(C=E.width,5<H.length&&(C=Editor.toUnit(C,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))E=this.getCellGeometry(b),null!=E&&(C=E.height,6<H.length&&(C=Editor.toUnit(C,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(E=b;null!=E&&!this.model.isEdge(E);)E=this.model.getParent(E);E=this.view.getState(E);null!=E&&(C=Math.round(E.length/this.view.scale),6<H.length&&(C=Editor.toUnit(C,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==C&&null!=+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==C&&(C=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==C&&(C=this.getGlobalVariable(H));null==C&&null!=l&&(C=l[H])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],l=0;l<b.length;l++){var u=this.model.getCell(b[l].id);null!=u&&f.push(u)}this.setSelectionCells(f)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};-Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var B=q.getIndex(f),H=y.getIndex(q);q=Math.max(u,H);f=Math.min(b,B);b=Math.max(b,B);B=[];for(u=Math.min(u,H);u<=q;u++){H=this.model.getChildAt(y,u);for(var S=f;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),l=!0)}}return l};+Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),H=y.getIndex(q);q=Math.max(u,H);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,H);u<=q;u++){H=this.model.getChildAt(y,u);for(var S=f;S<=b;S++)C.push(this.model.getChildAt(H,S))}0<C.length&&(1<C.length||1<this.getSelectionCount()||+!this.isCellSelected(C[0]))&&(this.setSelectionCells(C),l=!0)}}return l};Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var l=0;l<b.length;l++){var u=b[l],y=this.getCellGeometry(u);if(null!=y){y=y.clone();if(this.getModel().isVertex(u))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(u)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(u,y)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var f=this.model.getChildCount(b);0<=f;f--)this.model.remove(this.model.getChildAt(b,f))}finally{this.model.endUpdate()}};Graph.prototype.updateShapes=function(b,f,l){this.model.beginUpdate();try{var u=this.model.getStyle(b),y=l?this.stylesheet.getCellStyle(u,{},!1):null;null!=y&&null==y[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var q=0;q<f.length;q++){if(this.model.isVertex(b)&&this.model.isVertex(f[q])||-this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var B=this.model.getStyle(f[q]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(f[q],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};+this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var C=this.model.getStyle(f[q]);if(null!=C){var H=C.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(f[q],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,f,l){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=l&&(mxEvent.isTouchEvent(f)?l.update(l.getState(this.view.getState(b[1]))):l.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var l=f;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=b.parent;)l=this.model.getParent(l);null!=l&&null!=l.parent&&l.parent==b.parent&&(f=l.parent.getIndex(l),this.model.add(l.parent,b,f))};-Graph.prototype.connectVertex=function(b,f,l,u,y,q,B,H){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),E=S?b:this.getCompositeParent(b),Q=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(E.geometry.x,E.geometry.y);f==mxConstants.DIRECTION_NORTH?(Q.x+=E.geometry.width/2,Q.y-=l):f==+Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,H){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),E=S?b:this.getCompositeParent(b),Q=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(E.geometry.x,E.geometry.y);f==mxConstants.DIRECTION_NORTH?(Q.x+=E.geometry.width/2,Q.y-=l):f==mxConstants.DIRECTION_SOUTH?(Q.x+=E.geometry.width/2,Q.y+=E.geometry.height+l):(Q.x=f==mxConstants.DIRECTION_WEST?Q.x-l:Q.x+(E.geometry.width+l),Q.y+=E.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;E=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(E=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(Q.x+=b.parent.geometry.x,Q.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(E+Q.x*l,g+Q.y*l)).grow(40*l);q=null!=q?this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var I=-!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;I&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?Q.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=b.geometry.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-b.geometry.width/2:Q.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==B||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&I){var aa=this.getAbsoluteParent(null!=K?K:b);aa=S?b:this.getCompositeParent(aa);L=null!=K?K:this.duplicateCells([aa],+!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;I&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?Q.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=b.geometry.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-b.geometry.width/2:Q.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&I){var aa=this.getAbsoluteParent(null!=K?K:b);aa=S?b:this.getCompositeParent(aa);L=null!=K?K:this.duplicateCells([aa],!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ja=this.getCellGeometry(L);null!=ja&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?Q.y-=ja.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=ja.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-ja.width/2:Q.x+ja.width/2),ja.x=Q.x-ja.width/2,ja.y=Q.y-ja.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):I&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&mxEvent.isShiftDown(u)&&I||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(Q,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==B||null!=L||!I||null==n&&S)return y(L);B(E+Q.x*l,g+Q.y*l,y)};+"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==C||null!=L||!I||null==n&&S)return y(L);C(E+Q.x*l,g+Q.y*l,y)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),null==l&&(l=f.getAttribute("label")||"");return l||""}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,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2450,10 +2450,10 @@ Graph.prototype.getDefaultColor=function(b,f,l){f="default"+f.charAt(0).toUpperCGraph.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,f,l){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var u=this.layoutManager.getLayout(this.model.getParent(b));null!=u&&u.constructor==mxStackLayout&&(u.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var l=!0,u=0;u<b.length&&l;u++)l=l&&this.model.isEdge(b[u]);u=null;if(1==b.length&&l){var y=this.getCellGeometry(b[0]);null!=y&&(u=y.getTerminalPoint(!0))}u=null!=u?u:this.getBoundingBoxFromGeometry(b,l);null!=u&&(l=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,l-u.x,f-u.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var B=this.view.getState(l[q]),H=this.getCellGeometry(l[q]);if(null!=B&&null!=H){var S=0,E=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,E=H.height-H.alternateBounds.height;else{var Q=this.useCssTransforms?1:this.view.scale;-S=Math.round(H.width-B.width/Q);E=Math.round(H.height-B.height/Q)}if(0!=E||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,B)&&this.moveSiblings(B,c,S,E):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,E)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};-Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),B=this.getCellGeometry(y[f]);null!=q&&null!=B&&(B=B.clone(),B.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],B))}}finally{this.model.endUpdate()}};-Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,B.width/this.view.scale-q.width):q.height+=u+Math.min(0,B.height/this.view.scale-q.height),this.model.setGeometry(b,+Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),H=this.getCellGeometry(l[q]);if(null!=C&&null!=H){var S=0,E=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,E=H.height-H.alternateBounds.height;else{var Q=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-C.width/Q);E=Math.round(H.height-C.height/Q)}if(0!=E||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,S,E):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,E)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};+Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),C=this.getCellGeometry(y[f]);null!=q&&null!=C&&(C=C.clone(),C.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],C))}}finally{this.model.endUpdate()}};+Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),C=this.view.getState(b);null!=C&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,C.width/this.view.scale-q.width):q.height+=u+Math.min(0,C.height/this.view.scale-q.height),this.model.setGeometry(b,q));b=this.model.getParent(b);f=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var f=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=f.container:"1"==f.container};Graph.prototype.isCellConnectable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=f.connectable?"0"!=f.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return null!=f.movableLabel?"0"!=f.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,f,l){l=l||this.getDefaultParent();this.isCellLocked(l)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(b,f,l){var u=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(u)&&(u=null);return u};Graph.prototype.isCellFoldable=function(b){var f=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&("1"==f.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=f.collapsible||!this.isContainer(b)&&"1"==f.collapsible))};@@ -2463,10 +2463,10 @@ Graph.prototype.fitPages=function(b,f){var l=1;null==b&&(l=this.getPageLayout(),this.view.scale,(this.container.scrollHeight-this.container.clientHeight)/2)))};Graph.prototype.fitWindow=function(b,f){f=null!=f?f:10;var l=this.container.clientWidth-f,u=this.container.clientHeight-f;this.zoomTo(Math.floor(20*Math.min(l/b.width,u/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var y=this.view.translate;this.container.scrollLeft=(b.x+y.x)*this.view.scale-Math.max((l-b.width*this.view.scale)/2+f/2,0);this.container.scrollTop=(b.y+y.y)*this.view.scale-Math.max((u-b.height*this.view.scale)/2+f/2,0)}),0)};Graph.prototype.convertValueToTooltip=function(b){var f=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==f&&(f=b.value.getAttribute("tooltip")),null!=f&&(null!=f&&this.isReplacePlaceholders(b)&&(f=this.replacePlaceholders(b,f)),f=Graph.sanitizeHtml(f)));return f};-Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var l=this.builtInProperties;b=b.value.attributes;var u=[];f="";this.isEnabled()&&(l.push("linkTarget"),l.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(l,b[y].nodeName))&&0<b[y].nodeValue.length&&u.push({name:b[y].nodeName,value:b[y].nodeValue});u.sort(function(q,B){return q.name<B.name?-1:q.name>B.name?1:0});for(y=+Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var l=this.builtInProperties;b=b.value.attributes;var u=[];f="";this.isEnabled()&&(l.push("linkTarget"),l.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(l,b[y].nodeName))&&0<b[y].nodeValue.length&&u.push({name:b[y].nodeName,value:b[y].nodeValue});u.sort(function(q,C){return q.name<C.name?-1:q.name>C.name?1:0});for(y=0;y<u.length;y++)"link"==u[y].name&&this.isCustomLink(u[y].value)||(f+=("link"!=u[y].name?"<b>"+mxUtils.htmlEntities(u[y].name)+":</b> ":"")+mxUtils.htmlEntities(u[y].value)+"\n");0<f.length&&(f=f.substring(0,f.length-1),mxClient.IS_SVG&&(f='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+f+"</div>"))}return f};-Graph.prototype.addFlowAnimationToNode=function(b,f,l,u){if(null!=b&&null!=u){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var B=0;B<q.length;B++)q[B]=Math.round(Number(q[B])*l*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<-q.length){for(B=y=0;B<q.length;B++){var H=parseFloat(q[B]);isNaN(H)||(y+=parseFloat(q[B]))}0!=q.length%2&&(y*=2);l=Math.round(y/l/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=u+" "+l+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};+Graph.prototype.addFlowAnimationToNode=function(b,f,l,u){if(null!=b&&null!=u){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var C=0;C<q.length;C++)q[C]=Math.round(Number(q[C])*l*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<+q.length){for(C=y=0;C<q.length;C++){var H=parseFloat(q[C]);isNaN(H)||(y+=parseFloat(q[C]))}0!=q.length%2&&(y*=2);l=Math.round(y/l/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=u+" "+l+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var f=document.createElement("style");f.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(f)}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,f){return Graph.compress(b,f)};Graph.prototype.decompress=function(b,f){return Graph.decompress(b,f)};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";HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');@@ -2494,8 +2494,8 @@ HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentStatvar f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var l=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(H,S,E){if(null!=l){var Q=new mxRectangle(S,E,H.clientWidth,H.clientHeight);mxUtils.intersects(Q,l)&&(H==this.arrowUp?E-=Q.y+Q.height-l.y:H==this.arrowRight?S+=l.x+l.width-Q.x:H==this.arrowDown?E+=l.y+l.height-Q.y:H==this.arrowLeft&&(S-=Q.x+Q.width-l.x))}H.style.left=S+"px";H.style.top=E+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-this.triangleUp.height-this.tolerance));f(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));f(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));f(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){f=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());-var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=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!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var E=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,-this.currentState.cell)||this.graph.isSwimlane(H)||!(null==E||null==q||E.height<3*q.height&&E.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(f,this.arrowRight);B(u,this.arrowLeft);B(y,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")),+var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=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!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(H,S){var E=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,+this.currentState.cell)||this.graph.isSwimlane(H)||!(null==E||null==q||E.height<3*q.height&&E.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(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(f){null!=f.parentNode&&(f=new mxRectangle(f.offsetLeft,f.offsetTop,f.offsetWidth,f.offsetHeight),null==b?b=f:b.add(f))});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 f=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(b=f)}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};@@ -2504,29 +2504,29 @@ window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMoub||null==this.bbox||null==f||null==l||!mxUtils.contains(this.bbox,f,l))&&(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,f){var l=this.getCurrentCellStyle(b),u=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(l,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(l,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);u=!0}f&&(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 u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var B=this.cloneCell(f),H=this.getCellGeometry(B);null!=H&&(H.x+=q*u,H.y+=q*y);b.insert(B)}return b};-Graph.prototype.createTable=function(b,f,l,u,y,q,B,H,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q: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!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=B?B:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,H),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};-Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),B=0;B<q.length;B++)null!=f[y][B]&&(q[B].value=f[y][B]);return b};-Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,B,H,S){l=null!=l?l:120;u=null!=u?u: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;";+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 u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var C=this.cloneCell(f),H=this.getCellGeometry(C);null!=H&&(H.x+=q*u,H.y+=q*y);b.insert(C)}return b};+Graph.prototype.createTable=function(b,f,l,u,y,q,C,H,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q: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!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,H),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};+Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),C=0;C<q.length;C++)null!=f[y][C]&&(q[C].value=f[y][C]);return b};+Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,H,S){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"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;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=-q;B=this.createVertex(null,null,"",0,q,f*l+q,u,B);y.insert(this.createParent(B,this.createVertex(null,null,"",q,0,l,u,H),f,l,0));return 1<b?(B.geometry.y=u+q,this.createParent(y,this.createParent(B,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};-Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),B=this.model.getChildCells(u[y],!0),H=this.getCellStyle(u[y],!0),S=null,E=[],Q=0;Q<B.length;Q++){var c=this.getCellGeometry(B[Q]),g={cell:B[Q],rospan:1,colspan:1,row:y,col:Q,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=-l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[Q]&&1<l[Q].rowspan?(g.rowspan=l[Q].rowspan-1,g.colspan=l[Q].colspan,g.actual=l[Q].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(B[Q],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.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;f(g,B.length,-u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));E.push(g);S=g}l=E}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,B,H,S,E){f&&q.row<H-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<B-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,E)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};+q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,H),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};+Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),H=this.getCellStyle(u[y],!0),S=null,E=[],Q=0;Q<C.length;Q++){var c=this.getCellGeometry(C[Q]),g={cell:C[Q],rospan:1,colspan:1,row:y,col:Q,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=+l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[Q]&&1<l[Q].rowspan?(g.rowspan=l[Q].rowspan-1,g.colspan=l[Q].colspan,g.actual=l[Q].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(C[Q],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.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;f(g,C.length,+u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));E.push(g);S=g}l=E}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,H,S,E){f&&q.row<H-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,E)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};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,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),B=u.getChildCells(q,!0);if(!l){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],E=this.getCellGeometry(S);null!=E&&(E=E.clone(),E.y+=f,E.height-=f,u.setGeometry(S,E))}}var Q=this.getCellGeometry(q);null!=Q&&(l||(l=b==B[B.length-1]),l&&(Q=Q.clone(),Q.height+=f,u.setGeometry(q,Q)))}}finally{u.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),B=u.getChildCells(y,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),E=0;E<S.length;E++){y=S[E];B=u.getChildCells(y,!0);var Q=B[b],c=this.getCellGeometry(Q);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(Q,c));b<B.length-1&&(Q=B[b+1],c=this.getCellGeometry(Q),null!=c&&(c=c.clone(),+Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var H=mxUtils.indexOf(C,b);if(H<C.length-1){var S=C[H+1],E=this.getCellGeometry(S);null!=E&&(E=E.clone(),E.y+=f,E.height-=f,u.setGeometry(S,E))}}var Q=this.getCellGeometry(q);null!=Q&&(l||(l=b==C[C.length-1]),l&&(Q=Q.clone(),Q.height+=f,u.setGeometry(q,Q)))}}finally{u.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var H=b==C.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),E=0;E<S.length;E++){y=S[E];C=u.getChildCells(y,!0);var Q=C[b],c=this.getCellGeometry(Q);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(Q,c));b<C.length-1&&(Q=C[b+1],c=this.getCellGeometry(Q),null!=c&&(c=c.clone(),c.x+=f,l||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),u.setGeometry(Q,c)))}if(H||l){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,u.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{u.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,f){for(var l=0,u=0;u<b.length;u++)if(!this.isVertexIgnored(b[u])){var y=this.graph.getCellGeometry(b[u]);null!=y&&(l+=f?y.width:y.height)}return l};-TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var B=this.graph.getCellGeometry(l[q]);null!=B&&(u+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*f/b,y.push(Math.round(u)))}return y};-TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var E=this.graph.getCellGeometry(q[S]);null!=E&&(E=E.clone(),E.y=b.y,E.height=l-b.y-b.height,null!=f?(E.x=f[S],E.width=f[S+1]-E.x,S==q.length-1&&S<f.length-2&&(E.width=u-E.x-b.x-b.width)):(E.x=B,B+=E.width,S==q.length-1?E.width=u-b.x-b.width-H:H+=E.width),E.alternateBounds=new mxRectangle(0,+TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var C=this.graph.getCellGeometry(l[q]);null!=C&&(u+=(null!=C.alternateBounds?C.alternateBounds.width:C.width)*f/b,y.push(Math.round(u)))}return y};+TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,H=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var E=this.graph.getCellGeometry(q[S]);null!=E&&(E=E.clone(),E.y=b.y,E.height=l-b.y-b.height,null!=f?(E.x=f[S],E.width=f[S+1]-E.x,S==q.length-1&&S<f.length-2&&(E.width=u-E.x-b.x-b.width)):(E.x=C,C+=E.width,S==q.length-1?E.width=u-b.x-b.width-H:H+=E.width),E.alternateBounds=new mxRectangle(0,0,E.width,E.height),y.setGeometry(q[S],E))}return H};-TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=l.height-f.y-f.height,E=l.width-f.x-f.width,Q=B.getChildCells(b,!0),c=0;c<Q.length;c++)B.setVisible(Q[c],!0);var g=this.getSize(Q,!1);if(0<S&&0<E&&0<-Q.length&&0<g){if(y){var m=this.graph.getCellGeometry(Q[Q.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,B.setGeometry(Q[Q.length-1],m))}var n=q?null:this.getRowLayout(Q[0],E),x=[],F=f.y;for(c=0;c<Q.length;c++)m=this.graph.getCellGeometry(Q[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=E,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,B.setGeometry(Q[c],m)),H=Math.max(H,this.layoutRow(Q[c],n,m.height,E,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,B.setGeometry(b,-l));q&&E<H+Graph.minTableColumnWidth&&(l=l.clone(),l.width=H+f.width+f.x+Graph.minTableColumnWidth,B.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){B.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=M.width}I.actual.col==I.col&&(M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=M.height)}}))}else for(c=0;c<Q.length;c++)B.setVisible(Q[c],-!1)}finally{B.endUpdate()}}};+TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),H=0;C.beginUpdate();try{for(var S=l.height-f.y-f.height,E=l.width-f.x-f.width,Q=C.getChildCells(b,!0),c=0;c<Q.length;c++)C.setVisible(Q[c],!0);var g=this.getSize(Q,!1);if(0<S&&0<E&&0<+Q.length&&0<g){if(y){var m=this.graph.getCellGeometry(Q[Q.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,C.setGeometry(Q[Q.length-1],m))}var n=q?null:this.getRowLayout(Q[0],E),x=[],F=f.y;for(c=0;c<Q.length;c++)m=this.graph.getCellGeometry(Q[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=E,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,C.setGeometry(Q[c],m)),H=Math.max(H,this.layoutRow(Q[c],n,m.height,E,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,+l));q&&E<H+Graph.minTableColumnWidth&&(l=l.clone(),l.width=H+f.width+f.x+Graph.minTableColumnWidth,C.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){C.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=M.width}I.actual.col==I.col&&(M=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=M.height)}}))}else for(c=0;c<Q.length;c++)C.setVisible(Q[c],+!1)}finally{C.endUpdate()}}};(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var m=this.getState(c);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&!m.invalid&&this.updateLineJumps(m)&&this.graph.cellRenderer.redraw(m,!1,this.isRendering());m=f.apply(this,arguments);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(m);return m};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(c){var g=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=g)for(var m=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=m&&m!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==m&&(m=g[n].getAttribute("d"));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 l=mxShape.prototype.paint;mxShape.prototype.paint=function(c){l.apply(this,@@ -2534,8 +2534,8 @@ arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var u=var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var m=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(Z,k,v){var J=new mxPoint(k,v);J.type=Z;n.push(J);J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=Z||J.x!=k||J.y!=v},F=.5*this.scale;m=!1;n=[];for(var I=0;I<g.length-1;I++){for(var M=g[I+1],L=g[I],K=[],aa=g[I+2];I<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,aa.x,aa.y,M.x,M.y)<1*this.scale*this.scale;)M=aa,I++,aa=g[I+2];m=x(0,L.x,L.y)||m;for(var ja=0;ja<this.validEdges.length;ja++){var ca=this.validEdges[ja],ba=ca.absolutePoints;if(null!=ba&&mxUtils.intersects(c,ca)&&"1"!=ca.style.noJump){var oa=null;for(ca=0;ca<ba.length-1;ca++){var Y=ba[ca+1],da=ba[ca];for(aa=ba[ca+2];ca<ba.length-2&&mxUtils.ptSegDistSq(da.x,da.y,aa.x,aa.y,Y.x,Y.y)<1*this.scale*this.scale;)Y=aa,ca++,aa=ba[ca+2];var ha=mxUtils.intersection(L.x,L.y,M.x,M.y,da.x,da.y,Y.x,Y.y);if(null!=ha&&(Math.abs(ha.x-L.x)>F||Math.abs(ha.y-L.y)>F)&&(Math.abs(ha.x-M.x)>F||Math.abs(ha.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,da.x,da.y)>F)&&(null==aa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,aa.x,aa.y)>F||mxUtils.ptLineDist(L.x,-L.y,M.x,M.y,Y.x,Y.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=da}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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 n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var ca=+L.y,M.x,M.y,Y.x,Y.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=da}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var C=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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)C.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var ca=this.state.routedPoints[ja],ba=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ja?ba=g[0]:ja==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var Y=this.state.routedPoints[ja+1];ca=Y.x/this.scale-ba.x;Y=Y.y/this.scale-ba.y;ca=ca*ca+Y*Y;null==aa&&(aa=new mxPoint(ba.x-M.x,ba.y-M.y),L=Math.sqrt(aa.x*aa.x+aa.y*aa.y),0<L?(aa.x=aa.x*x/L,aa.y=aa.y*x/L):aa=null);ca>x*x&&0<L&&(ca=M.x-ba.x,Y=M.y-ba.y,ca=ca*ca+Y*Y,ca>x*x&&(oa=new mxPoint(ba.x-aa.x,ba.y-aa.y),ca=new mxPoint(ba.x+aa.x,ba.y+aa.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,I),K=0>Math.round(aa.x)||0==Math.round(aa.x)&&0>=Math.round(aa.y)?1:-1,I=!1,"sharp"==F?(c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.lineTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+aa.y*K,oa.y-aa.x*K),c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.moveTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x+aa.y*K,ca.y-aa.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-aa.y*K,oa.y+aa.x*K,ca.x-aa.y*K,ca.y+aa.x*K,ca.x,ca.y)):(c.moveTo(ca.x,ca.y),I=!0),K=[ca],oa=!0))}else aa=null;oa||(K.push(ba),M=ba)}this.addPoints(c,K,m,n,!1,null,I);c.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==@@ -2545,222 +2545,222 @@ var E=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateText8))try{var m=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(m));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return Q.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 f=mxStencilRegistry.stencils[b];if(null==f&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var l=mxStencilRegistry.getBasenameForStencil(b);if(null!=l){f=mxStencilRegistry.libraries[l];if(null!=f){if(null==mxStencilRegistry.packages[l]){for(var u=0;u<f.length;u++){var y=f[u];if(!mxStencilRegistry.isFileLoaded(y))if(mxStencilRegistry.setFileLoaded(y),".xml"==y.toLowerCase().substring(y.length-4,y.length))mxStencilRegistry.loadStencilSet(y,-null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,l,f,y,B)}}mxStencilRegistry.packages[l]=1}}else l=l.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+l+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};+null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(C){null!=window.console&&console.log("error in getStencil:",b,l,f,y,C)}}mxStencilRegistry.packages[l]=1}}else l=l.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+l+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};mxStencilRegistry.getBasenameForStencil=function(b){var f=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){f=b[1];for(var l=2;l<b.length-1;l++)f+="/"+b[l]}return f};-mxStencilRegistry.loadStencilSet=function(b,f,l,u){var y=mxStencilRegistry.packages[b];if(null!=l&&l||null==y){var q=!1;if(null==y)try{if(u){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(B){null!=B&&null!=B.documentElement&&(mxStencilRegistry.packages[b]=B,q=!0,mxStencilRegistry.parseStencilSet(B.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(B){null!=window.console&&console.log("error in loadStencilSet:",b,B)}null!=y&&null!=+mxStencilRegistry.loadStencilSet=function(b,f,l,u){var y=mxStencilRegistry.packages[b];if(null!=l&&l||null==y){var q=!1;if(null==y)try{if(u){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(C){null!=C&&null!=C.documentElement&&(mxStencilRegistry.packages[b]=C,q=!0,mxStencilRegistry.parseStencilSet(C.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(C){null!=window.console&&console.log("error in loadStencilSet:",b,C)}null!=y&&null!=y.documentElement&&mxStencilRegistry.parseStencilSet(y.documentElement,f,q)}};mxStencilRegistry.loadStencil=function(b,f){if(null!=f)mxUtils.get(b,mxUtils.bind(this,function(l){f(200<=l.getStatus()&&299>=l.getStatus()?l.getXml():null)}),mxUtils.bind(this,function(l){f(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var f=0;f<b.length;f++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[f]).documentElement)};-mxStencilRegistry.parseStencilSet=function(b,f,l){if("stencils"==b.nodeName)for(var u=b.firstChild;null!=u;)"shapes"==u.nodeName&&mxStencilRegistry.parseStencilSet(u,f,l),u=u.nextSibling;else{l=null!=l?l:!0;u=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=u.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");l&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(u));if(null!=f){var B=u.getAttribute("w"),-H=u.getAttribute("h");B=null==B?80:parseInt(B,10);H=null==H?80:parseInt(H,10);f(y,q,b,B,H)}}u=u.nextSibling}}};-"undefined"!==typeof mxVertexHandler&&function(){function b(){var C=document.createElement("div");C.className="geHint";C.style.whiteSpace="nowrap";C.style.position="absolute";return C}function f(C,P){switch(P){case mxConstants.POINTS:return C;case mxConstants.MILLIMETERS:return(C/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(C/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(C/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";+mxStencilRegistry.parseStencilSet=function(b,f,l){if("stencils"==b.nodeName)for(var u=b.firstChild;null!=u;)"shapes"==u.nodeName&&mxStencilRegistry.parseStencilSet(u,f,l),u=u.nextSibling;else{l=null!=l?l:!0;u=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=u.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");l&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(u));if(null!=f){var C=u.getAttribute("w"),+H=u.getAttribute("h");C=null==C?80:parseInt(C,10);H=null==H?80:parseInt(H,10);f(y,q,b,C,H)}}u=u.nextSibling}}};+"undefined"!==typeof mxVertexHandler&&function(){function b(){var B=document.createElement("div");B.className="geHint";B.style.whiteSpace="nowrap";B.style.position="absolute";return B}function f(B,P){switch(P){case mxConstants.POINTS:return 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(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(C){return!mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(C){return l.apply(this,arguments)||this.graph.isTableRow(C)||this.graph.isTableCell(C)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=-function(C){return u.apply(this,arguments)||this.graph.isEdgeIgnored(C)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(C){return this.graph.isCloneEvent(C)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var C=new mxEllipse(null,this.highlightColor,this.highlightColor,0);C.opacity=mxConstants.HIGHLIGHT_OPACITY;return C};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var P in this.graph.currentEdgeStyle)C.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)C.style[P]=W[P]}catch(ia){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};-var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var C=q.apply(this,arguments);C.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return C};mxConnectionHandler.prototype.updatePreview=function(C){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var C=B.apply(this,arguments),P=C.getCell;C.getCell=mxUtils.bind(this,function(R){var W=P.apply(this,arguments);this.error=null;return W});-return C};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var C="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",P="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<P.length;R++)null!=-this.currentEdgeStyle[P[R]]&&(C+=P[R]+"="+this.currentEdgeStyle[P[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?C+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(C+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?C+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(C+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(C+="elbow="+this.currentEdgeStyle.elbow+";");return C=null!=this.currentEdgeStyle.html?C+("html="+this.currentEdgeStyle.html+";"):C+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var C=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,P){P=null!=P?P:{};for(var R=0;R<C.length;R++){var W=C[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ia=this.model.getChildCount(W),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(C,P,R){R=null!=R?R:{};for(var W in C){var ia=P[W];null==R[ia]&&(R[ia]=C[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,-P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ia=new mxCodec(C.ownerDocument),ka=new mxGraphModel;ia.decode(C,ka);C=[];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++)ua=this.model.getChildren(this.moveCells([xa[ka]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=-ka.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ia,ta,pa),this.updateCustomLinks(pa,C),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ia=this.getBoundingBoxFromGeometry(C,!0);null!=Ia&&this.moveCells(C,P-Ia.x,R-Ia.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var P={},R=this.cloneCells(C,null,P),W=-new mxDictionary,ia=0;ia<C.length;ia++)W.put(C[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ta=this.view.getState(C[ia]);if(null!=ta){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(C[ia])&&null==W.get(this.model.getParent(C[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(P,-this.createCellLookup(C)),R);return ka.encode(pa)};Graph.prototype.isSwimlane=function(C,P){var R=null;null==C||this.model.isEdge(C)||this.model.getParent(C)==this.model.getRoot()||(R=this.getCurrentCellStyle(C,P)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(C){return null!=C&&H.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellEditable(this.model.getParent(C)):-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(C){return null!=C&&S.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellMovable(this.model.getParent(C)):!0:!1};var E=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(C){var P=this.model.getParent(C);if(null!=P){var R=this.getCurrentCellStyle(P);if(null!=R.expand)return"0"!=R.expand}return E.apply(this,arguments)&&(null==P||!this.isTable(P))};var Q=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(C,P,R,W,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{R=Q.apply(this,[C,P,R,W,ia,ka,pa,xa]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(P=0;P<ta.length;P++){var ua=this.getCellGeometry(ta[P]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[P])}var Ia=this.getChildCells(C,!0);for(P=0;P<Ia.length;P++)ua=this.getCellGeometry(Ia[P]),-null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Ia[P]);var Va=this.model.getTerminal(R,!1);if(null!=Va){var Wa=this.getCurrentCellStyle(Va);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(C,-P,R){if(P||R)c.apply(this,arguments);else{var W=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==W)ia=ka.length-1;else if(C&&null==W&&0<ka.length||null!=ia&&C&&ka.length>ia||!C&&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+(C?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};-Graph.prototype.swapShapes=function(C,P){if(this.model.isVertex(C)&&this.model.isVertex(P)&&2==this.getMovableCells([C,P]).length){var R=this.getCellGeometry(C),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ia=R.clone(),ka=W.clone();this.model.beginUpdate();try{ia.x=W.getCenterX()-R.width/2,ia.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(C,ia),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(C,P,R,W,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<C.length;ta++)this.isTable(C[ta])?xa=xa.concat(this.model.getChildCells(C[ta],!0).reverse()):xa.push(C[ta]);C=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<C.length;ta++)if(null!=ia&&this.isTableRow(C[ta])){var ua=this.model.getParent(C[ta]),Ia=this.getCellGeometry(C[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ia&&this.isTable(ua)&&this.isTable(ia)&&(W||ua!=ia)){if(!W){var Va=-this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ia.height,this.model.setGeometry(ua,Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ia.height,this.model.setGeometry(ia,Va));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){C[ta]=W?this.cloneCell(C[ta]):C[ta];var Ta=this.model.getChildCells(C[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Pa=ab.length-Ta.length;if(0<Pa)for(var Sa=0;Sa<Pa;Sa++){var gb=this.cloneCell(Ta[Ta.length-1]);null!=gb&&(gb.value="",this.model.add(C[ta],-gb))}else if(0>Pa)for(Sa=0;Sa>Pa;Sa--)this.model.remove(Ta[Ta.length+Sa-1]);Ta=this.model.getChildCells(C[ta],!0);for(Sa=0;Sa<ab.length;Sa++){var fb=this.getCellGeometry(ab[Sa]),cb=this.getCellGeometry(Ta[Sa]);null!=fb&&null!=cb&&(cb=cb.clone(),cb.width=fb.width,this.model.setGeometry(Ta[Sa],cb))}}}}var eb=g.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!W&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);W&&this.updateCustomLinks(this.createCellMapping(pa,-this.createCellLookup(C)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(C,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<C.length;W++)if(this.isTableCell(C[W])){var ia=this.model.getParent(C[W]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(C[W],"")}else{if(this.isTableRow(C[W])&&(ka=this.model.getParent(C[W]),-0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka))){for(var pa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<pa.length;ta++)0<=mxUtils.indexOf(C,pa[ta])&&xa++;xa==pa.length&&R.push(ka)}R.push(C[W])}R=m.apply(this,[R,P])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(C,P,R){R=null!=R?R:new Graph;for(var W=0;W<P.length;W++)null!=P[W]&&R.updateCustomLinksForCell(C,P[W],R)};Graph.prototype.updateCustomLinksForCell=function(C,P){this.doUpdateCustomLinksForCell(C,P);for(var R=-this.model.getChildCount(P),W=0;W<R;W++)this.updateCustomLinksForCell(C,this.model.getChildAt(P,W))};Graph.prototype.doUpdateCustomLinksForCell=function(C,P){};Graph.prototype.getAllConnectionConstraints=function(C,P){if(null!=C){P=mxUtils.getValue(C.style,"points",null);if(null!=P){C=[];try{var R=JSON.parse(P);for(P=0;P<R.length;P++){var W=R[P];C.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return C}if(null!=-C.shape&&null!=C.shape.bounds){W=C.shape.direction;P=C.shape.bounds;var ia=C.shape.scale;R=P.width/ia;P=P.height/ia;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=C.shape.getConstraints(C.style,R,P);if(null!=P)return P;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var P=this.getCurrentCellStyle(C);P=-mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[C])}};Graph.prototype.isValidRoot=function(C){for(var P=this.model.getChildCount(C),R=0,W=0;W<P;W++){var ia=this.model.getChildAt(C,W);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,P,-R){for(var W=this.getCurrentCellStyle(C),ia=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ia=ia&&this.isTable(P[pa]),ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ka||ia))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,-arguments);C.setStyle("group");return C};Graph.prototype.isExtendParentsOnAdd=function(C){var P=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(P&&null!=C&&null!=this.layoutManager){var R=this.model.getParent(C);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(P=!1))}return P};Graph.prototype.getPreferredSizeForCell=function(C,P,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=-10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(C,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ia=0;ia<C.length;ia++){var ka=C[ia];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Ia=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,-!1);ta.setTerminalPoint(Ia,!0);R.setGeometry(ka,ta);var Va=this.view.getState(ka),Wa=this.view.getState(pa),Ta=this.view.getState(xa);if(null!=Va){var ab=null!=Wa?this.getConnectionConstraint(Va,Wa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ka,pa,!0,Pa);this.setConnectionConstraint(ka,xa,!1,ab);var Sa=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Sa,[ka])}W.push(ka)}}else if(R.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 gb=ta.width;ta.width=ta.height;ta.height=gb;R.setGeometry(ka,ta)}var fb=this.view.getState(ka);if(null!=fb){var cb=[mxConstants.DIRECTION_EAST,-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(fb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,cb[mxUtils.mod(mxUtils.indexOf(cb,eb)+(P?-1:1),cb.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(C){if(null!=C&&null!=C.fgNode)for(C=C.fgNode.firstChild;null!=C;){if("text"==C.nodeName&&"1"==C.getAttribute("placeholders"))return!0;-C=C.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(C){if(C instanceof mxGeometryChange&&(this.isTableCell(C.cell)||this.isTableRow(C.cell))&&(null==C.previous&&null!=C.geometry||null!=C.previous&&!C.previous.equals(C.geometry))){var P=C.cell;this.isTableCell(P)&&(P=this.model.getParent(P));this.isTableRow(P)&&(P=this.model.getParent(P));var R=this.view.getState(P);null!=R&&null!=R.shape&&(this.view.invalidate(P),R.shape.bounds=null)}n.apply(this,arguments);-C instanceof mxValueChange&&null!=C.cell&&null!=C.cell.value&&"object"==typeof C.cell.value&&this.invalidateDescendantsWithPlaceholders(C.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(C){C=this.model.getDescendants(C);if(0<C.length)for(var P=0;P<C.length;P++){var R=this.view.getState(C[P]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(C[P]):this.isReplacePlaceholders(C[P])&&this.view.invalidate(C[P],!1,!1)}};-Graph.prototype.replaceElement=function(C,P){P=C.ownerDocument.createElement(null!=P?P:"span");for(var R=Array.prototype.slice.call(C.attributes);attr=R.pop();)P.setAttribute(attr.nodeName,attr.nodeValue);P.innerHTML=C.innerHTML;C.parentNode.replaceChild(P,C)};Graph.prototype.processElements=function(C,P){if(null!=C){C=C.getElementsByTagName("*");for(var R=0;R<C.length;R++)null!=C[R]&&P(C[R])}};Graph.prototype.updateLabelElements=function(C,P,R){C=null!=C?C:this.getSelectionCells();for(var W=document.createElement("div"),-ia=0;ia<C.length;ia++){var ka=this.getCurrentCellStyle(C[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(C[ia]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(C[ia],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&-null!=C.getAttribute("placeholder"))for(var W=C.getAttribute("placeholder"),ia=C;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(W)){this.setAttributeForCell(ia,W,P);break}ia=this.model.getParent(ia)}var ka=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var P=new mxDictionary,R=0;R<C.length;R++)P.put(C[R],!0);var W=[];for(R=0;R<C.length;R++){var ia=this.model.getParent(C[R]);null==ia||P.get(ia)||(P.put(ia,!0),W.push(ia))}for(R=0;R<W.length;R++)if(ia=this.view.getState(W[R]),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++)P.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&C.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var P=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&P.push(C[R]);C=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,P){this.setAttributeForCell(C,"link",P)};Graph.prototype.setTooltipForCell=function(C,-P){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(C.value)&&C.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(C,R,P)};Graph.prototype.getAttributeForCell=function(C,P,R){C=null!=C.value&&"object"===typeof C.value?C.value.getAttribute(P):null;return null!=C?C:R};Graph.prototype.setAttributeForCell=function(C,P,R){if(null!=C.value&&"object"==typeof C.value)var W=C.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),-W.setAttribute("label",C.value||"");null!=R?W.setAttribute(P,R):W.removeAttribute(P);this.model.setValue(C,W)};Graph.prototype.isTargetShape=function(C,P,R){C=mxUtils.getValue(this.getCurrentCellStyle(C),mxConstants.STYLE_SHAPE,"");for(R=0;R<P.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(P[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,C))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(C,P,R,W){if(mxEvent.isAltDown(P))return null;-for(var ia=0;ia<C.length;ia++){var ka=this.model.getParent(C[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(C,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ia=0;ia<C.length&&pa;ia++)pa=pa&&this.isTableRow(C[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(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};-Graph.prototype.dblClick=function(C,P){this.isEnabled()&&(P=this.insertTextForEvent(C,P),mxGraph.prototype.dblClick.call(this,C,P))};Graph.prototype.insertTextForEvent=function(C,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ia=mxEvent.getSource(C);this.firstClickState!=W||this.firstClickSource!=ia||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&-(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(C)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var C=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ia=this.getPageSize();P=Math.max(P,W.x*ia.width);R=Math.max(R,W.y*ia.height)}return new mxPoint(this.snap(P+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(){var C=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/C.scale-C.translate.x+(0==P.width?2*this.gridSize:0))));C=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/C.scale--C.translate.y+2*this.gridSize)));return new mxPoint(W,C)};Graph.prototype.getCenterInsertPoint=function(C){C=null!=C?C: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-C.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-C.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/-2/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-C.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(C,P){C=null!=C?C:"";null!=P&&(0<C.length&&";"!=C.charAt(C.length-1)&&(C+=";"),C+="fontSize="+P+";");return C};Graph.prototype.addText=function(C,P,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ia=this.view.getRelativePoint(R,C,P);W.geometry.x=Math.round(1E4*ia.x)/1E4;W.geometry.y=Math.round(ia.y);W.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((C-ia.x)/ka),Math.round((P-ia.y)/ka))}else ia=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(C/this.view.scale)-ia.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ia.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(C,P,R){var W=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Ia=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Ia&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Ia),null!=P&&mxEvent.addGestureListeners(ta[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&-C!=mxConstants.NONE?new mxCellHighlight(pa,C,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ta=pa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Ia,Va,Wa){return null==pa.getLinkForCell(Ia.cell)}),ua=null==ua||pa.model.isAncestor(ta,ua.cell)?pa.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=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(pa.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!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Ia=ua.getSource();for(ta=ua.getEvent();null!=Ia&&"a"!=Ia.nodeName.toLowerCase();)Ia=Ia.parentNode;null==-Ia&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.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?(Ia=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ia||null==P||P(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||-(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Ia?pa.linkTarget:"_top",pa.openLink(this.currentLink,ta),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&R(ua.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(C,P){C=null!=C?C:this.getSelectionCells();P=null!=P?P:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var W=this.getModel(),ia=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ta=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=W.getParent(C[R]);if(null!=ua){var Ia=this.moveCells([ta[R]],ia,ia,!1)[0];ka.push(Ia);if(P)W.add(ua,ta[R]);else{var Va=ua.getIndex(C[R]);W.add(ua,ta[R],Va+-1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[R]),Ta=this.getCellGeometry(ua);null!=Wa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Wa.height,W.setGeometry(ua,Ta))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(C,P,R){if(null!=C&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ia=-[],ka=0;ka<W.length;ka++)ia.push(W[ka]);document.execCommand("insertimage",!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ia.length+1)for(ka=C.length-1;0<=ka;ka--)if(0==ka||C[ka]!=ia[ka-1]){C[ka].setAttribute("width",P);C[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=-0;W<P.length;W++)R.push(P[W]);document.execCommand("createlink",!1,mxUtils.trim(C));P=this.cellEditor.textarea.getElementsByTagName("a");if(P.length==R.length+1)for(W=P.length-1;0<=W;W--)if(P[W]!=R[W-1]){for(P=P[W].getElementsByTagName("a");0<P.length;){for(R=P[0].parentNode;null!=P[0].firstChild;)R.insertBefore(P[0].firstChild,P[0]);R.removeChild(P[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(C))};Graph.prototype.isCellResizable=function(C){var P=mxGraph.prototype.isCellResizable.apply(this,-arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&!this.isTableRow(C)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ia=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ta=this.view.getState(P[xa]);if(null!=ta){var ua=C?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,-ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=C?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Pa){return C?ab.x-Pa.x:ab.y-Pa.y});R&&(pa-=C?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(C?ta.x:ta.y);ia=ia/ua-(C?ta.x:ta.y);this.getModel().beginUpdate();try{var Ia=(ia-ka-pa)/(W.length-1),Va=ka+(R?C?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Wa=this.view.getState(this.model.getParent(W[xa].cell)),-Ta=this.getCellGeometry(W[xa].cell);Va+=Ia;null!=Ta&&null!=Wa&&(Ta=Ta.clone(),C?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Wa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Wa.origin.y,this.getModel().setGeometry(W[xa].cell,Ta));R&&(Va+=C?W[xa].width:W[xa].height)}}finally{this.getModel().endUpdate()}}}return P};Graph.prototype.isCloneEvent=function(C){return mxClient.IS_MAC&&mxEvent.isMetaDown(C)||mxEvent.isControlDown(C)};Graph.prototype.createSvgImageExport=function(C){C=new mxImageExport;C.addCellData=-function(R,W,ia){W.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=0;ia<R.value.attributes.length;ia++){var ka=R.value.attributes[ia];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=C.visitStatesRecursive;C.visitStatesRecursive=function(R,W,ia){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,-null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(W.root);P.apply(this,arguments);W.root=ka}};C.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});C.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return C};Graph.prototype.parseBackgroundImage=function(C){var P=null;null!=C&&0<C.length&&(C=JSON.parse(C),P=new mxImage(C.src,-C.width,C.height));return P};Graph.prototype.getBackgroundImageObject=function(C){return C};Graph.prototype.getSvg=function(C,P,R,W,ia,ka,pa,xa,ta,ua,Ia,Va,Wa,Ta,ab,Pa){var Sa=null;if(null!=Ta)for(Sa=new mxDictionary,Ia=0;Ia<Ta.length;Ia++)Sa.put(Ta[Ia],!0);Ta=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:-!0;ua=null!=ua?ua:!1;var fb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Sa||W||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),cb=this.backgroundImage,eb=this.view.translate,lb=this.view.scale;"diagram"==Wa&&null!=cb&&null!=cb.width&&null!=cb.height&&(fb=mxRectangle.fromRectangle(fb),fb.add(new mxRectangle((eb.x+cb.x)*lb,(eb.y+cb.y)*lb,cb.width*lb,cb.height*lb)));if(null==fb)throw Error(mxResources.get("drawingEmpty"));W=P/lb;var kb=Math.max(1,Math.ceil(fb.width*-W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);ia=ia?-.5:0;var hb=mxUtils.getLightDarkColor(C),pb=Graph.createSvgNode(ia,ia,kb,ob,hb),sb=pb.ownerDocument;if(null!=C){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,-"g");pb.appendChild(mb);var nb=this.createSvgCanvas(mb);nb.translate(Math.floor(R/P-fb.x/lb),Math.floor(R/P-fb.y/lb));nb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=nb.getAlternateText;nb.getAlternateText=function(bb,yb,tb,xb,vb,rb,Db,Fb,d,p,A,t,z){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var D=Math.ceil(2*xb/this.state.fontSize),G=[],ea=0,O=0;(0==D||ea<D)&&O<-rb.length;){var sa=rb.charCodeAt(O);if(10==sa||13==sa){if(0<ea)break}else G.push(rb.charAt(O)),255>sa&&ea++;O++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(C=lb/P,ia=new mxRectangle((cb.x+eb.x)*C,(cb.y+eb.y)*C,cb.width*C,cb.height*C),mxUtils.intersects(fb,ia)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);-nb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var zb=xa.getLinkForCellState;xa.getLinkForCellState=function(bb,yb){var tb=bb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==tb||bb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(bb,yb){return bb.view.graph.getLinkTargetForCell(bb.cell)};var Cb=xa.drawCellState,Ab=null,Bb=mxUtils.bind(this,function(){if(null==Ab){Ab="ge-flow-animation-"+Editor.guid();var bb=null!=sb.createElementNS?sb.createElementNS(mxConstants.NS_SVG,-"style"):sb.createElement("style");bb.innerHTML=this.createFlowAnimationCss(Ab);sb.getElementsByTagName("defs")[0].appendChild(bb)}return Ab});xa.drawCellState=function(bb,yb){for(var tb=bb.view.graph,xb=null!=Sa?Sa.get(bb.cell):tb.isCellSelected(bb.cell),vb=tb.model.getParent(bb.cell);!(ka&&null==Sa||xb)&&null!=vb;)xb=null!=Sa?Sa.get(vb):tb.isCellSelected(vb),vb=tb.model.getParent(vb);if(null!=bb.shape)try{var rb=bb.shape.isFlowAnimationEnabled,Db=bb.shape.addFlowAnimationToShape;bb.shape.isFlowAnimationEnabled=-function(){return gb&&tb.model.isEdge(bb.cell)&&"1"==mxUtils.getValue(bb.style,"flowAnimation","0")};bb.shape.addFlowAnimationToShape=function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),bb.style,P,Bb())};if(ka&&null==Sa||xb)tb.view.redrawEnumerationState(bb),Cb.apply(this,arguments),this.doDrawShape(bb.secondLabel,yb)}finally{bb.shape.isFlowAnimationEnabled=rb,bb.shape.addFlowAnimationToShape=Db}};var wb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(wb),-nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ta,!0);return pb}finally{this.enableFlowAnimation=gb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),W=C.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=-C.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||P.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"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x",-"50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(W);ia.appendChild(C);R.appendChild(ia);P.appendChild(R)}};Graph.prototype.disableSvgLinks=function(C,P){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var W=C[R].getAttribute("href");null==W&&(W=C[R].getAttribute("xlink:href"));null!=W&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));P&&P(C[R])}};Graph.prototype.updateSvgLinks=function(C,P,R){C=C.getElementsByTagName("a");for(var W=-0;W<C.length;W++)if(null==C[W].getAttribute("target")){var ia=C[W].getAttribute("href");null==ia&&(ia=C[W].getAttribute("xlink:href"));null!=ia&&(null!=P&&/^https?:\/\//.test(ia)?C[W].setAttribute("target",P):R&&this.isCustomLink(ia)&&C[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=-function(){var C=null;if(window.getSelection){var P=window.getSelection();P.getRangeAt&&P.rangeCount&&(C=P.getRangeAt(0).commonAncestorContainer)}else document.selection&&(C=document.selection.createRange().parentElement());return C};Graph.prototype.getSelectedEditingElement=function(){var C=null;if(null!=this.cellEditor.textarea)for(C=this.getSelectedElement();null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.parentNode;return C};Graph.prototype.getParentByName=function(C,P,R){for(;null!=C&&-C.nodeName!=P;){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.getParentByNames=function(C,P,R){for(;null!=C&&!(0<=mxUtils.indexOf(P,C.nodeName));){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.selectNode=function(C){var P=null;if(window.getSelection){if(P=window.getSelection(),P.getRangeAt&&P.rangeCount){var R=document.createRange();R.selectNode(C);P.removeAllRanges();P.addRange(R)}}else(P=document.selection)&&"Control"!=P.type&&(C=P.createRange(),C.collapse(!0),R=P.createRange(),-R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,P,R){var W=this.getCellGeometry(C);if(null!=W){W=W.clone();if(null!=W.points)for(var ia=0;ia<W.points.length;ia++)P?W.points[ia].x=R+(R-W.points[ia].x):W.points[ia].y=R+(R-W.points[ia].y);ia=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ia(W.getTerminalPoint(!0));ia(W.getTerminalPoint(!1));this.model.setGeometry(C,W)}};Graph.prototype.flipChildren=function(C,P,R){this.model.beginUpdate();try{for(var W=-this.model.getChildCount(C),ia=0;ia<W;ia++){var ka=this.model.getChildAt(C,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,P){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],W=0;W<C.length;W++)if(this.model.isEdge(C[W])){var ia=this.view.getState(C[W]);-null!=ia&&this.flipEdgePoints(C[W],P,(P?ia.getCenterX():ia.getCenterY())/this.view.scale-(P?ia.origin.x:ia.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(C[W]);null!=ka&&this.flipChildren(C[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(C[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,P){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();-try{for(var W=0;W<C.length;W++){var ia=this.model.getParent(C[W]);if(this.isTable(ia)){var ka=this.getCellGeometry(C[W]),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(C):null;this.removeCells(C,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};-Graph.prototype.insertTableColumn=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=0;if(this.isTableCell(C)){var ka=R.getParent(C);W=R.getParent(ka);ia=mxUtils.indexOf(R.getChildCells(ka,!0),C)}else this.isTableRow(C)?W=R.getParent(C):C=R.getChildCells(W,!0)[0],P||(ia=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ta=R.getChildCells(pa[C],!0)[ia],ua=R.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Ia=-this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ia){null!=Ia.alternateBounds&&(Ia.width=Ia.alternateBounds.width,Ia.height=Ia.alternateBounds.height,Ia.alternateBounds=null);xa=Ia.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ia.height=Va.height)}R.add(pa[C],ua,ia+(P?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=xa,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=-function(C){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:P.getParent(C);var W=P.getChildCells(R,!0);0==W.length?P.remove(R):(R==C&&(C=W[W.length-1]),P.remove(C))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){W=C;var ia=R.getChildCells(W,!0);C=ia[P?0:ia.length-1]}else W=R.getParent(C);var ka=W.getIndex(C);-C=R.cloneCell(C,!1);C.value=null;R.add(W,C,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=C;if(this.isTableCell(C))ia=R.getParent(C),W=R.getParent(ia);else if(this.isTableRow(C))W=R.getParent(C);else{var ka=R.getChildCells(W,!0);ia=ka[P?0:ka.length-1]}var pa=R.getChildCells(ia,!0),xa=W.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);if(null!=ta){for(ka=0;ka<pa.length;ka++){C=R.cloneCell(pa[ka],-!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(C)}R.add(W,ia,xa+(P?0:1));var Ia=this.getCellGeometry(W);null!=Ia&&(Ia=Ia.clone(),Ia.height+=ta.height,R.setGeometry(W,Ia))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var P=this.getModel();-P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(W=P.getParent(C));this.isTableRow(W)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(0==ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ka,C));for(W=C=0;W<ia.length;W++){var xa=P.getChildCells(ia[W],!0)[pa];P.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(C=Math.max(C,ta.width))}var ua=this.getCellGeometry(R);-null!=ua&&(ua=ua.clone(),ua.width-=C,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var P=this.getModel();P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(C=W=P.getParent(C));this.isTableRow(C)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(1>=ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[ia.length-1]);P.remove(W);C=0;var ka=this.getCellGeometry(W);null!=ka&&(C=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=-C,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(C,P){for(var R=C.tBodies[0],W=R.rows[0].cells,ia=C=0;ia<W.length;ia++){var ka=W[ia].getAttribute("colspan");C+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ia=0;ia<C;ia++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(C,P){C.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(C,P){var R=C.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ia=document.createElement("th");-R.rows[W].appendChild(ia);mxUtils.br(ia)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)W=C.rows[R].insertCell(P),mxUtils.br(W);return C.rows[0].cells[0<=P?P:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(C,P){if(0<=P){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>P&&C[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");-R.innerHTML=C;C=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=C.appendChild(W);P.insertNode(C)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(C)};Graph.prototype.createLinkForHint=function(C,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}C=null!=C?C:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(C)?this.getLinkTitle(C):C;var ia=document.createElement("a");-ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(C));ia.setAttribute("title",W(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,W(P,40));this.isCustomLink(C)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(C,R);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 C=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=C.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 P=!1,R=!1,W=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=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||!W&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||P&&this.isCellSelected(pa.getCell())));xa=!P||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+-ua.x+1,pa.getY()+ua.y+1,ta,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};mxCellEditor.prototype.isContentEditing=function(){var C=this.graph.view.getState(this.editingCell);return null!=C&&1==C.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=-function(){var C="";window.getSelection?C=window.getSelection():document.getSelection?C=document.getSelection():document.selection&&(C=document.selection.createRange().text);return""!=C};mxCellEditor.prototype.insertTab=function(C){var P=this.textarea.ownerDocument.defaultView.getSelection(),R=P.getRangeAt(0);C=Graph.createTabNode(C);R.insertNode(C);R.setStartAfter(C);R.setEndAfter(C);P.removeAllRanges();P.addRange(R)};mxCellEditor.prototype.alignText=function(C,P){var R=this.graph.getView().getState(this.editingCell);-if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ia=null!=P&&mxEvent.isShiftDown(P);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(C)}W||document.execCommand("justify"+-C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var C=window.getSelection();if(C.getRangeAt&&C.rangeCount){for(var P=[],R=0,W=C.rangeCount;R<W;++R)P.push(C.getRangeAt(R));return P}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(C){try{if(C)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var P=0,R=C.length;P<-R;++P)sel.addRange(C[P])}else document.selection&&C.select&&C.select()}catch(W){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(C){null!=C.text&&(C.text.replaceLinefeeds="0"!=mxUtils.getValue(C.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(C,P){this.isKeepFocusEvent(C)||!mxEvent.isAltDown(C.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=-function(C){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(C,P){C=this.graph.getStartEditingCell(C,P);M.apply(this,arguments);var R=this.graph.view.getState(C);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(C)};mxCellEditor.prototype.toggleViewMode=function(){var C=this.graph.view.getState(this.editingCell);if(null!=C){var P=null!=C&&"0"!=mxUtils.getValue(C.style,"nl2Br","1"),R=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(P?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);P=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(C.style,-mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&pa.push("underline");(mxUtils.getValue(C.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=P;this.textarea.style.textAlign=W;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(P?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=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(C,P){if(null!=this.textarea)if(C=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=C){var R=C.view.scale;this.bounds=mxRectangle.fromRectangle(C);if(0==this.bounds.width&&-0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var W=null!=C.text?C.text.margin:null;null==W&&(W=mxUtils.getAlignmentAsPoint(mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(C.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=W.x*this.bounds.width;this.bounds.y+=W.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height--4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*-R);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("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(C,P){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);-var R=this.graph.getEditingValue(C.cell,P);"1"==mxUtils.getValue(C.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(C,P){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(C.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;-mxCellEditor.prototype.getCurrentValue=function(C){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var P=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(C.style,"nl2Br","1")?(P=P.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<P.length&&("<br/>"==P.substring(P.length-5)||"<br>"==P.substring(P.length-4))&&(P=P.substring(0,P.lastIndexOf("<br"))+"<div><br/></div>")):-P=P.replace(/\r\n/g,"").replace(/\n/g,"");return P};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(C){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(C){}};var aa=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(C,P){this.graph.getModel().beginUpdate();try{aa.apply(this,arguments),""==P&&this.graph.isCellDeletable(C.cell)&&-0==this.graph.model.getChildCount(C.cell)&&this.graph.isTransparentState(C)&&this.graph.removeCells([C.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getBorderColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getMinimumSize=-function(C){var P=this.graph.getView().scale;return new mxRectangle(0,0,null==C.text?30:C.text.size*P+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(C,P){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(P.getEvent)};mxGraphView.prototype.formatUnitText=function(C){return C?f(C,this.unit):C};mxGraphHandler.prototype.updateHint=function(C){if(null!=this.pBounds&&(null!=this.shape||-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var P=this.graph.view.translate,R=this.graph.view.scale;C=this.roundLength((this.bounds.x+this.currentDx)/R-P.x);P=this.roundLength((this.bounds.y+this.currentDy)/R-P.y);R=this.graph.view.unit;this.hint.innerHTML=f(C,R)+", "+f(P,R);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 ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,P){ja.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var W=this.graph.model.getParent(C),ia=null!=W?this.graph.getCellGeometry(W):null;if(null!=ia&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=-parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);ia=ia.clone();R?ia.height=P.height+pa.y+pa.height+2*ka:ia.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var P=ca.apply(this,-arguments),R=new mxDictionary,W=this.graph.model,ia=[],ka=0;ka<P.length;ka++){var pa=P[ka];this.graph.isTableCell(pa)?C(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&C(W.getParent(pa));C(pa)}return ia};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=-function(){return oa.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 Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var P=Y.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var da=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=-function(C){var P=da.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var C=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+C.x/2,this.bounds.y+this.rotationHandleVSpacing-C.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(C,P){return this.graph.isRecursiveVertexResize(C)&&!mxEvent.isAltDown(P.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(C,P){return mxEvent.isControlDown(P.getEvent())||mxEvent.isMetaDown(P.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 Z=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(C){return C.tableHandle||k.apply(this,arguments)&&-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var C=0;this.graph.isTableRow(this.state.cell)?C=1:this.graph.isTableCell(this.state.cell)&&(C=2);return C};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,N=mxVertexHandler.prototype.createCustomHandles;-mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var C=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(ab,Pa,Sa){for(var gb=[],fb=0;fb<ab.length;fb++){var cb=ab[fb];gb.push(null==cb?null:new mxPoint((ta+cb.x+Pa)*ka,(ua+cb.y+Sa)*ka))}return gb},R=this,W=this.graph,ia=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,-ua=this.state.origin.y+W.view.translate.y;null==C&&(C=[]);var Ia=W.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ia.length){var Va=ia.getChildCells(Ia[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Ta=W.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Ia.length;ia++)mxUtils.bind(this,function(ab){var Pa=Ia[ab],Sa=null;if(W.isCellMovable(Pa.cell)){Sa=ab<Ia.length-1?Ia[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa.cell):null;var gb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:-Sa;Sa=null!=Ta[ab]?new J(Ta[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Sa=new mxHandle(Pa,"row-resize",null,Sa);Sa.tableHandle=!0;var fb=0;Sa.shape.node.parentNode.insertBefore(Sa.shape.node,Sa.shape.node.parentNode.firstChild);Sa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==fb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Ta[ab],0,fb),this.shape.updateBoundsFromLine();else{var eb=-W.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+fb*ka;this.shape.bounds.x=pa.x+(ab==Ia.length-1?0:eb.x*ka);this.shape.bounds.width=pa.width-(ab==Ia.length-1?0:eb.width+eb.x+ka)}this.shape.redraw()}};var cb=!1;Sa.setPosition=function(eb,lb,kb){fb=Math.max(Graph.minTableRowHeight-eb.height,lb.y-eb.y-eb.height);cb=mxEvent.isShiftDown(kb.getEvent());null!=gb&&cb&&(fb=Math.min(fb,gb.height-Graph.minTableRowHeight))};Sa.execute=function(eb){if(0!=-fb)W.setTableRowHeight(this.state.cell,fb,!cb);else if(!R.blockDelayedSelection){var lb=W.getCellAt(eb.getGraphX(),eb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Sa.reset=function(){fb=0}}C.push(Sa)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,function(ab){var Pa=W.view.getState(Va[ab]),Sa=W.getCellGeometry(Va[ab]),gb=null!=Sa.alternateBounds?Sa.alternateBounds:Sa;null==Pa&&(Pa=new mxCellState(W.view,Va[ab],W.getCellStyle(Va[ab])),Pa.x=pa.x+Sa.x*ka,Pa.y=pa.y+Sa.y*ka,-Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Sa=ab<Va.length-1?Va[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa):null;var fb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Wa[ab]?new J(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Sa);Pa.tableHandle=!0;var cb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);-Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Wa[ab],cb,0),this.shape.updateBoundsFromLine();else{var lb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(gb.width+cb)*ka;this.shape.bounds.y=pa.y+(ab==Va.length-1?0:lb.y*ka);this.shape.bounds.height=pa.height-(ab==Va.length-1?0:(lb.height+lb.y)*ka)}this.shape.redraw()}};var eb=!1;Pa.setPosition=function(lb,kb,ob){cb=-Math.max(Graph.minTableColumnWidth-gb.width,kb.x-lb.x-gb.width);eb=mxEvent.isShiftDown(ob.getEvent());null==fb||eb||(cb=Math.min(cb,fb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};C.push(Pa)})(ia)}}return null!=C?C.reverse():null};var T=-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=0;P<this.moveHandles.length;P++)null!=this.moveHandles[P]&&(this.moveHandles[P].node.style.visibility=C?"":"hidden");if(null!=this.cornerHandles)for(P=0;P<this.cornerHandles.length;P++)this.cornerHandles[P].node.style.visibility=C?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&-this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var C=this.isMoveHandlesVisible();C&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=-this.graph,P=C.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ia){if(null!=ia&&P.isVertex(ia.cell)&&C.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))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(P.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var C=0;C<this.cornerHandles.length;C++)null!=this.cornerHandles[C]&&null!=this.cornerHandles[C].node&&null!=this.cornerHandles[C].node.parentNode&&this.cornerHandles[C].node.parentNode.removeChild(this.cornerHandles[C].node);this.cornerHandles=null}};var V=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){V.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 C=0;4>C;C++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-C=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=-this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ia=this.customHandles[W].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){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),C.x=-this.sizers[0].bounds.width+P,C.y=this.sizers[0].bounds.height+P):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=function(C){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{C=this.state.view.scale;var P=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/C),P)+" x "+f(this.roundLength(this.bounds.height/-C),P)}C=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=C.y+C.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 X=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){X.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var fa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(C,P){fa.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 na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(C,P){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(C,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(P.x/ia-W.x);W=this.roundLength(P.y/ia-W.y);var pa=-this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*-R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(C.getGraphY(),P.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="'+-HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',+mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(B){return!mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(B){return l.apply(this,arguments)||this.graph.isTableRow(B)||this.graph.isTableCell(B)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=+function(B){return u.apply(this,arguments)||this.graph.isEdgeIgnored(B)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(B){return this.graph.isCloneEvent(B)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var B=new mxEllipse(null,this.highlightColor,this.highlightColor,0);B.opacity=mxConstants.HIGHLIGHT_OPACITY;return B};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var P in this.graph.currentEdgeStyle)B.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)B.style[P]=W[P]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};+var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),P=B.getCell;B.getCell=mxUtils.bind(this,function(R){var W=P.apply(this,arguments);this.error=null;return W});+return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",P="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<P.length;R++)null!=+this.currentEdgeStyle[P[R]]&&(B+=P[R]+"="+this.currentEdgeStyle[P[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize++";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(B+="elbow="+this.currentEdgeStyle.elbow+";");return B=null!=this.currentEdgeStyle.html?B+("html="+this.currentEdgeStyle.html+";"):B+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var B=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=+B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,P){P=null!=P?P:{};for(var R=0;R<B.length;R++){var W=B[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ia=this.model.getChildCount(W),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(B,P,R){R=null!=R?R:{};for(var W in B){var ia=P[W];null==R[ia]&&(R[ia]=B[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(B,+P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ia=new mxCodec(B.ownerDocument),ka=new mxGraphModel;ia.decode(B,ka);B=[];ia={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=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]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=+ka.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ja=this.getBoundingBoxFromGeometry(B,!0);null!=Ja&&this.moveCells(B,P-Ja.x,R-Ja.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var P={},R=this.cloneCells(B,null,P),W=+new mxDictionary,ia=0;ia<B.length;ia++)W.put(B[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==W.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(P,+this.createCellLookup(B)),R);return ka.encode(pa)};Graph.prototype.isSwimlane=function(B,P){var R=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(R=this.getCurrentCellStyle(B,P)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&H.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&S.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var E=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var P=this.model.getParent(B);if(null!=P){var R=this.getCurrentCellStyle(P);if(null!=R.expand)return"0"!=R.expand}return E.apply(this,arguments)&&(null==P||!this.isTable(P))};var Q=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(B,P,R,W,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==P.length&&this.model.isVertex(P[0])){var ua=this.getCellGeometry(P[0]);if(null!=ua&&!ua.relative){var Ja=new mxRectangle(ua.x+W,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ja.intersectsPoint(Va[Oa].x,+Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}R=Q.apply(this,[B,P,R,W,ia,ka,pa,xa]);this.model.setValue(R,"");var Sa=this.getChildCells(R,!0);for(Oa=0;Oa<Sa.length;Oa++)ra=this.getCellGeometry(Sa[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Sa[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);+if(null!=Pa){var Qa=this.getCurrentCellStyle(Pa);null!=Qa&&"1"==Qa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,P,R){if(P||R)c.apply(this,arguments);else{var W=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==W)ia=ka.length-1;else if(B&&null==W&&0<ka.length||null!=ia&&B&&ka.length>ia||!B&&0<ia)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(B?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};Graph.prototype.swapShapes=function(B,P){if(this.model.isVertex(B)&&this.model.isVertex(P)&&+2==this.getMovableCells([B,P]).length){var R=this.getCellGeometry(B),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ia=R.clone(),ka=W.clone();this.model.beginUpdate();try{ia.x=W.getCenterX()-R.width/2,ia.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,P,R,W,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=+[],ra=0;ra<B.length;ra++)this.isTable(B[ra])?xa=xa.concat(this.model.getChildCells(B[ra],!0).reverse()):xa.push(B[ra]);B=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<B.length;ra++)if(null!=ia&&this.isTableRow(B[ra])){var ua=this.model.getParent(B[ra]),Ja=this.getCellGeometry(B[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ja&&this.isTable(ua)&&this.isTable(ia)&&(W||ua!=ia)){if(!W){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ja.height,this.model.setGeometry(ua,+Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ja.height,this.model.setGeometry(ia,Va));var Oa=this.model.getChildCells(ia,!0);if(0<Oa.length){B[ra]=W?this.cloneCell(B[ra]):B[ra];var Sa=this.model.getChildCells(B[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Sa.length;if(0<Pa)for(var Qa=0;Qa<Pa;Qa++){var gb=this.cloneCell(Sa[Sa.length-1]);null!=gb&&(gb.value="",this.model.add(B[ra],gb))}else if(0>Pa)for(Qa=0;Qa>Pa;Qa--)this.model.remove(Sa[Sa.length+Qa-1]);Sa=this.model.getChildCells(B[ra],+!0);for(Qa=0;Qa<Za.length;Qa++){var fb=this.getCellGeometry(Za[Qa]),cb=this.getCellGeometry(Sa[Qa]);null!=fb&&null!=cb&&(cb=cb.clone(),cb.width=fb.width,this.model.setGeometry(Sa[Qa],cb))}}}}var eb=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!W&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);W&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(B)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;+Graph.prototype.removeCells=function(B,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<B.length;W++)if(this.isTableCell(B[W])){var ia=this.model.getParent(B[W]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(B,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(B[W],"")}else{if(this.isTableRow(B[W])&&(ka=this.model.getParent(B[W]),0>mxUtils.indexOf(B,ka)&&0>mxUtils.indexOf(R,ka))){for(var pa=this.model.getChildCells(ka,+!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&R.push(ka)}R.push(B[W])}R=m.apply(this,[R,P])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(B,P,R){R=null!=R?R:new Graph;for(var W=0;W<P.length;W++)null!=P[W]&&R.updateCustomLinksForCell(B,P[W],R)};Graph.prototype.updateCustomLinksForCell=function(B,P){this.doUpdateCustomLinksForCell(B,P);for(var R=this.model.getChildCount(P),W=0;W<R;W++)this.updateCustomLinksForCell(B,this.model.getChildAt(P,+W))};Graph.prototype.doUpdateCustomLinksForCell=function(B,P){};Graph.prototype.getAllConnectionConstraints=function(B,P){if(null!=B){P=mxUtils.getValue(B.style,"points",null);if(null!=P){B=[];try{var R=JSON.parse(P);for(P=0;P<R.length;P++){var W=R[P];B.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return B}if(null!=B.shape&&null!=B.shape.bounds){W=B.shape.direction;P=B.shape.bounds;var ia=B.shape.scale;R=P.width/+ia;P=P.height/ia;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=B.shape.getConstraints(B.style,R,P);if(null!=P)return P;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var P=this.getCurrentCellStyle(B);P=mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?+mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[B])}};Graph.prototype.isValidRoot=function(B){for(var P=this.model.getChildCount(B),R=0,W=0;W<P;W++){var ia=this.model.getChildAt(B,W);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,P,R){for(var W=this.getCurrentCellStyle(B),ia=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ia=ia&&this.isTable(P[pa]),+ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ka||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var P=+mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(P&&null!=B&&null!=this.layoutManager){var R=this.model.getParent(B);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(P=!1))}return P};Graph.prototype.getPreferredSizeForCell=function(B,P,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=+function(B,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ka=B[ia];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ra=R.getGeometry(ka);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ja=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ja,!0);R.setGeometry(ka,ra);var Va=this.view.getState(ka),Oa=this.view.getState(pa),Sa=+this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Sa?this.getConnectionConstraint(Va,Sa,!1):null;this.setConnectionConstraint(ka,pa,!0,Pa);this.setConnectionConstraint(ka,xa,!1,Za);var Qa=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,+Qa,[ka])}W.push(ka)}}else if(R.isVertex(ka)&&(ra=this.getCellGeometry(ka),null!=ra)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var gb=ra.width;ra.width=ra.height;ra.height=gb;R.setGeometry(ka,ra)}var fb=this.view.getState(ka);if(null!=fb){var cb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(fb.style,+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,cb[mxUtils.mod(mxUtils.indexOf(cb,eb)+(P?-1:1),cb.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof+mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var P=B.cell;this.isTableCell(P)&&(P=this.model.getParent(P));this.isTableRow(P)&&(P=this.model.getParent(P));var R=this.view.getState(P);null!=R&&null!=R.shape&&(this.view.invalidate(P),R.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};+Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var P=0;P<B.length;P++){var R=this.view.getState(B[P]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(B[P]):this.isReplacePlaceholders(B[P])&&this.view.invalidate(B[P],!1,!1)}};Graph.prototype.replaceElement=function(B,P){P=B.ownerDocument.createElement(null!=P?P:"span");for(var R=Array.prototype.slice.call(B.attributes);attr=+R.pop();)P.setAttribute(attr.nodeName,attr.nodeValue);P.innerHTML=B.innerHTML;B.parentNode.replaceChild(P,B)};Graph.prototype.processElements=function(B,P){if(null!=B){B=B.getElementsByTagName("*");for(var R=0;R<B.length;R++)null!=B[R]&&P(B[R])}};Graph.prototype.updateLabelElements=function(B,P,R){B=null!=B?B:this.getSelectionCells();for(var W=document.createElement("div"),ia=0;ia<B.length;ia++){var ka=this.getCurrentCellStyle(B[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(B[ia]),+null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(B[ia],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var W=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||+null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(W)){this.setAttributeForCell(ia,W,P);break}ia=this.model.getParent(ia)}var ka=B.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(B){if(null!=B){for(var P=new mxDictionary,+R=0;R<B.length;R++)P.put(B[R],!0);var W=[];for(R=0;R<B.length;R++){var ia=this.model.getParent(B[R]);null==ia||P.get(ia)||(P.put(ia,!0),W.push(ia))}for(R=0;R<W.length;R++)if(ia=this.view.getState(W[R]),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++)P.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,+arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var P=[],R=0;R<B.length;R++)this.isCellDeletable(B[R])&&this.isTransparentState(this.view.getState(B[R]))&&P.push(B[R]);B=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,P){this.setAttributeForCell(B,"link",P)};Graph.prototype.setTooltipForCell=function(B,P){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"++Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,R,P)};Graph.prototype.getAttributeForCell=function(B,P,R){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(P):null;return null!=B?B:R};Graph.prototype.setAttributeForCell=function(B,P,R){if(null!=B.value&&"object"==typeof B.value)var W=B.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),W.setAttribute("label",B.value||"");null!=R?W.setAttribute(P,R):W.removeAttribute(P);+this.model.setValue(B,W)};Graph.prototype.isTargetShape=function(B,P,R){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(R=0;R<P.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(P[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,P,R,W){if(mxEvent.isAltDown(P))return null;for(var ia=0;ia<B.length;ia++){var ka=this.model.getParent(B[ia]);if(this.model.isEdge(ka)&&+0>mxUtils.indexOf(B,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ia=0;ia<B.length&&pa;ia++)pa=pa&&this.isTableRow(B[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(B){mxGraph.prototype.click.call(this,B);this.firstClickState=B.getState();this.firstClickSource=B.getSource()};Graph.prototype.dblClick=function(B,P){this.isEnabled()&&(P=this.insertTextForEvent(B,+P),mxGraph.prototype.dblClick.call(this,B,P))};Graph.prototype.insertTextForEvent=function(B,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ia=mxEvent.getSource(B);this.firstClickState!=W||this.firstClickSource!=ia||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(B)))||+(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var B=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),+ia=this.getPageSize();P=Math.max(P,W.x*ia.width);R=Math.max(R,W.y*ia.height)}return new mxPoint(this.snap(P+B),this.snap(R+B))};Graph.prototype.getFreeInsertPoint=function(){var B=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/B.scale-B.translate.x+(0==P.width?2*this.gridSize:0))));B=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/B.scale-B.translate.y+2*this.gridSize)));return new mxPoint(W,B)};Graph.prototype.getCenterInsertPoint=function(B){B=+null!=B?B: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-B.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-B.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round(this.container.clientHeight/+2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,P){B=null!=B?B:"";null!=P&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+P+";");return B};Graph.prototype.addText=function(B,P,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ia=this.view.getRelativePoint(R,B,P);W.geometry.x=Math.round(1E4*ia.x)/1E4;W.geometry.y=Math.round(ia.y);W.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((B-ia.x)/ka),Math.round((P-ia.y)/ka))}else ia=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),W.geometry.width=+40,W.geometry.height=20,W.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ia.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(B,P,R){var W=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");+if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ja=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ja&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ja),null!=P&&mxEvent.addGestureListeners(ra[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=B&&""!=B&&B!=mxConstants.NONE?new mxCellHighlight(pa,B,4):null,startX:0,+startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ua=ra.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ra=pa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ja,Va,Oa){return null==pa.getLinkForCell(Ja.cell)}),ua=null==ua||pa.model.isAncestor(ra,ua.cell)?pa.view.getState(ra):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ua){this.startX=+ua.getGraphX();this.startY=ua.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(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ka||ua>ka)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;+null!=ra?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ra,ua){var Ja=ua.getSource();for(ra=ua.getEvent();null!=Ja&&"a"!=Ja.nodeName.toLowerCase();)Ja=Ja.parentNode;null==Ja&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<+ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ja=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ja||null==P||P(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:+mxEvent.isMiddleMouseButton(ra)?"_blank":Ja?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),+pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},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(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(B,P){B=null!=B?B:this.getSelectionCells();+P=null!=P?P:!0;for(var R=0;R<B.length;R++)this.isTableCell(B[R])&&(B[R]=this.model.getParent(B[R]));B=this.model.getTopmostCells(B);var W=this.getModel(),ia=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(R=0;R<B.length;R++){var ua=W.getParent(B[R]);if(null!=ua){var Ja=this.moveCells([ra[R]],ia,ia,!1)[0];ka.push(Ja);if(P)W.add(ua,ra[R]);else{var Va=ua.getIndex(B[R]);W.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),+Sa=this.getCellGeometry(ua);null!=Oa&&null!=Sa&&(Sa=Sa.clone(),Sa.height+=Oa.height,W.setGeometry(ua,Sa))}}else ka.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(B,P,R){if(null!=B&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ka=0;ka<W.length;ka++)ia.push(W[ka]);document.execCommand("insertimage",+!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ka=B.length-1;0<=ka;ka--)if(0==ka||B[ka]!=ia[ka-1]){B[ka].setAttribute("width",P);B[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=0;W<P.length;W++)R.push(P[W]);document.execCommand("createlink",!1,mxUtils.trim(B));+P=this.cellEditor.textarea.getElementsByTagName("a");if(P.length==R.length+1)for(W=P.length-1;0<=W;W--)if(P[W]!=R[W-1]){for(P=P[W].getElementsByTagName("a");0<P.length;){for(R=P[0].parentNode;null!=P[0].firstChild;)R.insertBefore(P[0].firstChild,P[0]);R.removeChild(P[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var P=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&+!this.isTableRow(B)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ia=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ra=this.view.getState(P[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=B?ra.width:ra.height);+W.push(ra)}}if(2<W.length){W.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=B?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ka=ka/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ja=(ia-ka-pa)/(W.length-1),Va=ka+(R?B?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Oa=this.view.getState(this.model.getParent(W[xa].cell)),Sa=this.getCellGeometry(W[xa].cell);Va+=Ja;null!=Sa&&null!=+Oa&&(Sa=Sa.clone(),B?Sa.x=Math.round(Va-(R?0:Sa.width/2))-Oa.origin.x:Sa.y=Math.round(Va-(R?0:Sa.height/2))-Oa.origin.y,this.getModel().setGeometry(W[xa].cell,Sa));R&&(Va+=B?W[xa].width:W[xa].height)}}finally{this.getModel().endUpdate()}}}return P};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(R,W,ia){W.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=+0;ia<R.value.attributes.length;ia++){var ka=R.value.attributes[ia];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=B.visitStatesRecursive;B.visitStatesRecursive=function(R,W,ia){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),+Editor.addSvgMetadata);ka.appendChild(W.root);P.apply(this,arguments);W.root=ka}};B.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});B.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var P=null;null!=B&&0<B.length&&(B=JSON.parse(B),P=new mxImage(B.src,B.width,B.height));return P};Graph.prototype.getBackgroundImageObject=function(B){return B};+Graph.prototype.getSvg=function(B,P,R,W,ia,ka,pa,xa,ra,ua,Ja,Va,Oa,Sa,Za,Pa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ja=0;Ja<Sa.length;Ja++)Qa.put(Sa[Ja],!0);Sa=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Sa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var fb="page"==Oa?this.view.getBackgroundPageBounds():ka&&null==Qa||W||+"diagram"==Oa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),cb=this.backgroundImage,eb=this.view.translate,lb=this.view.scale;"diagram"==Oa&&null!=cb&&null!=cb.width&&null!=cb.height&&(fb=mxRectangle.fromRectangle(fb),fb.add(new mxRectangle((eb.x+cb.x)*lb,(eb.y+cb.y)*lb,cb.width*lb,cb.height*lb)));if(null==fb)throw Error(mxResources.get("drawingEmpty"));W=P/lb;var kb=Math.max(1,Math.ceil(fb.width*W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);+ia=ia?-.5:0;var hb=mxUtils.getLightDarkColor(B),pb=Graph.createSvgNode(ia,ia,kb,ob,hb),sb=pb.ownerDocument;if(null!=B){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"g");pb.appendChild(mb);var nb=this.createSvgCanvas(mb);nb.translate(Math.floor(R/+P-fb.x/lb),Math.floor(R/P-fb.y/lb));nb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=nb.getAlternateText;nb.getAlternateText=function(bb,yb,tb,xb,vb,rb,Db,Fb,d,p,A,t,z){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var D=Math.ceil(2*xb/this.state.fontSize),G=[],ea=0,N=0;(0==D||ea<D)&&N<rb.length;){var ta=rb.charCodeAt(N);if(10==ta||13==ta){if(0<ea)break}else G.push(rb.charAt(N)),+255>ta&&ea++;N++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(B=lb/P,ia=new mxRectangle((cb.x+eb.x)*B,(cb.y+eb.y)*B,cb.width*B,cb.height*B),mxUtils.intersects(fb,ia)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);nb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var zb=xa.getLinkForCellState;xa.getLinkForCellState=+function(bb,yb){var tb=bb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==tb||bb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(bb,yb){return bb.view.graph.getLinkTargetForCell(bb.cell)};var Cb=xa.drawCellState,Ab=null,Bb=mxUtils.bind(this,function(){if(null==Ab){Ab="ge-flow-animation-"+Editor.guid();var bb=null!=sb.createElementNS?sb.createElementNS(mxConstants.NS_SVG,"style"):sb.createElement("style");bb.innerHTML=this.createFlowAnimationCss(Ab);sb.getElementsByTagName("defs")[0].appendChild(bb)}return Ab});+xa.drawCellState=function(bb,yb){for(var tb=bb.view.graph,xb=null!=Qa?Qa.get(bb.cell):tb.isCellSelected(bb.cell),vb=tb.model.getParent(bb.cell);!(ka&&null==Qa||xb)&&null!=vb;)xb=null!=Qa?Qa.get(vb):tb.isCellSelected(vb),vb=tb.model.getParent(vb);if(null!=bb.shape)try{var rb=bb.shape.isFlowAnimationEnabled,Db=bb.shape.addFlowAnimationToShape;bb.shape.isFlowAnimationEnabled=function(){return gb&&tb.model.isEdge(bb.cell)&&"1"==mxUtils.getValue(bb.style,"flowAnimation","0")};bb.shape.addFlowAnimationToShape=+function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),bb.style,P,Bb())};if(ka&&null==Qa||xb)tb.view.redrawEnumerationState(bb),Cb.apply(this,arguments),this.doDrawShape(bb.secondLabel,yb)}finally{bb.shape.isFlowAnimationEnabled=rb,bb.shape.addFlowAnimationToShape=Db}};var wb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(wb),nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ra,!0);return pb}finally{this.enableFlowAnimation=+gb,Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=B.createElement("switch"),W=B.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||P.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"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);R.appendChild(W);ia.appendChild(B);R.appendChild(ia);P.appendChild(R)}};+Graph.prototype.disableSvgLinks=function(B,P){B=B.getElementsByTagName("a");for(var R=0;R<B.length;R++){var W=B[R].getAttribute("href");null==W&&(W=B[R].getAttribute("xlink:href"));null!=W&&(B[R].style.pointerEvents="none",B[R].setAttribute("href",""));P&&P(B[R])}};Graph.prototype.updateSvgLinks=function(B,P,R){B=B.getElementsByTagName("a");for(var W=0;W<B.length;W++)if(null==B[W].getAttribute("target")){var ia=B[W].getAttribute("href");null==ia&&(ia=B[W].getAttribute("xlink:href"));null!=ia&&(null!=+P&&/^https?:\/\//.test(ia)?B[W].setAttribute("target",P):R&&this.isCustomLink(ia)&&B[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var P=window.getSelection();P.getRangeAt&&P.rangeCount&&(B=P.getRangeAt(0).commonAncestorContainer)}else document.selection&&+(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,P,R){for(;null!=B&&B.nodeName!=P;){if(B==R)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,P,R){for(;null!=B&&!(0<=mxUtils.indexOf(P,B.nodeName));){if(B==R)return null;+B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var P=null;if(window.getSelection){if(P=window.getSelection(),P.getRangeAt&&P.rangeCount){var R=document.createRange();R.selectNode(B);P.removeAllRanges();P.addRange(R)}}else(P=document.selection)&&"Control"!=P.type&&(B=P.createRange(),B.collapse(!0),R=P.createRange(),R.setEndPoint("StartToStart",B),R.select())};Graph.prototype.flipEdgePoints=function(B,P,R){var W=this.getCellGeometry(B);if(null!=W){W=W.clone();if(null!=W.points)for(var ia=+0;ia<W.points.length;ia++)P?W.points[ia].x=R+(R-W.points[ia].x):W.points[ia].y=R+(R-W.points[ia].y);ia=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ia(W.getTerminalPoint(!0));ia(W.getTerminalPoint(!1));this.model.setGeometry(B,W)}};Graph.prototype.flipChildren=function(B,P,R){this.model.beginUpdate();try{for(var W=this.model.getChildCount(B),ia=0;ia<W;ia++){var ka=this.model.getChildAt(B,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=+pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,P){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var R=[],W=0;W<B.length;W++)if(this.model.isEdge(B[W])){var ia=this.view.getState(B[W]);null!=ia&&this.flipEdgePoints(B[W],P,(P?ia.getCenterX():ia.getCenterY())/this.view.scale-(P?ia.origin.x:ia.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=+this.getCellGeometry(B[W]);null!=ka&&this.flipChildren(B[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(B[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,P){var R=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var W=0;W<B.length;W++){var ia=this.model.getParent(B[W]);if(this.isTable(ia)){var ka=this.getCellGeometry(B[W]),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(B):null;this.removeCells(B,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};Graph.prototype.insertTableColumn=function(B,P){var R=this.getModel();R.beginUpdate();try{var W=B,ia=0;if(this.isTableCell(B)){var ka=R.getParent(B);W=R.getParent(ka);+ia=mxUtils.indexOf(R.getChildCells(ka,!0),B)}else this.isTableRow(B)?W=R.getParent(B):B=R.getChildCells(W,!0)[0],P||(ia=R.getChildCells(B,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=R.getChildCells(pa[B],!0)[ia],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ja=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ja){null!=Ja.alternateBounds&&(Ja.width=+Ja.alternateBounds.width,Ja.height=Ja.alternateBounds.height,Ja.alternateBounds=null);xa=Ja.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ja.height=Va.height)}R.add(pa[B],ua,ia+(P?0:1))}var Oa=this.getCellGeometry(W);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(W,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(B){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:P.getParent(B);var W=P.getChildCells(R,!0);0==+W.length?P.remove(R):(R==B&&(B=W[W.length-1]),P.remove(B))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(B,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){W=B;var ia=R.getChildCells(W,!0);B=ia[P?0:ia.length-1]}else W=R.getParent(B);var ka=W.getIndex(B);B=R.cloneCell(B,!1);B.value=null;R.add(W,B,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(B,P){var R=this.getModel();R.beginUpdate();try{var W=+B,ia=B;if(this.isTableCell(B))ia=R.getParent(B),W=R.getParent(ia);else if(this.isTableRow(B))W=R.getParent(B);else{var ka=R.getChildCells(W,!0);ia=ka[P?0:ka.length-1]}var pa=R.getChildCells(ia,!0),xa=W.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ka=0;ka<pa.length;ka++){B=R.cloneCell(pa[ka],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&+(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}R.add(W,ia,xa+(P?0:1));var Ja=this.getCellGeometry(W);null!=Ja&&(Ja=Ja.clone(),Ja.height+=ra.height,R.setGeometry(W,Ja))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var P=this.getModel();P.beginUpdate();try{var R=B,W=B;this.isTableCell(B)&&(W=P.getParent(B));this.isTableRow(W)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(0==ia.length)P.remove(R);+else{this.isTableRow(W)||(W=ia[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ka,B));for(W=B=0;W<ia.length;W++){var xa=P.getChildCells(ia[W],!0)[pa];P.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=B,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var P=this.getModel();P.beginUpdate();+try{var R=B,W=B;this.isTableCell(B)&&(B=W=P.getParent(B));this.isTableRow(B)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(1>=ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[ia.length-1]);P.remove(W);B=0;var ka=this.getCellGeometry(W);null!=ka&&(B=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=B,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(B,P){for(var R=B.tBodies[0],W=R.rows[0].cells,ia=B=0;ia<W.length;ia++){var ka=W[ia].getAttribute("colspan");+B+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ia=0;ia<B;ia++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(B,P){B.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(B,P){var R=B.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ia=document.createElement("th");R.rows[W].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(R=0;R<B.rows.length;R++)W=B.rows[R].insertCell(P),mxUtils.br(W);return B.rows[0].cells[0<=P?P:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=+function(B,P){if(0<=P){B=B.tBodies[0].rows;for(var R=0;R<B.length;R++)B[R].cells.length>P&&B[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");R.innerHTML=B;B=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=B.appendChild(W);P.insertNode(B)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(B)};+Graph.prototype.createLinkForHint=function(B,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}B=null!=B?B:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",W(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&+ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,W(P,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(B,R);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 B=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=+B.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 P=!1,R=!1,W=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,+pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=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||+!W&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||P&&this.isCellSelected(pa.getCell())));xa=!P||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};+mxCellEditor.prototype.isContentEditing=function(){var B=this.graph.view.getState(this.editingCell);return null!=B&&1==B.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var B="";window.getSelection?B=window.getSelection():document.getSelection?B=document.getSelection():document.selection&&(B=document.selection.createRange().text);return""!=+B};mxCellEditor.prototype.insertTab=function(B){var P=this.textarea.ownerDocument.defaultView.getSelection(),R=P.getRangeAt(0);B=Graph.createTabNode(B);R.insertNode(B);R.setStartAfter(B);R.setEndAfter(B);P.removeAllRanges();P.addRange(R)};mxCellEditor.prototype.alignText=function(B,P){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ia=null!=+P&&mxEvent.isShiftDown(P);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(B)}W||document.execCommand("justify"+B.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var B=window.getSelection();if(B.getRangeAt&&B.rangeCount){for(var P=+[],R=0,W=B.rangeCount;R<W;++R)P.push(B.getRangeAt(R));return P}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var P=0,R=B.length;P<R;++P)sel.addRange(B[P])}else document.selection&&B.select&&B.select()}catch(W){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=+function(B){null!=B.text&&(B.text.replaceLinefeeds="0"!=mxUtils.getValue(B.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(B,P){this.isKeepFocusEvent(B)||!mxEvent.isAltDown(B.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(B){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;+mxCellEditor.prototype.startEditing=function(B,P){B=this.graph.getStartEditingCell(B,P);M.apply(this,arguments);var R=this.graph.view.getState(B);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);+if(null!=B){var P=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),R=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(P?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);+P=mxUtils.getValue(B.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&+pa.push("underline");(mxUtils.getValue(B.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(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=+P;this.textarea.style.textAlign=W;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(P?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;+this.textarea.style.fontSize=Math.round(ra)+"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=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,P){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var R=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var W=null!=B.text?B.text.margin:null;null==W&&(W=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,+mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=W.x*this.bounds.width;this.bounds.y+=W.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*R);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("+R+","++R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,P){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(B.cell,P);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;+mxCellEditor.prototype.setEditingValue=function(B,P){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(B.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(B){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,+Graph.backupStyleAttribute);var P=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(B.style,"nl2Br","1")?(P=P.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<P.length&&("<br/>"==P.substring(P.length-5)||"<br>"==P.substring(P.length-4))&&(P=P.substring(0,P.lastIndexOf("<br"))+"<div><br/></div>")):P=P.replace(/\r\n/g,"").replace(/\n/g,"");return P};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(B){this.codeViewMode&&this.toggleViewMode();K.apply(this,+arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var aa=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(B,P){this.graph.getModel().beginUpdate();try{aa.apply(this,arguments),""==P&&this.graph.isCellDeletable(B.cell)&&0==this.graph.model.getChildCount(B.cell)&&this.graph.isTransparentState(B)&&this.graph.removeCells([B.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=+function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getBorderColor=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getMinimumSize=function(B){var P=this.graph.getView().scale;return new mxRectangle(0,0,null==B.text?30:B.text.size*P+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;+mxGraphHandler.prototype.isValidDropTarget=function(B,P){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(P.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var P=this.graph.view.translate,R=this.graph.view.scale;B=this.roundLength((this.bounds.x++this.currentDx)/R-P.x);P=this.roundLength((this.bounds.y+this.currentDy)/R-P.y);R=this.graph.view.unit;this.hint.innerHTML=f(B,R)+", "+f(P,R);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 ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,P){ja.apply(this,arguments);var R=this.graph.getCellStyle(B);if(null==R.childLayout){var W=this.graph.model.getParent(B),ia=null!=W?this.graph.getCellGeometry(W):null;if(null!=ia&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);+ia=ia.clone();R?ia.height=P.height+pa.y+pa.height+2*ka:ia.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var P=ca.apply(this,arguments),R=new mxDictionary,W=this.graph.model,ia=[],ka=0;ka<P.length;ka++){var pa=P[ka];this.graph.isTableCell(pa)?B(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&+B(W.getParent(pa));B(pa)}return ia};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(B){return ba.apply(this,arguments)&&!mxEvent.isControlDown(B.getEvent())&&!mxEvent.isShiftDown(B.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.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 Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(B){var P=Y.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var da=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(B){var P=da.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=+function(){var B=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+B.x/2,this.bounds.y+this.rotationHandleVSpacing-B.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(B,P){return this.graph.isRecursiveVertexResize(B)&&!mxEvent.isAltDown(P.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(B,P){return mxEvent.isControlDown(P.getEvent())||mxEvent.isMetaDown(P.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;+mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 Z=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=+function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(B){return B.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var B=0;this.graph.isTableRow(this.state.cell)?B=1:this.graph.isTableCell(this.state.cell)&&+(B=2);return B};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,O=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var B=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(Za,+Pa,Qa){for(var gb=[],fb=0;fb<Za.length;fb++){var cb=Za[fb];gb.push(null==cb?null:new mxPoint((ra+cb.x+Pa)*ka,(ua+cb.y+Qa)*ka))}return gb},R=this,W=this.graph,ia=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+W.view.translate.x,ua=this.state.origin.y+W.view.translate.y;null==B&&(B=[]);var Ja=W.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ja.length){var Va=ia.getChildCells(Ja[0].cell,!0),Oa=W.getTableLines(this.state.cell,!1,!0),Sa=W.getTableLines(this.state.cell,+!0,!1);for(ia=0;ia<Ja.length;ia++)mxUtils.bind(this,function(Za){var Pa=Ja[Za],Qa=null;if(W.isCellMovable(Pa.cell)){Qa=Za<Ja.length-1?Ja[Za+1]:null;Qa=null!=Qa?W.getCellGeometry(Qa.cell):null;var gb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Sa[Za]?new J(Sa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Qa=new mxHandle(Pa,"row-resize",null,Qa);Qa.tableHandle=!0;var fb=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==fb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Sa[Za],0,fb),this.shape.updateBoundsFromLine();else{var eb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+fb*ka;this.shape.bounds.x=pa.x+(Za==Ja.length-1?0:eb.x*ka);this.shape.bounds.width=pa.width-(Za==Ja.length-1?0:eb.width+eb.x+ka)}this.shape.redraw()}};var cb=+!1;Qa.setPosition=function(eb,lb,kb){fb=Math.max(Graph.minTableRowHeight-eb.height,lb.y-eb.y-eb.height);cb=mxEvent.isShiftDown(kb.getEvent());null!=gb&&cb&&(fb=Math.min(fb,gb.height-Graph.minTableRowHeight))};Qa.execute=function(eb){if(0!=fb)W.setTableRowHeight(this.state.cell,fb,!cb);else if(!R.blockDelayedSelection){var lb=W.getCellAt(eb.getGraphX(),eb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Qa.reset=function(){fb=0}}B.push(Qa)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,+function(Za){var Pa=W.view.getState(Va[Za]),Qa=W.getCellGeometry(Va[Za]),gb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Pa&&(Pa=new mxCellState(W.view,Va[Za],W.getCellStyle(Va[Za])),Pa.x=pa.x+Qa.x*ka,Pa.y=pa.y+Qa.y*ka,Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Qa=Za<Va.length-1?Va[Za+1]:null;Qa=null!=Qa?W.getCellGeometry(Qa):null;var fb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Oa[Za]?new J(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,+mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Qa);Pa.tableHandle=!0;var cb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Oa[Za],cb,0),this.shape.updateBoundsFromLine();else{var lb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=+this.state.x+(gb.width+cb)*ka;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:lb.y*ka);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(lb.height+lb.y)*ka)}this.shape.redraw()}};var eb=!1;Pa.setPosition=function(lb,kb,ob){cb=Math.max(Graph.minTableColumnWidth-gb.width,kb.x-lb.x-gb.width);eb=mxEvent.isShiftDown(ob.getEvent());null==fb||eb||(cb=Math.min(cb,fb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=+W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};B.push(Pa)})(ia)}}return null!=B?B.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=0;P<this.moveHandles.length;P++)null!=this.moveHandles[P]&&(this.moveHandles[P].node.style.visibility=B?"":"hidden");if(null!=this.cornerHandles)for(P=+0;P<this.cornerHandles.length;P++)this.cornerHandles[P].node.style.visibility=B?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var B=this.isMoveHandlesVisible();B&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():B||null==this.moveHandles||this.destroyMoveHandles();if(B&&null==this.moveHandles){for(B=0;B<this.moveHandles.length;B++)null!=+this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,P=B.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ia){if(null!=ia&&P.isVertex(ia.cell)&&B.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))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(P.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=+this.moveHandles){for(var B=0;B<this.moveHandles.length;B++)null!=this.moveHandles[B]&&this.moveHandles[B].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var B=0;B<this.cornerHandles.length;B++)null!=this.cornerHandles[B]&&null!=this.cornerHandles[B].node&&null!=this.cornerHandles[B].node.parentNode&&this.cornerHandles[B].node.parentNode.removeChild(this.cornerHandles[B].node);this.cornerHandles=null}};var V=mxVertexHandler.prototype.refresh;+mxVertexHandler.prototype.refresh=function(){V.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 B=0;4>B;B++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",+mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(B,P)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;+null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ia=this.customHandles[W].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){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),B.x=this.sizers[0].bounds.width+P,B.y=this.sizers[0].bounds.height+P):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){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{B=this.state.view.scale;var P=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/B),P)+" x "+f(this.roundLength(this.bounds.height/B),P)}B=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==B&&(B=this.bounds);this.hint.style.left=B.x+Math.round((B.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=+B.y+B.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 X=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){X.apply(this,arguments);var B=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);this.updateLinkHint(B,P)};var fa=mxEdgeHandler.prototype.mouseMove;+mxEdgeHandler.prototype.mouseMove=function(B,P){fa.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 na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(B,P){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=+function(B,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(P.x/ia-W.x);W=this.roundLength(P.y/ia-W.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=+this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),P.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="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24);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="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxVertexHandler.prototype.rowHandleImage=Graph.createSvgImage(14,12,'<rect x="2" y="2" width="10" height="3" stroke-width="1" stroke="#ffffff" fill="'+HoverIcons.prototype.arrowFill+'"/><rect x="2" y="7" width="10" height="3" stroke-width="1" stroke="#ffffff" fill="'+HoverIcons.prototype.arrowFill+'"/>');mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=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=32;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(C){return!mxEvent.isShiftDown(C.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(C){return!mxEvent.isShiftDown(C.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(C){return mxEvent.isMouseEvent(C.getEvent())?-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(P)||mxEvent.isPopupTrigger(P)&&(null==C.getState()||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P))}}else mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return mxEvent.isLeftMouseButton(P)&&(this.useLeftButtonForPanning&&null==C.getState()||mxEvent.isControlDown(P)&&!mxEvent.isShiftDown(P))||this.usePopupTrigger&&mxEvent.isPopupTrigger(P)};-mxRubberband.prototype.isSpaceEvent=function(C){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(C.getEvent())||mxEvent.isMetaDown(C.getEvent()))&&mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(C,P){if(this.cancelled)this.cancelled=!1,P.consume();else{var R=-null!=this.div&&"none"!=this.div.style.display,W=null,ia=null,ka=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ia=this.first.y,C=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(C=this.graph.snap(C),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();-try{var pa=this.graph.getCellsBeyond(W,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ta=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(C,ka),this.graph.model.setGeometry(pa[R],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(C,-P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-C,ia=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(P)?(C=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||-(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,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=C-this.width),this.y<this.first.y&&(this.y=R-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(B){return!mxEvent.isShiftDown(B.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(B){return!mxEvent.isShiftDown(B.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(B){return mxEvent.isMouseEvent(B.getEvent())?+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(B){var P=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(P)||mxEvent.isPopupTrigger(P)&&(null==B.getState()||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P))}}else mxPanningHandler.prototype.isPanningTrigger=function(B){var P=B.getEvent();return mxEvent.isLeftMouseButton(P)&&(this.useLeftButtonForPanning&&null==B.getState()||mxEvent.isControlDown(P)&&!mxEvent.isShiftDown(P))||this.usePopupTrigger&&mxEvent.isPopupTrigger(P)};+mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,P){if(this.cancelled)this.cancelled=!1,P.consume();else{var R=+null!=this.div&&"none"!=this.div.style.display,W=null,ia=null,ka=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ia=this.first.y,B=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(B=this.graph.snap(B),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();+try{var pa=this.graph.getCellsBeyond(W,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ka),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(B,+P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);R.x-=B.x;R.y-=B.y;B=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-B,ia=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,R),this.isSpaceEvent(P)?(B=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||+(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,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=B-this.width),this.y<this.first.y&&(this.y=R-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)),P.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=-function(C,P,R,W){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(C){return mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())?!1:null!=this.currentTerminalState&&C.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(C,P,R){P=null!=C&&0==C;var W=this.state.getVisibleTerminalState(P);C=null!=C&&null!=this.state.absolutePoints&&(0==C||C>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==C)?this.graph.getConnectionConstraint(this.state,W,P):null;R=null!=(null!=C?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(P),C):null)?R?this.endFixedHandleImage:this.fixedHandleImage:-null!=C&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(C,P,R,W){W=P==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:P==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(C){if(null!=C&&1==C.length){var P=this.graph.getModel(),R=P.getParent(C[0]),W=this.graph.getCellGeometry(C[0]);if(P.isEdge(R)&&null!=W&&W.relative&&(P=this.graph.view.getState(C[0]),null!=P&&2>P.width&&2>P.height&&null!=P.text&&null!=P.text.boundingBox))return mxRectangle.fromRectangle(P.text.boundingBox)}return Ba.apply(this,-arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var C=Ga.apply(this,arguments),P=[],R=0;R<C.length;R++)"1"!=mxUtils.getValue(C[R].style,"part","0")&&P.push(C[R]);return P};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(C){var P=this.graph.getModel(),R=P.getParent(C.cell),W=this.graph.getCellGeometry(C.cell);return P.isEdge(R)&&null!=W&&W.relative&&2>C.width&&2>C.height&&null!=-C.text&&null!=C.text.boundingBox?(P=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var ra=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ia||!ia.relative||null==this.state||-2<=this.state.width||2<=this.state.height)&&ra.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var C=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),P=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&C==mxConstants.NONE&&P==mxConstants.NONE?(C=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,-C,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(C,P){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 Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=-function(C,P){Da.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(C,P){try{if(null==C&&(null==P||0==P.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),-this.linkHint=null);else if(null!=C||null!=P&&0<P.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-W.style.paddingLeft="4px";W.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!=C){var ia=document.createElement("div");-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(C,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=R.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=W.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!=P)for(ia=0;ia<P.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!=C||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ia=R.cloneNode(!0);ua.appendChild(Ia);var Va=mxUtils.bind(this,function(Wa){var Ta=-document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Ta.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,Ta.innerHTML)}});mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Va);mxEvent.consume(Wa)}));Ia=W.cloneNode(!0);ua.appendChild(Ia);mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){Va();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(P[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,-arguments);C.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return C};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var C=0;C<this.moveHandles.length;C++)null!=-this.moveHandles[C]&&(this.moveHandles[C].bounds.x=Math.round(this.moveHandles[C].rowState.x+this.moveHandles[C].rowState.width-this.moveHandles[C].bounds.width/2),this.moveHandles[C].bounds.y=Math.round(this.moveHandles[C].rowState.y+(this.moveHandles[C].rowState.height-this.moveHandles[C].bounds.height)/2),this.moveHandles[C].redraw());if(null!=this.cornerHandles){C=this.getSelectionBorderInset();var P=this.cornerHandles,R=P[0].bounds.height/2;P[0].bounds.x=this.state.x-P[0].bounds.width/2+C;P[0].bounds.y=-this.state.y-R+C;P[0].redraw();P[1].bounds.x=P[0].bounds.x+this.state.width-2*C;P[1].bounds.y=P[0].bounds.y;P[1].redraw();P[2].bounds.x=P[0].bounds.x;P[2].bounds.y=this.state.y+this.state.height-2*C;P[2].redraw();P[3].bounds.x=P[1].bounds.x;P[3].bounds.y=P[2].bounds.y;P[3].redraw();for(C=0;C<this.cornerHandles.length;C++)this.cornerHandles[C].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":"");Oa.apply(this);null!=this.state&&null!=this.linkHint&&(C=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),P=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(P,this.state.style[mxConstants.STYLE_ROTATION]||"0",C),C=null!=R?mxUtils.getBoundingBox(this.state,-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,P=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=P&&(R=Math.max(R,P.y+P.height)),this.linkHint.style.left=C.x+C.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Qa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Qa.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 Ra=mxEdgeHandler.prototype.redrawHandles;-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ra.apply(this),null!=this.state&&null!=this.linkHint)){var C=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(C=new mxRectangle(C.x,C.y,C.width,C.height),C.add(this.state.text.bounds));this.linkHint.style.left=C.x+C.width/2+"px";this.linkHint.style.top=Math.round(C.y+C.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.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,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function E(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function c(){mxShape.call(this)}+function(B,P,R,W){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,P,R){P=null!=B&&0==B;var W=this.state.getVisibleTerminalState(P);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,W,P):null;R=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(P),B):null)?R?this.endFixedHandleImage:this.fixedHandleImage:+null!=B&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,P,R,W){W=P==mxEvent.ROTATION_HANDLE?+HoverIcons.prototype.rotationHandle:P==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var P=this.graph.getModel(),R=P.getParent(B[0]),W=this.graph.getCellGeometry(B[0]);if(P.isEdge(R)&&null!=W&&W.relative&&(P=this.graph.view.getState(B[0]),null!=P&&2>P.width&&2>P.height&&null!=P.text&&null!=P.text.boundingBox))return mxRectangle.fromRectangle(P.text.boundingBox)}return Ba.apply(this,+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),P=[],R=0;R<B.length;R++)"1"!=mxUtils.getValue(B[R].style,"part","0")&&P.push(B[R]);return P};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var P=this.graph.getModel(),R=P.getParent(B.cell),W=this.graph.getCellGeometry(B.cell);return P.isEdge(R)&&null!=W&&W.relative&&2>B.width&&2>B.height&&null!=+B.text&&null!=B.text.boundingBox?(P=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ia||!ia.relative||null==this.state||+2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var B=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),P=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&B==mxConstants.NONE&&P==mxConstants.NONE?(B=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,+B,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(B,P){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 Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=+function(B,P){Da.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(B,P){try{if(null==B&&(null==P||0==P.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),+this.linkHint=null);else if(null!=B||null!=P&&0<P.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));+W.style.paddingLeft="4px";W.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!=B){var ia=document.createElement("div");+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,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=R.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=W.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!=P)for(ia=0;ia<P.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ja=R.cloneNode(!0);ua.appendChild(Ja);var Va=mxUtils.bind(this,function(Oa){var Sa=+document.createElement("div");Sa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Za=Sa.getElementsByTagName("a")[ra];if(null!=Za){if(null==Oa||""==Oa){for(Oa=Za.cloneNode(!0).firstChild;null!=Oa;)Za.parentNode.insertBefore(Oa.cloneNode(!0),Za),Oa=Oa.nextSibling;Za.parentNode.removeChild(Za)}else Za.setAttribute("href",Oa);this.graph.labelChanged(this.state.cell,Sa.innerHTML)}});mxEvent.addListener(Ja,"click",mxUtils.bind(this,function(Oa){this.graph.showLinkDialog(xa.getAttribute("href")||+"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ja=W.cloneNode(!0);ua.appendChild(Ja);mxEvent.addListener(Ja,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(P[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var B=va.apply(this,+arguments);B.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return B};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.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 B=0;B<this.moveHandles.length;B++)null!=+this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var P=this.cornerHandles,R=P[0].bounds.height/2;P[0].bounds.x=this.state.x-P[0].bounds.width/2+B;P[0].bounds.y=+this.state.y-R+B;P[0].redraw();P[1].bounds.x=P[0].bounds.x+this.state.width-2*B;P[1].bounds.y=P[0].bounds.y;P[1].redraw();P[2].bounds.x=P[0].bounds.x;P[2].bounds.y=this.state.y+this.state.height-2*B;P[2].redraw();P[3].bounds.x=P[1].bounds.x;P[3].bounds.y=P[2].bounds.y;P[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].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&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),P=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(P,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=R?mxUtils.getBoundingBox(this.state,+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,P=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=P&&(R=Math.max(R,P.y+P.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ta=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ta.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 Ua=mxEdgeHandler.prototype.redrawHandles;+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ua.apply(this),null!=this.state&&null!=this.linkHint)){var B=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(B=new mxRectangle(B.x,B.y,B.width,B.height),B.add(this.state.text.bounds));this.linkHint.style.left=B.x+B.width/2+"px";this.linkHint.style.top=Math.round(B.y+B.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=+function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.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,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function E(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function c(){mxShape.call(this)}function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function I(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function Y(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}-function U(){mxShape.call(this)}function X(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Oa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){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 ua(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function ab(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=-!0;this.indent=2;this.rectOutline="single"}function Sa(){mxConnector.call(this)}function gb(){mxConnector.call(this)}function fb(d,p,A,t,z,D,G,ea,O,sa){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=D*(2*G+O);z*=G+O;D*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-D-G,2*G,2*G);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function Y(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function O(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}+function U(){mxShape.call(this)}function X(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Ua(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ia(){mxEllipse.call(this)}+function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ja(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function gb(){mxConnector.call(this)}function fb(d,p,A,t,z,D,G,ea,N,ta){G+=N;var ma=t.clone();t.x-=z*(2*G+N);t.y-=D*(2*G+N);z*=G+N;D*=G+N;return function(){d.ellipse(ma.x-z-G,ma.y-D-G,2*G,2*G);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var D=0;D<p.length;D++){var G=p[D];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var A=null,t=0;t<this.line.length&&!p;t++){var z=this.line[t];null!=z&&null!=A&&(p=mxUtils.rectangleIntersectsSegment(d,A,z));A=z}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(f,mxSwimlane);f.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};f.prototype.paintVertexShape=function(d,p,A,t,z){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,G=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ia.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));D||this.outline||!(G&&ea<z||!G&&ea<t)||this.paintForeground(d,p,A,t,z)};f.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.state){var D=this.flipH,G=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=D;D=G;G=ea}d.rotate(-this.getShapeRotation(),+!1,G=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ja.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));D||this.outline||!(G&&ea<z||!G&&ea<t)||this.paintForeground(d,p,A,t,z)};f.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.state){var D=this.flipH,G=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=D;D=G;G=ea}d.rotate(-this.getShapeRotation(),D,G,p+t/2,A+z/2);s=this.scale;p=this.bounds.x/s;A=this.bounds.y/s;t=this.bounds.width/s;z=this.bounds.height/s;this.paintTableForeground(d,p,A,t,z)}};f.prototype.paintTableForeground=function(d,p,A,t,z){t=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(z=0;z<t.length;z++)b.prototype.paintTableLine(d,t[z],p,A)};f.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",f);mxUtils.extend(l,f);l.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",l);mxUtils.extend(u,mxCylinder);u.prototype.size=20;u.prototype.darkOpacity=0;u.prototype.darkOpacity2=0;u.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-D,0);d.lineTo(t,D);d.lineTo(t,z);d.lineTo(D,z);d.lineTo(0,z-D);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(t-D,0),d.lineTo(t,D),d.lineTo(D,D),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,z),d.lineTo(0,z-D),d.close(),d.fill()),d.begin(),d.moveTo(D,z),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(t,D),d.end(),d.stroke())};u.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",-u);var cb=Math.tan(mxUtils.toRadians(30)),eb=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!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,+u);var cb=Math.tan(mxUtils.toRadians(30)),eb=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!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!=A&&A();null!=t&&t()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,t,z){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(t-D),A+.5*(z-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};mxCellRenderer.registerShape("waypoint",-q);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/cb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*eb);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-eb)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,p,A,t,z,D){p=Math.min(t,z/(.5+cb));D?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-eb)*p),d.lineTo(p,.25*p),d.moveTo(.5*+q);mxUtils.extend(C,mxActor);C.prototype.size=20;C.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/cb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*eb);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-eb)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,p,A,t,z,D){p=Math.min(t,z/(.5+cb));D?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-eb)*p),d.lineTo(p,.25*p),d.moveTo(.5*p,(.5-eb)*p),d.lineTo(.5*p,(1-eb)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*eb),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-eb)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,t,z,D){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),D||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),D||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),D||(d.stroke(),d.begin()),d.translate(0,-p);D||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),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(E,mxCylinder);E.prototype.size=30;E.prototype.darkOpacity=0;E.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-D,0);d.lineTo(t,D);d.lineTo(t,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),@@ -2770,8 +2770,8 @@ c);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=fut,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"lid",!0);d.translate(p,A);0==D?(d.rect(0,0,t,z),d.fillAndStroke()):(d.begin(),G?(d.moveTo(0,D),d.arcTo(.5*t,D,0,0,1,.5*t,0),d.arcTo(.5*t,D,0,0,1,t,D)):(d.moveTo(0,0),d.arcTo(.5*t,D,0,0,0,.5*t,D),d.arcTo(.5*t,D,0,0,0,t,0)),d.lineTo(t,z-D),d.arcTo(.5*t,D,0,0,1,.5*t,z),d.arcTo(.5*t,D,0,0,1,0,z-D),d.close(),d.fillAndStroke(),d.setShadow(!1),G&&(d.begin(),d.moveTo(t,D),d.arcTo(.5*t,D,0,0,1,.5*t,2*D),d.arcTo(.5*t,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t/2,.5*z,t,0);d.quadTo(.5*t,z/2,t,z);d.quadTo(t/2,.5*z,0,z);d.quadTo(.5*t,z/2,0,0);d.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(x,mxCylinder);x.prototype.tabWidth=60;x.prototype.tabHeight=20;x.prototype.tabPosition="right";x.prototype.arcSize=.1;x.prototype.isRoundable=function(){return!0};x.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),G=mxUtils.getValue(this.style,-"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),O=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(O*=Math.min(t,z));O=Math.min(O,.5*t,.5*(z-A));p=Math.max(p,O);p=Math.min(t-O,p);G||(O=0);d.begin();"left"==D?(d.moveTo(Math.max(O,0),A),d.lineTo(Math.max(O,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(t-p,A),d.lineTo(t-p,0),d.lineTo(t-Math.max(O,0),0),d.lineTo(t-Math.max(O,0),A));G?(d.moveTo(0,O+A),d.arcTo(O,O,0,0,1,O,A),d.lineTo(t-O,A),d.arcTo(O,O,0,0,1,t,O+A),-d.lineTo(t,z-O),d.arcTo(O,O,0,0,1,t-O,z),d.lineTo(O,z),d.arcTo(O,O,0,0,1,0,z-O)):(d.moveTo(0,A),d.lineTo(t,A),d.lineTo(t,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(t-30,A+20),d.lineTo(t-20,A+10),d.lineTo(t-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,+"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),N=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(N*=Math.min(t,z));N=Math.min(N,.5*t,.5*(z-A));p=Math.max(p,N);p=Math.min(t-N,p);G||(N=0);d.begin();"left"==D?(d.moveTo(Math.max(N,0),A),d.lineTo(Math.max(N,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(t-p,A),d.lineTo(t-p,0),d.lineTo(t-Math.max(N,0),0),d.lineTo(t-Math.max(N,0),A));G?(d.moveTo(0,N+A),d.arcTo(N,N,0,0,1,N,A),d.lineTo(t-N,A),d.arcTo(N,N,0,0,1,t,N+A),+d.lineTo(t,z-N),d.arcTo(N,N,0,0,1,t-N,z),d.lineTo(N,z),d.arcTo(N,N,0,0,1,0,z-N)):(d.moveTo(0,A),d.lineTo(t,A),d.lineTo(t,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(t-30,A+20),d.lineTo(t-20,A+10),d.lineTo(t-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var t=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));z||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-p));t||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,D,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);var D=mxUtils.getValue(this.style,"rounded",!1),G=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));A=mxUtils.getValue(this.style,"umlStateConnection",null);G||(p*=Math.min(t,z));p=Math.min(p,.5*t,.5*z);D||(p=0);D=0;null!=A&&(D=10);d.begin();d.moveTo(D,p);d.arcTo(p,p,0,0,1,D+p,0);d.lineTo(t-p,0);d.arcTo(p,p,0,0,1,t,p);d.lineTo(t,z-p);d.arcTo(p,p,0,0,1,t-p,z);d.lineTo(D+p,z);d.arcTo(p,p,0,0,1,D,z-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(t-40,z-20,10,10,3,3),d.stroke(),d.roundrect(t-20,z-20,10,10,@@ -2789,8 +2789,8 @@ mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.snew mxPoint(t,z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",aa);mxUtils.extend(ja,mxActor);ja.prototype.size=.5;ja.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,z)],this.isRounded,A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ja);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ca);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.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)};ba.prototype.quadTo=function(d,p,A,t){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=t};ba.prototype.curveTo=function(d,p,A,t,z,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=D};ba.prototype.arcTo=function(d,p,A,t,z,D,G){this.originalArcTo.apply(this.canvas,-arguments);this.lastX=D;this.lastY=G};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),D=Math.sqrt(t*t+z*z);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(D/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var O=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=D;z/=D;for(D=0;D<G;D++){var sa=(Math.random()--.5)*ea;this.originalLineTo.call(this.canvas,O*D+this.lastX-sa*z,A*D+this.lastY-sa*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.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 kb=mxShape.prototype.beforePaint;+arguments);this.lastX=D;this.lastY=G};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),D=Math.sqrt(t*t+z*z);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(D/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var N=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=D;z/=D;for(D=0;D<G;D++){var ta=(Math.random()-+.5)*ea;this.originalLineTo.call(this.canvas,N*D+this.lastX-ta*z,A*D+this.lastY-ta*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.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 kb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){kb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var ob=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){ob.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ba(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 hb=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"))&&hb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,A,t,z){if(null==d.handJiggle||d.handJiggle.constructor!=ba)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(t/2,Math.min(z/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,@@ -2806,143 +2806,143 @@ da);mxUtils.extend(ha,mxActor);ha.prototype.size=.2;ha.prototype.fixedSize=20;haA+z-D);d.moveTo(p+D,A+z/2);d.lineTo(p+t-D,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var sb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=function(d,p,A,t,z){sb.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);p+=D;A+=D;t-=2*D;z-=2*D;0<t&&0<z&&(d.setShadow(!1),sb.apply(this,[d,p,A,t,z]))}};mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};v.prototype.paintForeground=function(d,p,A,t,z){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);p+=D;A+=D;t-=2*D;z-=2*D;0<t&&0<z&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var G=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=G){var ea=this.style["symbol"+D+"Align"],-O=this.style["symbol"+D+"VerticalAlign"],sa=this.style["symbol"+D+"Width"],ma=this.style["symbol"+D+"Height"],$a=this.style["symbol"+D+"Spacing"]||0,jb=this.style["symbol"+D+"VSpacing"]||$a,db=this.style["symbol"+D+"ArcSpacing"];null!=db&&(db*=this.getArcSize(t+this.strokewidth,z+this.strokewidth),$a+=db,jb+=db);db=p;var Fa=A;db=ea==mxConstants.ALIGN_CENTER?db+(t-sa)/2:ea==mxConstants.ALIGN_RIGHT?db+(t-sa-$a):db+$a;Fa=O==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:O==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-jb):-Fa+jb;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,db,Fa,sa,ma);d.restore()}D++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,t,z,D){D?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(N,mxShape);N.prototype.paintBackground=-function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();+N=this.style["symbol"+D+"VerticalAlign"],ta=this.style["symbol"+D+"Width"],ma=this.style["symbol"+D+"Height"],ab=this.style["symbol"+D+"Spacing"]||0,jb=this.style["symbol"+D+"VSpacing"]||ab,db=this.style["symbol"+D+"ArcSpacing"];null!=db&&(db*=this.getArcSize(t+this.strokewidth,z+this.strokewidth),ab+=db,jb+=db);db=p;var Fa=A;db=ea==mxConstants.ALIGN_CENTER?db+(t-ta)/2:ea==mxConstants.ALIGN_RIGHT?db+(t-ta-ab):db+ab;Fa=N==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:N==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-jb):+Fa+jb;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,db,Fa,ta,ma);d.restore()}D++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,t,z,D){D?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(O,mxShape);O.prototype.paintBackground=+function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",O);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(t/6,z/2);d.end();d.stroke();d.ellipse(t/6,0,5*t/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/8,A+z);d.lineTo(p+7*t/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",V);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(X,mxShape);X.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};X.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};X.prototype.paintForeground=function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",X);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=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,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"participant");null==G||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,t,D):(G=this.state.view.graph.cellRenderer.getShape(G),null!=G&&G!=fa&&(G=new G,G.apply(this.state),d.save(),G.paintVertexShape(d,p,A,t,D),d.restore()));D<z&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+t/2,A+D),d.lineTo(p+t/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,t,Math.min(z,D))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(na,mxShape);na.prototype.width=60;na.prototype.height=30;na.prototype.corner=10;na.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};na.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))};na.prototype.paintBackground=function(d,p,A,t,z){var D=this.corner,G=Math.min(t,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",-this.width)))),ea=Math.min(z,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),O=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);O!=mxConstants.NONE&&(d.setFillColor(O),d.rect(p,A,t,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,t,z),d.setGradient(this.fill,this.gradient,p,A,t,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;+this.width)))),ea=Math.min(z,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),N=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);N!=mxConstants.NONE&&(d.setFillColor(N),d.rect(p,A,t,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,t,z),d.setGradient(this.fill,this.gradient,p,A,t,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,A);d.lineTo(p+G,A);d.lineTo(p+G,A+Math.max(0,ea-1.5*D));d.lineTo(p+Math.max(0,G-D),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+G,A);d.lineTo(p+t,A);d.lineTo(p+t,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",na);mxPerimeter.CenterPerimeter=function(d,p,A,t){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,t){t=fa.prototype.size;null!=p&&(t=mxUtils.getValue(p.style,"size",t)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+t,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,A,t){t=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,t){t=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(t+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(t=-1*(t+1)),new mxPoint(d.getCenterX()+t,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",da.prototype.size))*p.view.scale))),p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);-mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=-[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+sa),new mxPoint(G,ea+sa),new mxPoint(G+z,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=-function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,ea+sa),-new mxPoint(G,ea+sa),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+sa),new mxPoint(G+z,ea+sa),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(G+O,ea),new mxPoint(G+O,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,-D)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa-z),new mxPoint(G,ea+sa),new mxPoint(G,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?ha.prototype.fixedSize:ha.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,-"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+sa),new mxPoint(G,ea+sa),new mxPoint(G+z,d),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,-Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,d),new mxPoint(G+O,ea+sa),new mxPoint(G+z,ea+sa),new mxPoint(G,d),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa),new mxPoint(ma,ea+sa-z),new mxPoint(G,ea+sa),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),-ea=[new mxPoint(G,ea),new mxPoint(ma,ea+z),new mxPoint(G+O,ea),new mxPoint(G+O,ea+sa-z),new mxPoint(ma,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,-"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa-z),new mxPoint(ma,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea+z),new mxPoint(ma,ea)]):-(z=z?Math.max(0,Math.min(O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+sa),new mxPoint(G+z,ea+sa),new mxPoint(G,d),new mxPoint(G+z,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,+mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=+[new mxPoint(G,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N,ea),new mxPoint(G+N-z,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+N?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=+function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(.5*N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N-z,ea),new mxPoint(G+N,ea+ta),+new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+N,ea),new mxPoint(G+N-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(G+N,ea),new mxPoint(G+N,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,+D)),ea=[new mxPoint(G,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta-z),new mxPoint(G,ea+ta),new mxPoint(G,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+N?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?ha.prototype.fixedSize:ha.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,+"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+N-z,ea),new mxPoint(G+N,d),new mxPoint(G+N-z,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,d),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,+Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N,ea),new mxPoint(G+N-z,d),new mxPoint(G+N,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea+z),new mxPoint(ma,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta),new mxPoint(ma,ea+ta-z),new mxPoint(G,ea+ta),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),+ea=[new mxPoint(G,ea),new mxPoint(ma,ea+z),new mxPoint(G+N,ea),new mxPoint(G+N,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+N?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,+"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,N=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,D)):ta*Math.max(0,Math.min(1,D)),ea=[new mxPoint(ma,ea),new mxPoint(G+N,ea+z),new mxPoint(G+N,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z),new mxPoint(ma,ea)]):+(z=z?Math.max(0,Math.min(N,D)):N*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+N-z,ea),new mxPoint(G+N,d),new mxPoint(G+N-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+N?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(p,A);d.ellipse((t-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(t/2,D);d.lineTo(t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size)),G=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.begin();d.moveTo(t/2,D+G);d.lineTo(t/2,z);d.end();d.stroke();d.begin();d.moveTo((t-D)/2-G,D/2);d.quadTo((t-D)/2-G,D+G,t/2,D+G);d.quadTo((t+D)/2+G,D+G,(t+D)/2+G,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(wa,mxShape);wa.prototype.inset=2;wa.prototype.paintBackground=function(d,-p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,D,t-2*D,z-2*D);d.fillAndStroke();d.begin();d.moveTo(t/2,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ja,mxCylinder);Ja.prototype.jettyWidth=20;Ja.prototype.jettyHeight=10;Ja.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));-p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=Math.min(p,z-p),O=Math.min(ea+2*p,z-p);D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",-Ja);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=.3*z-p/2,O=.7*z-p/2;D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,-z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,t,z){var D=t/2,G=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+D,A),new mxPoint(p+t,A+G),new mxPoint(p+D,A+z),new mxPoint(p,A+G)],this.isRounded,+p,A,t,z){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,D,t-2*D,z-2*D);d.fillAndStroke();d.begin();d.moveTo(t/2,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=20;Ia.prototype.jettyHeight=10;Ia.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));+p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=Math.min(p,z-p),N=Math.min(ea+2*p,z-p);D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,N),d.lineTo(G,N),d.lineTo(G,N+p),d.lineTo(A,N+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,N+p),d.lineTo(0,N+p),d.lineTo(0,N),d.lineTo(A,N),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",+Ia);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,t,z,D){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=.3*z-p/2,N=.7*z-p/2;D?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,N),d.lineTo(G,N),d.lineTo(G,N+p),d.lineTo(A,N+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,+z),d.lineTo(A,N+p),d.lineTo(0,N+p),d.lineTo(0,N),d.lineTo(A,N),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,t,z){var D=t/2,G=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+D,A),new mxPoint(p+t,A+G),new mxPoint(p+D,A+z),new mxPoint(p,A+G)],this.isRounded,ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(d,p,A,t,z){var D=Math.min(4,Math.min(t/5,z/5));0<t&&0<z&&(d.ellipse(p+D,A+D,t-2*D,z-2*D),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,A,t,z),d.stroke())};mxCellRenderer.registerShape("endState",Ga);mxUtils.extend(Ma,Ga);Ma.prototype.outerStroke=-!1;mxCellRenderer.registerShape("startState",Ma);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=4;ra.prototype.isOpenEnded=function(){return!0};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ra.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ra);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=+!1;mxCellRenderer.registerShape("startState",Ma);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(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(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(0,p),new mxPoint(t,0),new mxPoint(t,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(va,mxRectangleShape);va.prototype.dx=20;va.prototype.dy=20;va.prototype.isHtmlAllowed=function(){return!1};va.prototype.paintForeground=function(d,p,A,t,z){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(t*G,z*G))}G=Math.max(D,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,A+D);d.lineTo(p+t,A+D);d.end();d.stroke();d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",va);mxUtils.extend(Na,mxActor);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isRoundable=function(){return!0};Na.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,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(t,0),new mxPoint(t,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(t,0);d.lineTo(t,z);d.end();d.moveTo(0,z/2);d.lineTo(t,z/2);d.end()};mxCellRenderer.registerShape("crossbar",Oa);mxUtils.extend(Qa,mxActor);Qa.prototype.dx=20;Qa.prototype.dy=-20;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,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(t,0),new mxPoint(t,A),new mxPoint((t+p)/2,A),new mxPoint((t+-p)/2,z),new mxPoint((t-p)/2,z),new mxPoint((t-p)/2,A),new mxPoint(0,A)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Qa);mxUtils.extend(Ra,mxActor);Ra.prototype.arrowWidth=.3;Ra.prototype.arrowSize=.2;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));-A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(0,D)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ra);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,-"arrowWidth",Ra.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ra.prototype.arrowSize))));A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(p,D),new mxPoint(p,z)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",+mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(t,0);d.lineTo(t,z);d.end();d.moveTo(0,z/2);d.lineTo(t,z/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.dx=20;Ta.prototype.dy=+20;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,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(t,0),new mxPoint(t,A),new mxPoint((t+p)/2,A),new mxPoint((t++p)/2,z),new mxPoint((t-p)/2,z),new mxPoint((t-p)/2,A),new mxPoint(0,A)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Ta);mxUtils.extend(Ua,mxActor);Ua.prototype.arrowWidth=.3;Ua.prototype.arrowSize=.2;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));+A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(0,D)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ua);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var D=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowWidth",Ua.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ua.prototype.arrowSize))));A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,D),new mxPoint(p,D),new mxPoint(p,z)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ea);-mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",C);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",P);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,+mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",P);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+-t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,p,A,t,z){var D=d.state.strokeWidth/2,G=10+2*D,ea=A+-z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea-G/2);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea+G/2);d.moveTo(p+D,ea);d.lineTo(p+t-D,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea-G/2);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ia,mxEllipse);Ia.prototype.drawHidden=!0;Ia.prototype.paintVertexShape=function(d,p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=-this.style){var D=d.pointerEvents,G=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||G||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),O="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||G||this.outline||ea||sa||ma||O?(d.rect(p,A,t,z),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),-d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+t,A):d.moveTo(p+t,A),this.outline||sa?d.lineTo(p+t,A+z):d.moveTo(p+t,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||O)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ia);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==-mxUtils.getValue(this.style,"line")?(d.moveTo(p+t/2,A),d.lineTo(p+t/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+t,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);d.moveTo(0,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=.2;Ta.prototype.redrawPath=function(d,p,-A,t,z){p=Math.min(z,t);var D=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-D)/2;A=p+D;var G=(t-D)/2;D=G+D;d.moveTo(0,p);d.lineTo(G,p);d.lineTo(G,0);d.lineTo(D,0);d.lineTo(D,p);d.lineTo(t,p);d.lineTo(t,A);d.lineTo(D,A);d.lineTo(D,z);d.lineTo(G,z);d.lineTo(G,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Ta);mxUtils.extend(ab,mxActor);ab.prototype.size=.25;ab.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);A=Math.min(t--p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*t);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},+t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,p,A,t,z){var D=d.state.strokeWidth/2,G=10+2*D,ea=A++z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea-G/2);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea+G/2);d.moveTo(p+D,ea);d.lineTo(p+t-D,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea-G/2);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ja,mxEllipse);Ja.prototype.drawHidden=!0;Ja.prototype.paintVertexShape=function(d,p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=+this.style){var D=d.pointerEvents,G=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||G||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),N="1"==mxUtils.getValue(this.style,"left","1"),ta="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||G||this.outline||ea||ta||ma||N?(d.rect(p,A,t,z),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),+d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+t,A):d.moveTo(p+t,A),this.outline||ta?d.lineTo(p+t,A+z):d.moveTo(p+t,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||N)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ja);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==+mxUtils.getValue(this.style,"line")?(d.moveTo(p+t/2,A),d.lineTo(p+t/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+t,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);d.moveTo(0,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Sa,mxActor);Sa.prototype.size=.2;Sa.prototype.redrawPath=function(d,p,+A,t,z){p=Math.min(z,t);var D=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-D)/2;A=p+D;var G=(t-D)/2;D=G+D;d.moveTo(0,p);d.lineTo(G,p);d.lineTo(G,0);d.lineTo(D,0);d.lineTo(D,p);d.lineTo(t,p);d.lineTo(t,A);d.lineTo(D,A);d.lineTo(D,z);d.lineTo(G,z);d.lineTo(G,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Sa);mxUtils.extend(Za,mxActor);Za.prototype.size=.25;Za.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);A=Math.min(t-+p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*t);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",Za);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.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"}]}];Pa.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);this.strictDrawShape(d,0,0,t,z)};Pa.prototype.strictDrawShape=function(d,p,A,t,z,D){var G=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",-this.absoluteCornerSize),O=D&&D.size?D.size:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=D&&D.indent?D.indent:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=D&&D.relIndent?D.relIndent:-Math.max(0,Math.min(50,ma)),Fa=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),La=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ka=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Ua=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,-"bottomRightStyle","default"),Za=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Hb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ib=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Eb=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Gb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,-"gradientColor2","none"),Jb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,O));D=Pa.prototype;d.setDashed($a);jb&&""!=jb&&d.setDashPattern(jb);d.setStrokeWidth(Ib);O=Math.min(.5*z,.5*t,O);ea||(O=Lb*Math.min(t,z)/100);O=Math.min(O,.5*Math.min(t,z));ea||(ma=Math.min(db*Math.min(t,z)/100));ma=Math.min(ma,.5*Math.min(t,z)-O);(Fa||La||Ka||Ha)&&"frame"!=-sa&&(d.begin(),Fa?D.moveNW(d,p,A,t,z,G,Ua,O,Ha):d.moveTo(0,0),Fa&&D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),La&&D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),Ka&&D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),Ha&&D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Eb),$a=ea=Kb,"none"==Eb&&(ea=0),"none"==Gb&&($a=0),d.setGradient(Eb,Gb,0,0,t,z,Jb,ea,$a),d.begin(),Fa?D.moveNWInner(d,-p,A,t,z,G,Ua,O,ma,Fa,Ha):d.moveTo(ma,0),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),Ha&&Ka&&D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),Ka&&La&&D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),La&&Fa&&D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),Fa&&Ha&&D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),d.fill(),"none"==Hb&&(d.begin(),D.paintFolds(d,p,A,t,z,G,Ua,Xa,Ya,Za,O,Fa,La,Ka,Ha),d.stroke()));Fa||La||-Ka||!Ha?Fa||La||!Ka||Ha?!Fa&&!La&&Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,-p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):Fa||!La||Ka||Ha?!Fa&&La&&!Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,-p,A,t,z,G,Ya,O,Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):-!Fa&&La&&Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),-D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ka&&Ha?"frame"!=sa?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,-p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,-p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ka||Ha?Fa&&!La&&!Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,-p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,-t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,-t,z,G,Za,O,Ha),D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,-p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),D.paintSWInner(d,-p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,-p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&Ha?"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,-Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,-Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&!Ha?"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,-p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,-p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&Ha&&("frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,-O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),d.close(),"double"==sa&&(D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close()),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintNW(d,-p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.paintNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.paintSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.paintSW(d,p,A,t,z,G,Za,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),d.close(),D.moveSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintSWInner(d,p,A,t,z,G,Za,O,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,O,ma),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,O,ma),D.paintTopInner(d,-p,A,t,z,G,Ua,O,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Ua,O,ma),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke())):"frame"!=sa?(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==sa&&(D.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Ua,O,Ha),D.paintTop(d,p,A,t,z,G,Xa,O,La),D.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),D.paintTopInner(d,p,A,t,z,G,Ua,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):-"frame"!=sa?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),"double"==sa&&(D.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,O,Fa),D.paintRight(d,p,A,t,z,G,Ya,O,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),"double"==sa&&(D.moveSWInner(d,-p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,O,La),D.paintBottom(d,p,A,t,z,G,Za,O,Ha),D.lineSWInner(d,p,A,t,z,G,Za,O,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ka),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),D.moveSW(d,p,A,t,z,G,Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),"double"==sa&&(D.moveNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,-Ua,O,Ka),D.paintLeft(d,p,A,t,z,G,Ua,O,Fa),D.lineNWInner(d,p,A,t,z,G,Ua,O,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,Za,O,ma,Ka,Ha),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,p,A,t,z,G,Ua,Xa,Ya,Za,O,Fa,La,Ka,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(t,0):d.moveTo(t-ea,0)};Pa.prototype.moveSE=function(d,-p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(t,z):d.moveTo(t,z-ea)};Pa.prototype.moveSW=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&-"fold"==D)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(t,0):d.lineTo(t-ea,0)};Pa.prototype.paintNE=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t,ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t,ea);else d.lineTo(t,-0)};Pa.prototype.paintRight=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(t,z):d.lineTo(t,z-ea)};Pa.prototype.paintLeft=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t-ea,z)}else("snip"==G||"default"==-G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-ea,z);else d.lineTo(t,z)};Pa.prototype.paintBottom=function(d,p,A,t,z,D,G,ea,O){"square"==G||"default"==G&&"square"==D||!O?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,t,z,D,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==-G&&"fold"==D)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,t,z,D,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,O,.5*O+ea);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,O,O+ea);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(O,.5*O+ea);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(O+ea,O+ea),d.lineTo(O,O+ea)};Pa.prototype.paintTopInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,-O):sa&&!ma?d.lineTo(O,0):sa?"square"==G||"default"==G&&"square"==D?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(ea+.5*O,O):d.lineTo(ea+O,O):d.lineTo(0,O):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,t,z,D,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-ea-.5*O,O);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,t-ea-O,O);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(t--ea-.5*O,O);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-O,ea+O),d.lineTo(t-ea-O,O)};Pa.prototype.paintRightInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(t-O,0):sa&&!ma?d.lineTo(t,O):sa?"square"==G||"default"==G&&"square"==D?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-O,ea+.5*O):d.lineTo(t-O,ea+O):d.lineTo(t-O,0):d.lineTo(t,0)};Pa.prototype.paintLeftInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(O,-z):sa&&!ma?d.lineTo(0,z-O):sa?"square"==G||"default"==G&&"square"==D?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(O,z-ea-.5*O):d.lineTo(O,z-ea-O):d.lineTo(O,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,t,z,D,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-O,z-ea-.5*O);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,t-O,z-ea-O);else if("snip"==G||"default"==G&&"snip"==-D)d.lineTo(t-O,z-ea-.5*O);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-O,z-ea-O),d.lineTo(t-O,z-ea-O)};Pa.prototype.paintBottomInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(t,z-O):sa&&!ma?d.lineTo(t-O,z):"square"==G||"default"==G&&"square"==D||!sa?d.lineTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-ea-.5*O,z-O):d.lineTo(t-ea-O,z-O):d.lineTo(t,z)};Pa.prototype.paintSWInner=function(d,p,A,t,z,D,G,ea,O,sa){if(!sa)d.lineTo(O,-z);else if("square"==G||"default"==G&&"square"==D)d.lineTo(O,z-O);else if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,ea+.5*O,z-O);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+O,ea+O,0,0,1,ea+O,z-O);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(ea+.5*O,z-O);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(O+ea,z-ea-O),d.lineTo(O+ea,z-O)};Pa.prototype.moveSWInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.moveTo(O,-z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(O,z-ea-O):d.moveTo(0,z-O)};Pa.prototype.lineSWInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==-G&&"fold"==D)&&d.lineTo(O,z-ea-O):d.lineTo(0,z-O)};Pa.prototype.moveSEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.moveTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(t-O,z-ea-O):d.moveTo(t-O,z)};Pa.prototype.lineSEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D?d.lineTo(t-O,-z-O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-O,z-ea-O):d.lineTo(t-O,z)};Pa.prototype.moveNEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D||sa?d.moveTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==-G&&"fold"==D)&&d.moveTo(t-O,ea+O):d.moveTo(t,O)};Pa.prototype.lineNEInner=function(d,p,A,t,z,D,G,ea,O,sa){sa?"square"==G||"default"==G&&"square"==D||sa?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-O,ea+O):d.lineTo(t,O)};Pa.prototype.moveNWInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.moveTo(O,0):sa&&!ma?d.moveTo(0,O):"square"==-G||"default"==G&&"square"==D?d.moveTo(O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(O,ea+O):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,t,z,D,G,ea,O,sa,ma){sa||ma?!sa&&ma?d.lineTo(O,0):sa&&!ma?d.lineTo(0,O):"square"==G||"default"==G&&"square"==D?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(O,-ea+.5*O):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(O,ea+O):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,t,z,D,G,ea,O,sa,ma,$a,jb,db,Fa){if("fold"==D||"fold"==G||"fold"==ea||"fold"==O||"fold"==sa)("fold"==G||"default"==G&&"fold"==D)&&$a&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==D)&&$a&&jb&&(d.moveTo(t-ma,0),d.lineTo(t-ma,ma),d.lineTo(t,ma)),("fold"==O||"default"==O&&"fold"==D)&&db&&jb&&(d.moveTo(t--ma,z),d.lineTo(t-ma,z-ma),d.lineTo(t,z-ma)),("fold"==sa||"default"==sa&&"fold"==D)&&db&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Sa,mxConnector);Sa.prototype.origPaintEdgeShape=Sa.prototype.paintEdgeShape;Sa.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash;Sa.prototype.origPaintEdgeShape.apply(this,-[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(t,z),Sa.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Sa);mxUtils.extend(gb,mxConnector);gb.prototype.defaultWidth=4;gb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};gb.prototype.getFlowAnimationPath=function(){return mxShape.prototype.getFlowAnimationPath.call(this,+this.absoluteCornerSize),N=D&&D.size?D.size:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ta=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=D&&D.indent?D.indent:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=D&&D.relIndent?D.relIndent:+Math.max(0,Math.min(50,ma)),Fa=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),La=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ka=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Wa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,+"bottomRightStyle","default"),$a=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Hb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ib=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Eb=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Gb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,+"gradientColor2","none"),Jb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,N));D=Pa.prototype;d.setDashed(ab);jb&&""!=jb&&d.setDashPattern(jb);d.setStrokeWidth(Ib);N=Math.min(.5*z,.5*t,N);ea||(N=Lb*Math.min(t,z)/100);N=Math.min(N,.5*Math.min(t,z));ea||(ma=Math.min(db*Math.min(t,z)/100));ma=Math.min(ma,.5*Math.min(t,z)-N);(Fa||La||Ka||Ha)&&"frame"!=+ta&&(d.begin(),Fa?D.moveNW(d,p,A,t,z,G,Wa,N,Ha):d.moveTo(0,0),Fa&&D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),La&&D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),Ka&&D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),Ha&&D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Eb),ab=ea=Kb,"none"==Eb&&(ea=0),"none"==Gb&&(ab=0),d.setGradient(Eb,Gb,0,0,t,z,Jb,ea,ab),d.begin(),Fa?D.moveNWInner(d,+p,A,t,z,G,Wa,N,ma,Fa,Ha):d.moveTo(ma,0),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),Ha&&Ka&&D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),Ka&&La&&D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),La&&Fa&&D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),Fa&&Ha&&D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),d.fill(),"none"==Hb&&(d.begin(),D.paintFolds(d,p,A,t,z,G,Wa,Xa,Ya,$a,N,Fa,La,Ka,Ha),d.stroke()));Fa||La||+Ka||!Ha?Fa||La||!Ka||Ha?!Fa&&!La&&Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,+p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):Fa||!La||Ka||Ha?!Fa&&La&&!Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,+p,A,t,z,G,Ya,N,Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):+!Fa&&La&&Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),+D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ka&&Ha?"frame"!=ta?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,+p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,+p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ka||Ha?Fa&&!La&&!Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,+p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,+t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,+t,z,G,$a,N,Ha),D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&!La&&Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,+p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),D.paintSWInner(d,+p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,+p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ka&&Ha?"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,+Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,+Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&!Ha?"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,+p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,+p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ka&&Ha&&("frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,+N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),d.close(),"double"==ta&&(D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close()),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintNW(d,+p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.paintNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.paintSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.paintSW(d,p,A,t,z,G,$a,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),d.close(),D.moveSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintSWInner(d,p,A,t,z,G,$a,N,ma,Ka),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),D.paintSEInner(d,p,A,t,z,G,Ya,N,ma),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),D.paintNEInner(d,p,A,t,z,G,Xa,N,ma),D.paintTopInner(d,+p,A,t,z,G,Wa,N,ma,Ha,Fa),D.paintNWInner(d,p,A,t,z,G,Wa,N,ma),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke())):"frame"!=ta?(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),"double"==ta&&(D.moveNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa)),d.stroke()):(d.begin(),D.moveNW(d,p,A,t,z,G,Wa,N,Ha),D.paintTop(d,p,A,t,z,G,Xa,N,La),D.lineNEInner(d,p,A,t,z,G,Xa,N,ma,La),D.paintTopInner(d,p,A,t,z,G,Wa,N,ma,Ha,Fa),d.close(),d.fillAndStroke()):+"frame"!=ta?(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),"double"==ta&&(D.moveSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La)),d.stroke()):(d.begin(),D.moveNE(d,p,A,t,z,G,Xa,N,Fa),D.paintRight(d,p,A,t,z,G,Ya,N,Ka),D.lineSEInner(d,p,A,t,z,G,Ya,N,ma,Ka),D.paintRightInner(d,p,A,t,z,G,Xa,N,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),"double"==ta&&(D.moveSWInner(d,+p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka)),d.stroke()):(d.begin(),D.moveSE(d,p,A,t,z,G,Ya,N,La),D.paintBottom(d,p,A,t,z,G,$a,N,Ha),D.lineSWInner(d,p,A,t,z,G,$a,N,ma,Ha),D.paintBottomInner(d,p,A,t,z,G,Ya,N,ma,La,Ka),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),D.moveSW(d,p,A,t,z,G,Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),"double"==ta&&(D.moveNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha)),d.stroke()):(d.begin(),D.moveSW(d,p,A,t,z,G,+Wa,N,Ka),D.paintLeft(d,p,A,t,z,G,Wa,N,Fa),D.lineNWInner(d,p,A,t,z,G,Wa,N,ma,Fa,Ha),D.paintLeftInner(d,p,A,t,z,G,$a,N,ma,Ka,Ha),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,p,A,t,z,G,Wa,Xa,Ya,$a,N,Fa,La,Ka,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(t,0):d.moveTo(t-ea,0)};Pa.prototype.moveSE=function(d,+p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(t,z):d.moveTo(t,z-ea)};Pa.prototype.moveSW=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&+"fold"==D)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(t,0):d.lineTo(t-ea,0)};Pa.prototype.paintNE=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t,ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t,ea);else d.lineTo(t,+0)};Pa.prototype.paintRight=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(t,z):d.lineTo(t,z-ea)};Pa.prototype.paintLeft=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,t-ea,z)}else("snip"==G||"default"==+G&&"snip"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-ea,z);else d.lineTo(t,z)};Pa.prototype.paintBottom=function(d,p,A,t,z,D,G,ea,N){"square"==G||"default"==G&&"square"==D||!N?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,t,z,D,G,ea,N){if(N)if("rounded"==G||"default"==G&&"rounded"==D||"invRound"==G||"default"==G&&"invRound"==D){p=0;if("rounded"==G||"default"==G&&"rounded"==D)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==G||"default"==G&&"snip"==D||"fold"==G||"default"==+G&&"fold"==D)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,t,z,D,G,ea,N){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,N,.5*N+ea);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,N,N+ea);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(N,.5*N+ea);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(N+ea,N+ea),d.lineTo(N,N+ea)};Pa.prototype.paintTopInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(0,+N):ta&&!ma?d.lineTo(N,0):ta?"square"==G||"default"==G&&"square"==D?d.lineTo(N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(ea+.5*N,N):d.lineTo(ea+N,N):d.lineTo(0,N):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,t,z,D,G,ea,N){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,t-ea-.5*N,N);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,t-ea-N,N);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(t-+ea-.5*N,N);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-N,ea+N),d.lineTo(t-ea-N,N)};Pa.prototype.paintRightInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(t-N,0):ta&&!ma?d.lineTo(t,N):ta?"square"==G||"default"==G&&"square"==D?d.lineTo(t-N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-N,ea+.5*N):d.lineTo(t-N,ea+N):d.lineTo(t-N,0):d.lineTo(t,0)};Pa.prototype.paintLeftInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(N,+z):ta&&!ma?d.lineTo(0,z-N):ta?"square"==G||"default"==G&&"square"==D?d.lineTo(N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(N,z-ea-.5*N):d.lineTo(N,z-ea-N):d.lineTo(N,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,t,z,D,G,ea,N){if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,t-N,z-ea-.5*N);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,t-N,z-ea-N);else if("snip"==G||"default"==G&&"snip"==+D)d.lineTo(t-N,z-ea-.5*N);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(t-ea-N,z-ea-N),d.lineTo(t-N,z-ea-N)};Pa.prototype.paintBottomInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(t,z-N):ta&&!ma?d.lineTo(t-N,z):"square"==G||"default"==G&&"square"==D||!ta?d.lineTo(t-N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-ea-.5*N,z-N):d.lineTo(t-ea-N,z-N):d.lineTo(t,z)};Pa.prototype.paintSWInner=function(d,p,A,t,z,D,G,ea,N,ta){if(!ta)d.lineTo(N,+z);else if("square"==G||"default"==G&&"square"==D)d.lineTo(N,z-N);else if("rounded"==G||"default"==G&&"rounded"==D)d.arcTo(ea-.5*N,ea-.5*N,0,0,0,ea+.5*N,z-N);else if("invRound"==G||"default"==G&&"invRound"==D)d.arcTo(ea+N,ea+N,0,0,1,ea+N,z-N);else if("snip"==G||"default"==G&&"snip"==D)d.lineTo(ea+.5*N,z-N);else if("fold"==G||"default"==G&&"fold"==D)d.lineTo(N+ea,z-ea-N),d.lineTo(N+ea,z-N)};Pa.prototype.moveSWInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.moveTo(N,+z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(N,z-ea-N):d.moveTo(0,z-N)};Pa.prototype.lineSWInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.lineTo(N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==+G&&"fold"==D)&&d.lineTo(N,z-ea-N):d.lineTo(0,z-N)};Pa.prototype.moveSEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.moveTo(t-N,z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(t-N,z-ea-N):d.moveTo(t-N,z)};Pa.prototype.lineSEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D?d.lineTo(t-N,+z-N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-N,z-ea-.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-N,z-ea-N):d.lineTo(t-N,z)};Pa.prototype.moveNEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D||ta?d.moveTo(t-N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(t-N,ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==+G&&"fold"==D)&&d.moveTo(t-N,ea+N):d.moveTo(t,N)};Pa.prototype.lineNEInner=function(d,p,A,t,z,D,G,ea,N,ta){ta?"square"==G||"default"==G&&"square"==D||ta?d.lineTo(t-N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(t-N,ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(t-N,ea+N):d.lineTo(t,N)};Pa.prototype.moveNWInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.moveTo(N,0):ta&&!ma?d.moveTo(0,N):"square"==+G||"default"==G&&"square"==D?d.moveTo(N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.moveTo(N,ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.moveTo(N,ea+N):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,t,z,D,G,ea,N,ta,ma){ta||ma?!ta&&ma?d.lineTo(N,0):ta&&!ma?d.lineTo(0,N):"square"==G||"default"==G&&"square"==D?d.lineTo(N,N):"rounded"==G||"default"==G&&"rounded"==D||"snip"==G||"default"==G&&"snip"==D?d.lineTo(N,+ea+.5*N):("invRound"==G||"default"==G&&"invRound"==D||"fold"==G||"default"==G&&"fold"==D)&&d.lineTo(N,ea+N):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,t,z,D,G,ea,N,ta,ma,ab,jb,db,Fa){if("fold"==D||"fold"==G||"fold"==ea||"fold"==N||"fold"==ta)("fold"==G||"default"==G&&"fold"==D)&&ab&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==D)&&ab&&jb&&(d.moveTo(t-ma,0),d.lineTo(t-ma,ma),d.lineTo(t,ma)),("fold"==N||"default"==N&&"fold"==D)&&db&&jb&&(d.moveTo(t-+ma,z),d.lineTo(t-ma,z-ma),d.lineTo(t,z-ma)),("fold"==ta||"default"==ta&&"fold"==D)&&db&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Qa,mxConnector);Qa.prototype.origPaintEdgeShape=Qa.prototype.paintEdgeShape;Qa.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash;Qa.prototype.origPaintEdgeShape.apply(this,+[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(t,z),Qa.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Qa);mxUtils.extend(gb,mxConnector);gb.prototype.defaultWidth=4;gb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};gb.prototype.getFlowAnimationPath=function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};gb.prototype.origPaintEdgeShape=gb.prototype.paintEdgeShape;gb.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash,D=this.getEdgeWidth();d.setStrokeWidth(D+2*this.strokewidth);d.setDashed(!1);gb.prototype.origPaintEdgeShape.apply(this,[d,A]);A=mxUtils.getValue(this.style,"fillColor",null);null!=A&&(d.setStrokeWidth(D),d.setStrokeColor(A),d.setDashed(t,z),gb.prototype.origPaintEdgeShape.apply(this,[d,p]))};mxCellRenderer.registerShape("pipe",-gb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+1);return function(){d.begin();d.moveTo(t.x-ma/2-$a/2,t.y-$a/-2+ma/2);d.lineTo(t.x+$a/2-3*ma/2,t.y-3*$a/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+1),jb=t.x+ma/2,db=t.y+$a/2;t.x-=ma;t.y-=$a;return function(){d.begin();d.moveTo(jb-ma/2-$a/2,db-$a/2+ma/2);d.lineTo(jb-ma/2+$a/2,db-$a/2-ma/2);d.lineTo(jb+$a/2-3*ma/2,db-3*$a/2-ma/2);d.lineTo(jb-$a/2-3*ma/2,db-3*$a/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+-1);return function(){d.begin();d.moveTo(t.x-ma/2-$a/2,t.y-$a/2+ma/2);d.lineTo(t.x+$a/2-3*ma/2,t.y-3*$a/2-ma/2);d.moveTo(t.x-ma/2+$a/2,t.y-$a/2-ma/2);d.lineTo(t.x-$a/2-3*ma/2,t.y-3*$a/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",fb);mxMarker.addMarker("circlePlus",function(d,p,A,t,z,D,G,ea,O,sa){var ma=t.clone(),$a=fb.apply(this,arguments),jb=z*(G+2*O),db=D*(G+2*O);return function(){$a.apply(this,arguments);d.begin();d.moveTo(ma.x-z*O,ma.y-D*O);d.lineTo(ma.x-2*jb+z*O,ma.y-2*db+D*O);d.moveTo(ma.x--jb-db+D*O,ma.y-db+jb-z*O);d.lineTo(ma.x+db-jb-D*O,ma.y-db-jb+z*O);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,t,z,D,G,ea,O,sa){var ma=z*(G+O+1),$a=D*(G+O+1),jb=t.clone();t.x-=ma;t.y-=$a;return function(){d.begin();d.moveTo(jb.x-$a,jb.y+ma);d.quadTo(t.x-$a,t.y+ma,t.x,t.y);d.quadTo(t.x+$a,t.y-ma,jb.x+$a,jb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,t,z,D,G,ea,O,sa){p=z*O*1.118;A=D*O*1.118;z*=G+O;D*=G+O;var ma=t.clone();ma.x-=p;ma.y-=A;t.x+=-z-p;t.y+=-D-A;return function(){d.begin();-d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-D/2,ma.y-D+z/2):d.lineTo(ma.x+D/2-z,ma.y-D-z/2);d.lineTo(ma.x-z,ma.y-D);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,t,z,D,G,ea,O,sa,ma){D*=ea+sa;G*=ea+sa;var $a=z.clone();return function(){p.begin();p.moveTo($a.x,$a.y);O?p.lineTo($a.x-D-G/d,$a.y-G+D/d):p.lineTo($a.x+G/d-D,$a.y-G-D/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=function(d,p,A){return mb(d,["width"],-p,function(t,z,D,G,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(G.x+z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));d.style.width=Math.round(2*t)/d.view.scale-A})},mb=function(d,p,A,t,z){return bb(d,p,function(D){var G=d.absolutePoints;if(null!=G&&0<G.length){var ea=G.length-1;D=d.view.translate;var O=d.view.scale,sa=A?G[0]:G[ea];G=A?G[1]:G[ea-1];ea=G.x-sa.x;var ma=G.y-sa.y,$a=Math.sqrt(ea*ea+ma*ma);sa=t.call(this,-$a,ea/$a,ma/$a,sa,G);return new mxPoint(sa.x/O-D.x,sa.y/O-D.y)}return null},function(D,G,ea){var O=d.absolutePoints,sa=O.length-1;D=d.view.translate;var ma=d.view.scale,$a=A?O[0]:O[sa];O=A?O[1]:O[sa-1];sa=O.x-$a.x;var jb=O.y-$a.y,db=Math.sqrt(sa*sa+jb*jb);G.x=(G.x+D.x)*ma;G.y=(G.y+D.y)*ma;z.call(this,db,sa/db,jb/db,$a,O,G,ea)})},nb=function(d,p){return function(A){return[mb(A,["startWidth"],!0,function(t,z,D,G,ea){ea=mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(G.x+-z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));A.style.startWidth=Math.round(2*t)/A.view.scale-p})]}},qb=function(d){return function(p){return[bb(p,["arrowWidth","arrowSize"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ra.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ra.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-t)*A.height/+gb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N+1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/+2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N+1),jb=t.x+ma/2,db=t.y+ab/2;t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(jb-ma/2-ab/2,db-ab/2+ma/2);d.lineTo(jb-ma/2+ab/2,db-ab/2-ma/2);d.lineTo(jb+ab/2-3*ma/2,db-3*ab/2-ma/2);d.lineTo(jb-ab/2-3*ma/2,db-3*ab/2+ma/2);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N++1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.moveTo(t.x-ma/2+ab/2,t.y-ab/2-ma/2);d.lineTo(t.x-ab/2-3*ma/2,t.y-3*ab/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",fb);mxMarker.addMarker("circlePlus",function(d,p,A,t,z,D,G,ea,N,ta){var ma=t.clone(),ab=fb.apply(this,arguments),jb=z*(G+2*N),db=D*(G+2*N);return function(){ab.apply(this,arguments);d.begin();d.moveTo(ma.x-z*N,ma.y-D*N);d.lineTo(ma.x-2*jb+z*N,ma.y-2*db+D*N);d.moveTo(ma.x-+jb-db+D*N,ma.y-db+jb-z*N);d.lineTo(ma.x+db-jb-D*N,ma.y-db-jb+z*N);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,t,z,D,G,ea,N,ta){var ma=z*(G+N+1),ab=D*(G+N+1),jb=t.clone();t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(jb.x-ab,jb.y+ma);d.quadTo(t.x-ab,t.y+ma,t.x,t.y);d.quadTo(t.x+ab,t.y-ma,jb.x+ab,jb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,t,z,D,G,ea,N,ta){p=z*N*1.118;A=D*N*1.118;z*=G+N;D*=G+N;var ma=t.clone();ma.x-=p;ma.y-=A;t.x+=-z-p;t.y+=-D-A;return function(){d.begin();+d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-D/2,ma.y-D+z/2):d.lineTo(ma.x+D/2-z,ma.y-D-z/2);d.lineTo(ma.x-z,ma.y-D);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,t,z,D,G,ea,N,ta,ma){D*=ea+ta;G*=ea+ta;var ab=z.clone();return function(){p.begin();p.moveTo(ab.x,ab.y);N?p.lineTo(ab.x-D-G/d,ab.y-G+D/d):p.lineTo(ab.x+G/d-D,ab.y-G-D/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=function(d,p,A){return mb(d,["width"],+p,function(t,z,D,G,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(G.x+z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,N){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));d.style.width=Math.round(2*t)/d.view.scale-A})},mb=function(d,p,A,t,z){return bb(d,p,function(D){var G=d.absolutePoints;if(null!=G&&0<G.length){var ea=G.length-1;D=d.view.translate;var N=d.view.scale,ta=A?G[0]:G[ea];G=A?G[1]:G[ea-1];ea=G.x-ta.x;var ma=G.y-ta.y,ab=Math.sqrt(ea*ea+ma*ma);ta=t.call(this,+ab,ea/ab,ma/ab,ta,G);return new mxPoint(ta.x/N-D.x,ta.y/N-D.y)}return null},function(D,G,ea){var N=d.absolutePoints,ta=N.length-1;D=d.view.translate;var ma=d.view.scale,ab=A?N[0]:N[ta];N=A?N[1]:N[ta-1];ta=N.x-ab.x;var jb=N.y-ab.y,db=Math.sqrt(ta*ta+jb*jb);G.x=(G.x+D.x)*ma;G.y=(G.y+D.y)*ma;z.call(this,db,ta/db,jb/db,ab,N,G,ea)})},nb=function(d,p){return function(A){return[mb(A,["startWidth"],!0,function(t,z,D,G,ea){ea=mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(G.x++z*t/4+D*ea/2,G.y+D*t/4-z*ea/2)},function(t,z,D,G,ea,N){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));A.style.startWidth=Math.round(2*t)/A.view.scale-p})]}},qb=function(d){return function(p){return[bb(p,["arrowWidth","arrowSize"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ua.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ua.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-t)*A.height/2)},function(A,t){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(A.y+A.height/2-t.y)/A.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(A.x+A.width-t.x)/A.width))})]}},ub=function(d){return function(p){return[bb(p,["size"],function(A){var t=Math.max(0,Math.min(.5*A.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(A.x,A.y+t)},function(A,t){this.state.style.size=Math.max(0,t.y-A.y)},!0)]}},zb=function(d,p,A){return function(t){var z=[bb(t,["size"],-function(D){var G=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(D.x+G,D.y+G)},function(D,G){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,G.x-D.x),Math.min(D.height,G.y-D.y)))/d)},!1)];A&&mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Cb=function(d,p,A,t,z){A=null!=A?A:.5;return function(D){var G=[bb(D,["size"],function(ea){var O=null!=z?"0"!=mxUtils.getValue(this.state.style,-"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",O?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,sa*(O?1:ea.width))),ea.getCenterY())},function(ea,O,sa){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?O.x-ea.x:Math.max(0,Math.min(A,(O.x-ea.x)/ea.width));this.state.style.size=ea},!1,t)];p&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&G.push(wb(D));return G}},Ab=function(d,p,A){d=null!=d?d:.5;return function(t){var z=[bb(t,["size"],+function(D){var G=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(D.x+G,D.y+G)},function(D,G){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,G.x-D.x),Math.min(D.height,G.y-D.y)))/d)},!1)];A&&mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Cb=function(d,p,A,t,z){A=null!=A?A:.5;return function(D){var G=[bb(D,["size"],function(ea){var N=null!=z?"0"!=mxUtils.getValue(this.state.style,+"fixedSize","0"):null,ta=parseFloat(mxUtils.getValue(this.state.style,"size",N?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,ta*(N?1:ea.width))),ea.getCenterY())},function(ea,N,ta){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?N.x-ea.x:Math.max(0,Math.min(A,(N.x-ea.x)/ea.width));this.state.style.size=ea},!1,t)];p&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&G.push(wb(D));return G}},Ab=function(d,p,A){d=null!=d?d:.5;return function(t){var z=[bb(t,["size"],function(D){var G=null!=A?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",G?A:p)));return new mxPoint(D.x+Math.min(.75*D.width*d,ea*(G?.75:.75*D.width)),D.y+D.height/4)},function(D,G){D=null!=A&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?G.x-D.x:Math.max(0,Math.min(d,(G.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Bb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p}},wb=function(d,p){return bb(d,[mxConstants.STYLE_ARCSIZE],function(A){var t=null!=p?p:A.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var z=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(A.x+A.width-Math.min(A.width/2,z),A.y+t)}z=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(A.x+A.width-Math.min(Math.max(A.width/2,A.height/2),Math.min(A.width,A.height)*z),A.y+t)},function(A,t,z){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(A.width,2*(A.x+A.width-t.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(A.width-t.x+A.x)/Math.min(A.width,A.height))))})},bb=function(d,p,A,t,-z,D,G){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);G&&G(sa)};ea.getPosition=A;ea.setPosition=t;ea.ignoreGrid=null!=z?z:!0;if(D){var O=ea.positionChanged;ea.positionChanged=function(){O.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},yb={link:function(d){return[ib(d,!0,10),ib(d,!1,10)]},pipe:function(d){return[ib(d,!0,10),ib(d,!1,10)]},flexArrow:function(d){var p=+z,D,G){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(ta){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);G&&G(ta)};ea.getPosition=A;ea.setPosition=t;ea.ignoreGrid=null!=z?z:!0;if(D){var N=ea.positionChanged;ea.positionChanged=function(){N.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},yb={link:function(d){return[ib(d,!0,10),ib(d,!1,10)]},pipe:function(d){return[ib(d,!0,10),ib(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,A=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,D,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)+D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)--z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-+z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),A.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,D,G,ea){t=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)+D*t/2,G.y+D*(ea+d.shape.strokewidth*-d.view.scale)-z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=-d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],-!1,function(t,z,D,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/-3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),A.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],-!1,function(t,z,D,G,ea){t=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,O,sa){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/-3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),+d.view.scale)-z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=+d.style.startWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],+!1,function(t,z,D,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/+3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),A.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],+!1,function(t,z,D,G,ea){t=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-D*t/2,G.y+D*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,D,G,ea,N,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,N.x,N.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+D,G.y-z,N.x,N.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/+3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return A},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var A=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(wb(d,A/2))}p.push(bb(d,[mxConstants.STYLE_STARTSIZE],function(t){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(t.getCenterX(),t.y+Math.max(0,Math.min(t.height,z))):new mxPoint(t.x+Math.max(0,Math.min(t.width,z)),t.getCenterY())},function(t,z){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(t.height,z.y-t.y))):Math.round(Math.max(0,Math.min(t.width,z.x-t.x)))},!1,null,function(t){var z=d.view.graph;if(!mxEvent.isShiftDown(t.getEvent())&&!mxEvent.isControlDown(t.getEvent())&&(z.isTableRow(d.cell)||z.isTableCell(d.cell))){t=z.getSwimlaneDirection(d.style);var D=z.model.getParent(d.cell);D=z.model.getChildCells(D,!0);for(var G=[],ea=0;ea<D.length;ea++)D[ea]!=d.cell&&z.isSwimlane(D[ea])&&z.getSwimlaneDirection(z.getCurrentCellStyle(D[ea]))==t&&G.push(D[ea]);z.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],G)}}));return p},label:Bb(),ext:Bb(),rectangle:Bb(),triangle:Bb(),rhombus:Bb(),umlLifeline:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},umlFrame:function(d){return[bb(d,["width","height"],function(p){var A=Math.max(na.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",na.prototype.width))),t=Math.max(1.5*na.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",na.prototype.height)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.width=Math.round(Math.max(na.prototype.corner,Math.min(p.width,A.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*na.prototype.corner,Math.min(p.height,A.y-p.y)))},!1)]},process:function(d){var p=[bb(d,["size"],function(A){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),z=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return t?new mxPoint(A.x+z,A.y+A.height/4):new mxPoint(A.x+A.width*z,A.y+-A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,t.x-A.x)):Math.max(0,Math.min(.5,(t.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[bb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-+A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,t.x-A.x)):Math.max(0,Math.min(.5,(t.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[bb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Sa.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-A)},function(p,A){var t=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/t*2,Math.max(0,p.getCenterX()-A.x)/t*2)))})]},note:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[bb(d,["size"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*t/4)},function(A,t){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(t.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[bb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:Ea.prototype.size));return new mxPoint(p.x+p.width-t*(A?1:@@ -2950,28 +2950,28 @@ p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style"base",da.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(A.x+t*A.width,A.y+A.height)},function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))),D=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(A.x+Math.min(A.width,z*A.width+D),A.y+A.height-t)},function(A,t){var z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[bb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"dy",va.prototype.dy)));-return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[bb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ja.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,-"jettyHeight",Ja.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(p.x+-A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Qa.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Qa.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,+return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[bb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ia.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,+"jettyHeight",Ia.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(p.x++A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ta.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ta.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,A.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},singleArrow:qb(1),doubleArrow:qb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[bb(d,["tabWidth","tabHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"tabWidth",x.prototype.tabWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",x.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(A=p.width-A);return new mxPoint(p.x+A,p.y+t)},function(p,A){var t=Math.max(0,Math.min(p.width,A.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=p.width-t);this.state.style.tabWidth=Math.round(t);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},tape:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[bb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:ub(g.prototype.size),cylinder3:ub(m.prototype.size),offPageConnector:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ha.prototype.size,!0,null,!0,ha.prototype.fixedSize),hexagon:Cb(Z.prototype.size,!0,.5,!0,Z.prototype.fixedSize),-curlyBracket:Cb(ja.prototype.size,!1),display:Cb(ab.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=+curlyBracket:Cb(ja.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=yb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=yb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}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=yb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),vb=new mxPoint(1,0),rb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));var Db=mxUtils.toRadians(-150);vb=mxUtils.getRotatedPoint(vb,Math.cos(Db),Math.sin(Db));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var D=d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,-ea=G[0];G=G[G.length-1];null!=t&&(t=D.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=xb.x,sa=xb.y,ma=vb.x,$a=vb.y,jb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ka){Fa-=db.x;var Ha=La-db.y;La=($a*Fa-ma*Ha)/(O*$a-sa*ma);Fa=(sa*Fa-O*Ha)/(sa*ma-O*$a);jb?(Ka&&(db=new mxPoint(db.x+O*La,db.y+sa*La),z.push(db)),db=new mxPoint(db.x+-ma*Fa,db.y+$a*Fa)):(Ka&&(db=new mxPoint(db.x+ma*Fa,db.y+$a*Fa),z.push(db)),db=new mxPoint(db.x+O*La,db.y+sa*La));z.push(db)};var db=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);A.snapToTerminals=!1;return A}return Fb.apply(this,-arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,+ea=G[0];G=G[G.length-1];null!=t&&(t=D.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var N=xb.x,ta=xb.y,ma=vb.x,ab=vb.y,jb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ka){Fa-=db.x;var Ha=La-db.y;La=(ab*Fa-ma*Ha)/(N*ab-ta*ma);Fa=(ta*Fa-N*Ha)/(ta*ma-N*ab);jb?(Ka&&(db=new mxPoint(db.x+N*La,db.y+ta*La),z.push(db)),db=new mxPoint(db.x++ma*Fa,db.y+ab*Fa)):(Ka&&(db=new mxPoint(db.x+ma*Fa,db.y+ab*Fa),z.push(db)),db=new mxPoint(db.x+N*La,db.y+ta*La));z.push(db)};var db=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);A.snapToTerminals=!1;return A}return Fb.apply(this,+arguments)};C.prototype.constraints=[];H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+(1-z)*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*t));return d};c.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;t=Math.min(p*Math.tan(t),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};da.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var z=p*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,p,.5*(A-t)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-t)));p>=2*t&&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))];Ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ja.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,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*(p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A+t)));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));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};I.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,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*(p+t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A+t)));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));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,@@ -2983,12 +2983,12 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnect0),!1,null,.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A));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};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=-mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,+mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Za.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,z,A));return d};Ja.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ja.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ja.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,+0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};R.prototype.constraints=mxRectangleShape.prototype.constraints;W.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)];N.prototype.constraints=+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)];O.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)];Aa.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)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,@@ -2999,27 +2999,27 @@ new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(n0),!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)];K.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;L.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;Qa.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,+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;Ta.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,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,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*z));return d};Na.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,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,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Oa.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)];Ra.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A));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)];Ua.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));return d};za.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ra.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ra.prototype.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),-!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ta.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(A,p),z=Math.max(0,Math.min(t,t*parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=(A-z)/2;var D=t+z,G=(p-z)/2;z=G+z;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,+parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ua.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ua.prototype.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),+!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Sa.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(A,p),z=Math.max(0,Math.min(t,t*parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=(A-z)/2;var D=t+z,G=(p-z)/2;z=G+z;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),D));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));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*G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,t));return d};fa.prototype.constraints=null;C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,+0),!1,null,G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));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*G,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,t));return d};fa.prototype.constraints=null;B.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)];P.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)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];wa.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(E){q.escape();E=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),E);null!=E&&q.setSelectionCells(E)}function f(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var E=q.getSelectionCells(),Q=0;Q<E.length;Q++)q.cellLabelChanged(E[Q],"")}finally{q.getModel().endUpdate()}}}function l(E,Q,c,g,m){m.getModel().beginUpdate();try{var n=m.getCellGeometry(E);null!=n&&c&&g&&(c/=g,n=n.clone(),1<c?n.height=n.width/c:n.width=n.height*c,m.getModel().setGeometry(E,-n));m.setCellStyles(mxConstants.STYLE_CLIP_PATH,Q,[E]);m.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[E])}finally{m.getModel().endUpdate()}}var u=this.editorUi,y=u.editor,q=y.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(u.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";u.openFile()});var H=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var E=q.view.scale,+n));m.setCellStyles(mxConstants.STYLE_CLIP_PATH,Q,[E]);m.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[E])}finally{m.getModel().endUpdate()}}var u=this.editorUi,y=u.editor,q=y.graph,C=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(u.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";u.openFile()});var H=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var E=q.view.scale,Q=q.container.scrollLeft,c=q.container.scrollTop,g=q.view.translate.x,m=q.view.translate.y;u.actions.get("resetView").funct();1E-5>Math.abs(E-q.view.scale)&&5>Math.abs(Q-q.container.scrollLeft)&&5>Math.abs(c-q.container.scrollTop)&&g==q.view.translate.x&&m==q.view.translate.y&&u.actions.get("fitWindow").funct()},null,null,"Enter");H.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",H);this.addAction("keyPressEnter",function(){q.isSelectionEmpty()?u.actions.get("smartFit").funct():q.isEnabled()&&q.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){u.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(E,Q){try{var c=mxUtils.parseXml(E);y.graph.setSelectionCells(y.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));u.showDialog((new OpenDialog(this)).container,-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){u.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){u.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){u.showDialog((new ExportDialog(u)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var E=new EditDiagramDialog(u);u.showDialog(E.container,620,420,!0,!1);E.init()}).isEnabled=B;this.addAction("pageSetup...",-function(){u.showDialog((new PageSetupDialog(u)).container,320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){u.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){u.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){u.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");this.addAction("cut",function(){var E=null;try{E=u.copyXml(),+320,220,!0,!0,function(){window.openFile=null})}).isEnabled=C;this.addAction("save",function(){u.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=C;this.addAction("saveAs...",function(){u.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){u.showDialog((new ExportDialog(u)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var E=new EditDiagramDialog(u);u.showDialog(E.container,620,420,!0,!1);E.init()}).isEnabled=C;this.addAction("pageSetup...",+function(){u.showDialog((new PageSetupDialog(u)).container,320,240,!0,!0)}).isEnabled=C;this.addAction("print...",function(){u.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){u.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){u.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");this.addAction("cut",function(){var E=null;try{E=u.copyXml(),null!=E&&q.removeCells(E,!1)}catch(Q){}try{null==E&&mxClipboard.cut(q)}catch(Q){u.handleError(Q)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{u.copyXml()}catch(E){}try{mxClipboard.copy(q)}catch(E){u.handleError(E)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){u.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(E){u.pasteFromClipboard(q.popupMenuHandler.getTriggerPoint())});this.addAction("swap",function(){var E=q.getSelectionCells();2==E.length&&q.swapShapes(E[0],E[1])});this.addAction("copySize",function(){var E=q.getSelectionCell();q.isEnabled()&&null!=E&&q.getModel().isVertex(E)&&(E=q.getCellGeometry(E),null!=E&&(u.copiedSize=new mxRectangle(E.x,E.y,E.width,E.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=u.copiedSize){q.getModel().beginUpdate();try{for(var E=q.getResizableCells(q.getSelectionCells()),Q=0;Q<E.length;Q++)if(q.getModel().isVertex(E[Q])){var c=q.getCellGeometry(E[Q]);null!=c&&(c=c.clone(),c.width=u.copiedSize.width,c.height=u.copiedSize.height,q.getModel().setGeometry(E[Q],c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var E=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=E&&(E=E.cloneValue(),null==E||isNaN(E.nodeType)||(u.copiedValue=E))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+B");this.addAction("copyAsText",function(){var E=q.getSelectionCell();@@ -3036,11 +3036,11 @@ q.isTableRow(E[0])?(E=q.getCellsForGroup(E),1<E.length&&q.setSelectionCell(q.groQ.length&&q.setSelectionCells(Q)}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var E=q.getSelectionCells();if(null!=E){for(var Q=[],c=0;c<E.length;c++)q.isTableRow(E[c])||q.isTableCell(E[c])||Q.push(E[c]);q.removeCellsFromParent(Q);0<Q.length&&q.scrollCellToVisible(Q[0])}}});this.addAction("edit",function(){q.isEnabled()&&q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var E=q.getSelectionCell()||q.getModel().getRoot();u.showDataDialog(E)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&null!=E&&q.isCellEditable(E)){var Q="";if(mxUtils.isNode(E.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&E.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=E.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=E.value.getAttribute("tooltip"));null!=c&&(Q=c)}Q=new TextareaDialog(u,mxResources.get("editTooltip")+":",Q,function(g){q.setTooltipForCell(E,g)});u.showDialog(Q.container,320,200,!0,!0);Q.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+T");this.addAction("openLink",function(){var E=q.getLinkForCell(q.getSelectionCell());null!=E&&q.openLink(E)});this.addAction("editLink...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&null!=E&&q.isCellEditable(E)){var Q=q.getLinkForCell(E,!0)||"";u.showLinkDialog(Q,mxResources.get("ok"),function(c,g,m){q.getModel().beginUpdate();try{q.setLinkForCell(E,-0<c.length?c:null),q.setAttributeForCell(E,"linkTarget",m)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(E))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),u.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){u.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&+0<c.length?c:null),q.setAttributeForCell(E,"linkTarget",m)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(E))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),u.actions.get("image").funct())})).isEnabled=C;this.addAction("editImage...",function(){u.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&u.showLinkDialog("",mxResources.get("ok"),function(E,Q,c){E=mxUtils.trim(E);if(0<E.length){var g=null,m=q.getLinkTitle(E);null!=Q&&0<Q.length&&(g=Q[0].iconUrl,m=Q[0].name||Q[0].type,m=m.charAt(0).toUpperCase()+m.substring(1),30<m.length&&(m=m.substring(0,30)+"..."));Q=new mxCell(m,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+g:"spacing=10;"));Q.vertex=!0;g=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([Q],-!0));Q.geometry.x=g.x;Q.geometry.y=g.y;q.setAttributeForCell(Q,"linkTarget",c);q.setLinkForCell(Q,E);q.cellSizeUpdated(Q,!0);q.getModel().beginUpdate();try{Q=q.addCell(Q),q.fireEvent(new mxEventObject("cellsInserted","cells",[Q]))}finally{q.getModel().endUpdate()}q.setSelectionCell(Q);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var E=q.getSelectedElement(),+!0));Q.geometry.x=g.x;Q.geometry.y=g.y;q.setAttributeForCell(Q,"linkTarget",c);q.setLinkForCell(Q,E);q.cellSizeUpdated(Q,!0);q.getModel().beginUpdate();try{Q=q.addCell(Q),q.fireEvent(new mxEventObject("cellsInserted","cells",[Q]))}finally{q.getModel().endUpdate()}q.setSelectionCell(Q);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=C;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var E=q.getSelectedElement(),Q=q.getParentByName(E,"A",q.cellEditor.textarea),c="";if(null==Q&&null!=E&&null!=E.getElementsByTagName)for(var g=E.getElementsByTagName("a"),m=0;m<g.length&&null==Q;m++)g[m].textContent==E.textContent&&(Q=g[m]);null!=Q&&"A"==Q.nodeName&&(c=Q.getAttribute("href")||"",q.selectNode(Q));var n=q.cellEditor.saveSelection();u.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(x){q.cellEditor.restoreSelection(n);null!=x&&q.insertLink(x)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():-this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var E=q.getSelectionCells();if(null!=E){q.getModel().beginUpdate();try{for(var Q=0;Q<E.length;Q++){var c=E[Q];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",+this.get("editLink").funct()})).isEnabled=C;this.addAction("autosize",function(){var E=q.getSelectionCells();if(null!=E){q.getModel().beginUpdate();try{for(var Q=0;Q<E.length;Q++){var c=E[Q];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();var E=q.getCommonStyle(q.getSelectionCells());E="1"==mxUtils.getValue(E,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var Q=q.getEditableCells(q.getSelectionCells()),c=0;c<Q.length;c++)if(state=q.getView().getState(Q[c]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==E)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",E,[Q[c]]);else if("0"==g&&"1"==E){var m=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(m));q.setCellStyles("html",E,[Q[c]])}}u.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=E?E:"0"],"cells",Q))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var E=q.getView().getState(q.getSelectionCell()),Q="wrap";q.stopEditing();null!=E&&"wrap"==E.style[mxConstants.STYLE_WHITE_SPACE]&&(Q=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,Q)});this.addAction("rotation",function(){var E="0",Q=q.getView().getState(q.getSelectionCell());null!=Q&&(E=Q.style[mxConstants.STYLE_ROTATION]||E);E=new FilenameDialog(u,E,mxResources.get("apply"),function(c){null!=c&&0<c.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");u.showDialog(E.container,375,80,!0,!0);E.init()});this.addAction("resetView",function(){q.zoomTo(1);u.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",@@ -3049,10 +3049,10 @@ q.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");thismxResources.get("apply"),mxUtils.bind(this,function(Q){Q=parseInt(Q);!isNaN(Q)&&0<Q&&q.zoomTo(Q/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(E.container,300,80,!0,!0);E.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var E=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(Q){Q=parseInt(Q);!isNaN(Q)&&0<Q&&(Q=new ChangePageSetup(u,null,null,null,Q/100),Q.ignoreColor=!0,Q.ignoreImage=!0,q.model.execute(Q))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(E.container,300,80,!0,!0);E.init()}));H=null;H=this.addAction("grid",function(){q.setGridEnabled(!q.isGridEnabled());q.defaultGridEnabled=q.isGridEnabled();u.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+G");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.isGridEnabled()});H.setEnabled(!1);H=this.addAction("guides",function(){q.graphHandler.guidesEnabled=!q.graphHandler.guidesEnabled;u.fireEvent(new mxEventObject("guidesEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.graphHandler.guidesEnabled});H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;u.fireEvent(new mxEventObject("enableAnimationsChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return Editor.enableAnimations});H=this.addAction("tooltips",function(){q.tooltipHandler.setEnabled(!q.tooltipHandler.isEnabled());-u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});H=this.addAction("collapseExpand",function(){var E=new ChangePageSetup(u);E.ignoreColor=!0;E.ignoreImage=!0;E.foldingEnabled=!q.foldingEnabled;q.model.execute(E)});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));+u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});H=this.addAction("collapseExpand",function(){var E=new ChangePageSetup(u);E.ignoreColor=!0;E.ignoreImage=!0;E.foldingEnabled=!q.foldingEnabled;q.model.execute(E)});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.foldingEnabled});H.isEnabled=C;H=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return q.pageVisible});H=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;u.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());u.fireEvent(new mxEventObject("connectionPointsChanged"))},-null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});-H.setToggleAction(!0);H.setSelectedCallback(function(){return u.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var E="";mxResources.isLanguageSupported(mxClient.language)&&(E="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+E+".html")});var S=!1;H=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});H.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",H);H=+null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});H.isEnabled=C;H=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});+H.setToggleAction(!0);H.setSelectedCallback(function(){return u.editor.autosave});H.isEnabled=C;H.visible=!1;this.addAction("help",function(){var E="";mxResources.isLanguageSupported(mxClient.language)&&(E="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+E+".html")});var S=!1;H=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});H.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",H);H=mxUtils.bind(this,function(E,Q,c,g){return this.addAction(E,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,Q,m);(Q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(m,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(Q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(m,function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(Q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(m,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<m.length;n++)0==q.model.getChildCount(m[n])&&q.autoSizeCell(m[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});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(){u.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){u.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){u.menus.pickColor(mxConstants.STYLE_FILLCOLOR,@@ -3073,43 +3073,43 @@ Math.max(1,E-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.sh!q.isCellLocked(q.getDefaultParent())){var E=mxResources.get("image")+" ("+mxResources.get("url")+"):",Q=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=Q&&(c=Q.style[mxConstants.STYLE_IMAGE]||c,g=Q.style[mxConstants.STYLE_CLIP_PATH]||g);var m=q.cellEditor.saveSelection();u.showImageDialog(E,c,function(n,x,F,I,M,L){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(m),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var aa=null;q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ja=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ja.x;K[0].geometry.y=ja.y;null!=I&&l(K[0],I,M,L,q);aa=K;q.fireEvent(new mxEventObject("cellsInserted","cells",aa))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var ca=q.getCurrentCellStyle(K[0]);"image"!=ca[mxConstants.STYLE_SHAPE]&&"label"!=ca[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var oa=q.getModel().getGeometry(ba);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(ba,oa))}null!=I&&l(ba,I,M,L,q)}}finally{q.getModel().endUpdate()}null!=aa&&(q.setSelectionCells(aa),-q.scrollCellToVisible(aa[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=B;this.addAction("crop...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E){var Q=q.getCurrentCellStyle(E),c=Q[mxConstants.STYLE_IMAGE],g=Q[mxConstants.STYLE_SHAPE];c&&"image"==g&&(Q=new CropImageDialog(u,c,Q[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(E,m,n,x,q)}),u.showDialog(Q.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",+q.scrollCellToVisible(aa[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=C;this.addAction("crop...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E){var Q=q.getCurrentCellStyle(E),c=Q[mxConstants.STYLE_IMAGE],g=Q[mxConstants.STYLE_SHAPE];c&&"image"==g&&(Q=new CropImageDialog(u,c,Q[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(E,m,n,x,q)}),u.showDialog(Q.container,300,390,!0,!0))}}).isEnabled=C;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(u,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+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(){u.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return u.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(u,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+-"+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E&&null!=E.geometry){var Q=new ConnectionPointsDialog(u,E);u.showDialog(Q.container,350,450,!0,!1,function(){Q.destroy()});Q.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=B};-Actions.prototype.addAction=function(b,f,l,u,y,q){var B=b;"..."==B.substring(B.length-3)&&(B=B.substring(0,B.length-3));return this.put(B,new Action(b,f,l,u,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,l,u,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=l?l:!0;this.iconCls=u;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);+"+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E&&null!=E.geometry){var Q=new ConnectionPointsDialog(u,E);u.showDialog(Q.container,350,450,!0,!1,function(){Q.destroy()});Q.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=C};+Actions.prototype.addAction=function(b,f,l,u,y,q){var C=b;"..."==C.substring(C.length-3)&&(C=C.substring(0,C.length-3));return this.put(C,new Action(b,f,l,u,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,l,u,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=l?l:!0;this.iconCls=u;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};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,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);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 l=!0,u=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(B){l&&(window.clearTimeout(u),null!=f&&f(B))}),q=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,-function(B){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,B))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};+DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var l=!0,u=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(C){l&&(window.clearTimeout(u),null!=f&&f(C))}),q=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,+function(C){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,C))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};DrawioFile.prototype.updateFile=function(b,f,l,u,y){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,-u,y):this.reloadFile(b,f))}catch(B){null!=f&&f(B)}}),f))};-DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=u?u:B,q)],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!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(B,-this.isRealtime()?this.ownPages:this.ui.pages):null,Q=this.ui.patchPages(this.ui.clonePages(B),H[0]),c=this.ui.getHashValueForPages(Q,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",q,"patched",Q,"patches",H,"changes",E,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,H,null,null,"mergeFile",+u,y):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};+DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),H=[this.ui.diffPages(null!=u?u:C,q)],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!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(C,+this.isRealtime()?this.ownPages:this.ui.pages):null,Q=this.ui.patchPages(this.ui.clonePages(C),H[0]),c=this.ui.getHashValueForPages(Q,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",q,"patched",Q,"patches",H,"changes",E,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,H,null,null,"mergeFile",c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var m=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?E:null,null,y);null==m||mxUtils.isEmptyObject(m)||H.push(m)}this.patch(H,DrawioFile.LAST_WRITE_WINS?E:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(F);try{var n=this.getCurrentUser(),x=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(I){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=l&&l(F)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var u=0;u<b.length;u++){var y=f.encode(new mxGraphModel(b[u].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[u].getId());b[u].viewState&&this.ui.editor.graph.saveViewState(b[u].viewState,y,!0);l.appendChild(y)}return mxUtils.getPrettyXml(l)};DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,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(),E=null!=S?S.id:"unknown",Q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>+DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,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(),E=null!=S?S.id:"unknown",Q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(m){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(m.getShadowPages()),F="unknown",I="unknown",M="unknown";try{var L=null!=m.initialData&&0<m.initialData.length?mxUtils.parseXml(m.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(F=L.getAttribute("version")),null!=L.getAttribute("agent")&&(I=L.getAttribute("agent")),null!=L.getAttribute("type")&&(M=L.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+-n+" in "+y,null,this.getMode()+"."+Q,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+I)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+Q,action:y,label:"user_"++n+" in "+y,null,this.getMode()+"."+Q,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=C?"-current_"+C:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+I)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+Q,action:y,label:"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(m){}};-DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=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",E=this.getTitle(),Q=E.lastIndexOf(".");B="xml";0<Q&&(B=E.substring(Q));var c=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()+" ("+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!=f?"\n\n"+f:+DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),H=null!=C?this.ui.hashValue(C.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),Q=E.lastIndexOf(".");C="xml";0<Q&&(C=E.substring(Q));var c=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()+" ("+C+")\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!=f?"\n\n"+f:"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,u)}catch(g){}};-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),-[l]),this.ui.restoreViewState(B,q,y),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([l]),S.fileChanged());this.ui.restoreViewState(B,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(H){null!=f&&f(H)}};+DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),+[l]),this.ui.restoreViewState(C,q,y),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([l]),S.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(H){null!=f&&f(H)}};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 l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};-DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),B=y.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var E=H.foldingEnabled,Q=H.mathEnabled,c=H.cellRenderer.redraw;H.cellRenderer.redraw=function(I){I.view.graph.isEditing(I.cell)&&(I.view.graph.scrollCellToVisible(I.cell),I.view.graph.cellEditor.resize());c.apply(this,arguments)};H.model.beginUpdate();+DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var E=H.foldingEnabled,Q=H.mathEnabled,c=H.cellRenderer.redraw;H.cellRenderer.redraw=function(I){I.view.graph.isEditing(I.cell)&&(I.view.graph.scrollCellToVisible(I.cell),I.view.graph.cellEditor.resize());c.apply(this,arguments)};H.model.beginUpdate();try{if(l){for(var g=this.ui.pages.slice(),m=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,m)&&this.ui.selectPage(m,!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);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=B,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)Q!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(E!=H.foldingEnabled?+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=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)Q!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(E!=H.foldingEnabled?H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!u&&(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",l)}return b};DrawioFile.prototype.save=function(b,f,l,u,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",u,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});-else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=l)l(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 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};+else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};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.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,l){};DrawioFile.prototype.saveFile=function(b,f,l,u){};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};@@ -3148,7 +3148,7 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.uthis.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};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()||this.ui.updateStatus(mxUtils.bind(this,function(){var l=this.getErrorMessage(b);null!=l&&60<l.length&&(l=l.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=l?" ("+mxUtils.htmlEntities(l)+")":"")+"</div>")}))))};-DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),u=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,l,u,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),u=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,l,u,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=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,u,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),u)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,u,y):this.invalidChecksum&&f?this.showRefreshDialog(l,u,this.getErrorMessage(b)):f?this.showConflictDialog(y,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(l,u)}))};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 l=0;l<f.length;l++){var u=f[l].node;if(null!=u&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[l].getId())){var y=u.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(u));b?0==q.length&&null!=y&&(EditorUi.removeChildNodes(u),mxUtils.setTextContent(u,Graph.compressNode(y)),EditorUi.debug("DrawioFile.compressionChanged",@@ -3156,18 +3156,18 @@ DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?thDrawioFile.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.ui.updateStatus(mxUtils.bind(this,function(){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(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",l);b(f,l)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};-DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,B)}catch(E){this.invalidChecksum=+DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,C)}catch(E){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=u&&u(E);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,E)}catch(Q){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(E){this.descriptorChanged(),null!=u&&u(E)}};-DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"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!=l&&l(H)}),mxUtils.bind(this,function(H){null!=u&&u(H)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(H){null!=u&&u(H)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();+C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=l&&l(H)}),mxUtils.bind(this,function(H){null!=u&&u(H)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(H){null!=u&&u(H)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"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 l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=f.lastIndexOf(".");return b===(0<l?f.substring(l):"")}return b==f};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,l){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,l,u,y,q,B){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;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};+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,l){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,l,u,y,q,C){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=C};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,l,u,y){this.saveAs(this.title,f,l,u,y)};LocalFile.prototype.saveAs=function(b,f,l,u,y){this.saveFile(b,!1,f,l,null,u,y)};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,l,u,y,q,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var H=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),Q=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);B||this.desc.lastModified==x.lastModified?n.write(H?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,+LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var H=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),Q=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(H?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var I=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,I,E,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,H?"image/png":"text/xml",H);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&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(c)}));E()}});H?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){Q(c)}),u,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):Q(S)};LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};(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=@@ -3220,8 +3220,8 @@ Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tEditor.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||"1"==urlParams.enableSW||/.*\.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.pasteAtMousePointer=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.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.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(J,N){return 1==J.vertices.length?(N=N.editorUi.editor.graph.model,J=N.getParent(J.vertices[0]),N.isEdge(J)||N.isVertex(J)):!1},getValue:function(J,N){return"inherit"==mxUtils.getValue(J.style,v)},valueChanged:function(J,N,T,V){N=V.editorUi.editor.graph;-"1"==J?N.setCellStyles(v,"inherit",T.vertices):N.setCellStyles(v,null,T.vertices)}}};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",+!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(J,O){return 1==J.vertices.length?(O=O.editorUi.editor.graph.model,J=O.getParent(J.vertices[0]),O.isEdge(J)||O.isVertex(J)):!1},getValue:function(J,O){return"inherit"==mxUtils.getValue(J.style,v)},valueChanged:function(J,O,T,V){O=V.editorUi.editor.graph;+"1"==J?O.setCellStyles(v,"inherit",T.vertices):O.setCellStyles(v,null,T.vertices)}}};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",@@ -3252,11 +3252,11 @@ dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"ResizadispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,v){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.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,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(N){}};v.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(J){}})();+Editor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(O){}};v.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(J){}})();Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(J){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var J=document.createElement("style");-J.type="text/css";var N=J.appendChild,T=document,V=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(J,V.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=-rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var V=N[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,N,T){var V=k.state.strokeColor,U=k.state.strokeWidth,X=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);-k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(X)};v._drawToContext=function(J,N,T){J.begin();for(var V=0;V<N.ops.length;V++){var U=N.ops[V],X=U.data;switch(U.op){case "move":J.moveTo(X[0],X[1]);break;case "bcurveTo":J.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":J.lineTo(X[0],X[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,+J.type="text/css";var O=J.appendChild,T=document,V=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}O.call(J,V.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=+rough.canvas({getContext:function(){return k}});v.draw=function(J){var O=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<O.length;T++){var V=O[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,O,T){var V=k.state.strokeColor,U=k.state.strokeWidth,X=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);+k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,O,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(X)};v._drawToContext=function(J,O,T){J.begin();for(var V=0;V<O.ops.length;V++){var U=O.ops[V],X=U.data;switch(U.op){case "move":J.moveTo(X[0],X[1]);break;case "bcurveTo":J.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":J.lineTo(X[0],X[1])}}J.end();"fillPath"===O.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,U,X){this.canvas=V;this.rc=U;this.shape=X;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=@@ -3272,16 +3272,16 @@ U,X,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,argumentV[U];V.stroke!=mxConstants.NONE&&null!=V.stroke||delete this.nextShape.options.stroke;V.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(V){return new k(V,Editor.createRoughCanvas(V),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(V){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(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,X,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();-var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};X||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;N.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();X&&null!=fa&&(V.addTolerance=function(){})}N.apply(this,arguments);+"sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,X,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var O=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();+var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};X||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;O.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();X&&null!=fa&&(V.addTolerance=function(){})}O.apply(this,arguments);V.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,U,X,fa,na,la){null!=V.handJiggle&&V.handJiggle.constructor==k?(V.handJiggle.passThrough=!0,T.apply(this,arguments),V.handJiggle.passThrough=!1):T.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,J){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var V=0;V<N.length;V++)if("mxgraph"==N[V].getAttribute("class")){T.push(N[V]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&-(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,J),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.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)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==-k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&+k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,J){if(null!=k&&"undefined"!==typeof pako){var O=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=O&&0<O.length)for(var V=0;V<O.length;V++)if("mxgraph"==O[V].getAttribute("class")){T.push(O[V]);break}0<T.length&&(O=T[0].getAttribute("data-mxgraph"),null!=O?(T=JSON.parse(O),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&+(O=mxUtils.getTextContent(T[0]),O=Graph.decompress(O,null,J),0<O.length&&(k=mxUtils.parseXml(O),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(O=k.getAttribute("content"),null!=O&&"<"!=O.charAt(0)&&"%"!=O.charAt(0)&&(O=unescape(window.atob?atob(O):Base64.decode(cont,O))),null!=O&&"%"==O.charAt(0)&&(O=decodeURIComponent(O)),null!=O&&0<O.length)k=mxUtils.parseXml(O).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==+k.nodeName&&(O=k.getElementsByTagName("diagram"),0<O.length&&(T=O[Math.max(0,Math.min(O.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var O=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<O.length?(v=Graph.decompress(O,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(T=k[0],J&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),J=null;0<v.length?J=Graph.decompress(v):(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 v=-new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}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 J=k.indexOf("EmbeddedFile");if(-1<J){var N=k.indexOf("stream",J)+9;if(0<k.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(J=-k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var V=[],U=null;T<k.length;){var X=k.charCodeAt(T);T+=-1;10!=X&&(J+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==X&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=+new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}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 J=k.indexOf("EmbeddedFile");if(-1<J){var O=k.indexOf("stream",J)+9;if(0<k.substring(J,O).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",O-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(O,T)),{to:"string"})}}for(J=+k.indexOf("/ObjStm");0<J;){O=k.indexOf("stream",J)+9;T=k.indexOf("endstream",O-1);O=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(O,T)),{to:"string"});T=O.indexOf("/Subject <");if(0<T){J=O.substring(T+14,O.indexOf(">",T));if(null!=J){v=J;J=[];for(O=0;O<v.length;O+=2)T=v.substr(O,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=O=0;for(var V=[],U=null;T<k.length;){var X=k.charCodeAt(T);T+=+1;10!=X&&(J+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(O)?O++:O=0;if(19==O){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==X&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,J=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"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,v){var J=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(J=mxUtils.getTextContent(v[0])));return null!=J?mxUtils.trim(J):J};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,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}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=@@ -3297,51 +3297,51 @@ k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=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 J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));v.parentNode.insertBefore(J,v);k=k.split("url(");for(J=1;J<k.length;J++){var N=k[J].indexOf(")");N=Editor.trimCssUrl(k[J].substring(0,N));var T=document.createElement("link");-T.setAttribute("rel","preload");T.setAttribute("href",N);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,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=+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 J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));v.parentNode.insertBefore(J,v);k=k.split("url(");for(J=1;J<k.length;J++){var O=k[J].indexOf(")");O=Editor.trimCssUrl(k[J].substring(0,O));var T=document.createElement("link");+T.setAttribute("rel","preload");T.setAttribute("href",O);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,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=[],J=0;J<k;J++)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(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&&(J=null!=this.graph.themes?-this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=J&&(N=new mxCodec(J.ownerDocument),N.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 N=new mxCodec(J.ownerDocument);N.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));+this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=J&&(O=new mxCodec(J.ownerDocument),O.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 O=new mxCodec(J.ownerDocument);O.decode(J,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(T){T=T.split("^");return{name:T[0],url:T[1]}}),J=0;J<v.length;J++)this.graph.addExtFont(v[J].name,v[J].url)}catch(T){console.log("ExtFonts format error: "+T.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(k,v){k=null!=k?k:!0;var J=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",-this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=N&&J.setAttribute("backgroundImage",JSON.stringify(N));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&&(N=this.graph.extFonts.map(function(T){return T.name+-"^"+T.url}),J.setAttribute("extFonts",N.join("|")));return J};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 J=mxUtils.parseXml(v).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=+this.graph.currentStyle);var O=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=O&&J.setAttribute("backgroundImage",JSON.stringify(O));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&&(O=this.graph.extFonts.map(function(T){return T.name++"^"+T.url}),J.setAttribute("extFonts",O.join("|")));return J};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 J=mxUtils.parseXml(v).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(O){}return!1};Editor.prototype.extractGraphModel=function(k,v,J){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 u=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=-function(){u.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 J=function(){N=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 N=null;Editor.doMathJaxRender=-function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(X){MathJax.typesetClear([U]),null!=X.retry?(N=U,X.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+X.toString())}};window.MathJax=null!=+function(){u.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 J=function(){O=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 O=null;Editor.doMathJaxRender=+function(U){try{null==O?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):O!=U&&Editor.mathJaxQueue.push(U)}catch(X){MathJax.typesetClear([U]),null!=X.retry?(O=U,X.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+X.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 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 T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(X,fa){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)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",k);v[0].parentNode.appendChild(V)}}};-Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],N=0,T=!0,V;k=$jscomp.makeIterator(k);for(V=k.next();!V.done;V=k.next())V=V.value,'"'===V?(T&&V===v&&(J[N]+=V),T=!T):","===V&&T?V=J[++N]="":J[N]+=V,v=V;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 v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J=+Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],O=0,T=!0,V;k=$jscomp.makeIterator(k);for(V=k.next();!V.done;V=k.next())V=V.value,'"'===V?(T&&V===v&&(J[O]+=V),T=!T):","===V&&T?V=J[++O]="":J[O]+=V,v=V;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 v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(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,J=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+-"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),X=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||-299<na.getStatus()?X():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&X()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=-J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<V.length?V.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(X,fa){X=k.getElementsByTagName(X);for(var na=0;na<X.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,-function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(X[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,V,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&-3)<<4);v+="==";break}V=k.charCodeAt(J++);if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&-3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,V,U,X){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&+"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,J=this;k.convert=function(O){null!=O&&navigator.onLine&&("http://"!=O.substring(0,7)&&"https://"!=O.substring(0,8)||O.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(O)?"chrome-extension://"!=O.substring(0,19)&&(O=v.apply(this,arguments)):O=PROXY_URL++"?url="+encodeURIComponent(O));return O};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,O,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),X=mxUtils.bind(this,function(){null!=O?this.convertImageToDataUri(k,v,J,O,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||+299<na.getStatus()?X():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&X()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{O=null!=O&&T?O:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(O,O);na.height=fa.height*O;na.width=fa.width*O;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=+J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,O){function T(){0<V.length?V.shift()():v(k)}null==O&&(O=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(X,fa){X=k.getElementsByTagName(X);for(var na=0;na<X.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=O.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,+function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(X[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,O=k.length,T,V,U;J<O;){T=k.charCodeAt(J++)&255;if(J==O){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&+3)<<4);v+="==";break}V=k.charCodeAt(J++);if(J==O){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&+3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,O,T,V,U,X){try{var fa=!U&&(O||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(V=null!=V?V:"data:image/png;base64,",la=V+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:na})},X)});na()}catch(la){null!=-J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),N=JSON.parse(J);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=-N&&0<N.length&&(T=N[0].getAttribute("href"));for(var V=1;V<J.length;V++)if(N=J[V].indexOf(")"),0<N){var U=Editor.trimCssUrl(J[V].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[V].substring(N))}else v.push(J[V])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));-J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,X=J[k].indexOf("format(",V);0<X&&(U=Editor.trimCssUrl(J[k].substring(X+-7,J[k].indexOf(")",X))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na=-"application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,V)),U)}T()}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 J=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(J.join(""),k)}),-V=0;V<v.length;V++)mxUtils.bind(this,function(U,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(X),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[X]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+X+");\n");T()}))):J.push(this.cachedGoogleFonts[X]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+X+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");-if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var N=mxUtils.getTextContent(v[J]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],V=0;V<N.length;V++)"@import"==N[V].substring(0,7)?v.push(N[V]):T.push(N[V]);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")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var N=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=-function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(ra){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ra.drawImage(Ca,-0,0);k(Na,ra)},0):(Ra.drawImage(Ca,0,0),k(Na,ra))},Na=document.createElement("canvas"),Oa=parseInt(ra.getAttribute("width")),Qa=parseInt(ra.getAttribute("height"));X=null!=X?X:1;null!=v&&(X=V?Math.min(1,Math.min(3*v/(4*Qa),v/Oa)):v/Oa);X=this.getMaxCanvasScale(Oa,Qa,X);Oa=Math.ceil(X*Oa);Qa=Math.ceil(X*Qa);Na.setAttribute("width",Oa);Na.setAttribute("height",Qa);var Ra=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ra.beginPath();Ra.rect(0,0,Oa,Qa);Ra.fillStyle="dark"==Aa&&-"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ra.fill()}1!=X&&Ra.scale(X,X);if(Ja){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*X,W=qa.getGraphBounds(),ia=Ea.translate.x*C,ka=Ea.translate.y*C,pa=ia+(W.x-ia)/C-ya,xa=ka+(W.y-ka)/C-ya,ta=new Image;ta.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*X,R)),Ia=-Math.round(R-mxUtils.mod((ka-xa)*X,-R));ua<Oa;ua+=R)for(var Va=Ia;Va<Qa;Va+=R)Ra.drawImage(ta,ua/X,Va/X);va()}catch(Wa){null!=T&&T(Wa)}};ta.onerror=function(ua){null!=T&&T(ua)};ta.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(ra);this.graph.mathEnabled&&this.addMathCss(ra);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ra,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ra))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,-function(va){try{null!=va&&this.addFontCss(ra,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(ra){null!=T&&T(ra)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,B=0;8>B;B++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];-return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function X(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,-4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=X(J)+X(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=X(J.length)+v+J+X(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?+J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),O=JSON.parse(J);null!=O&&null!=O.error&&null!=O.error.message&&(v=O.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var O=null!=k?k.lastIndexOf("/"):-1;0<=O&&(k=k.substring(0,O+1));O=document.getElementsByTagName("base");var T=null;null!=+O&&0<O.length&&(T=O[0].getAttribute("href"));for(var V=1;V<J.length;V++)if(O=J[V].indexOf(")"),0<O){var U=Editor.trimCssUrl(J[V].substring(0,O));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[V].substring(O))}else v.push(J[V])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));+J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),O=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==O){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,X=J[k].indexOf("format(",V);0<X&&(U=Editor.trimCssUrl(J[k].substring(X++7,J[k].indexOf(")",X))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;O++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na=+"application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;O--;T()}),mxUtils.bind(this,function(ya){O--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,V)),U)}T()}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 J=[],O=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==O&&this.embedCssFonts(J.join(""),k)}),+V=0;V<v.length;V++)mxUtils.bind(this,function(U,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(O++,this.loadUrl(Graph.rewriteGoogleFontUrl(X),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[X]=fa;J.push(fa+"\n");O--;T()}),mxUtils.bind(this,function(fa){O--;J.push("@import url("+X+");\n");T()}))):J.push(this.cachedGoogleFonts[X]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+X+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");+if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var O=mxUtils.getTextContent(v[J]);0>O.indexOf("mxPageSelector")&&0<O.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),O=v.split("\n");v=[];for(var T=[],V=0;V<O.length;V++)"@import"==O[V].substring(0,7)?v.push(O[V]):T.push(O[V]);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")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var O=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(O/k,O/v))};Editor.prototype.exportToCanvas=+function(k,v,J,O,T,V,U,X,fa,na,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=O);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ua.drawImage(Ca,+0,0);k(Na,sa)},0):(Ua.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),Ra=parseInt(sa.getAttribute("width")),Ta=parseInt(sa.getAttribute("height"));X=null!=X?X:1;null!=v&&(X=V?Math.min(1,Math.min(3*v/(4*Ta),v/Ra)):v/Ra);X=this.getMaxCanvasScale(Ra,Ta,X);Ra=Math.ceil(X*Ra);Ta=Math.ceil(X*Ta);Na.setAttribute("width",Ra);Na.setAttribute("height",Ta);var Ua=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ua.beginPath();Ua.rect(0,0,Ra,Ta);Ua.fillStyle="dark"==Aa&&+"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ua.fill()}1!=X&&Ua.scale(X,X);if(Ia){var Ea=qa.view,B=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*X,W=qa.getGraphBounds(),ia=Ea.translate.x*B,ka=Ea.translate.y*B,pa=ia+(W.x-ia)/B-ya,xa=ka+(W.y-ka)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*X,R)),Ja=-Math.round(R-mxUtils.mod((ka-xa)*X,+R));ua<Ra;ua+=R)for(var Va=Ja;Va<Ta;Va+=R)Ua.drawImage(ra,ua/X,Va/X);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,+function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,C=0;8>C;C++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,O){for(var T=0;T<O;T++)k=Editor.crcTable[(k^v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];+return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,O,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function X(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,+4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(O/.0254),J=X(J)+X(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+O;O=4294967295;O=Editor.updateCRC(O,v,0,4);O=Editor.updateCRC(O,J,0,J.length);T+=X(J.length)+v+J+X(O^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){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,v){var J=null;null!=k.editor.graph.getModel().getParent(v)?J=v.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var E=Format.prototype.init;Format.prototype.init=function(){E.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var Q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?-Q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;if(J.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},-function(V){v.editor.setAutosave(V);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(V){this.listener=function(){V(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(V){v.actions.get("mathematicalTypesetting").funct()},+Q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;if(J.isEnabled()){var O=v.getCurrentFile();null!=O&&O.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},+function(V){v.editor.setAutosave(V);v.editor.autosave&&O.isModified()&&O.fileChanged()},{install:function(V){this.listener=function(){V(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(V){v.actions.get("mathematicalTypesetting").funct()},{install:function(V){this.listener=function(){V(J.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}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",@@ -3367,86 +3367,86 @@ stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"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;var g=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()));g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=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"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,N){function T(Ra,za,Ea,C,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==-Ra;)W.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<W.length?null!=C?W.splice(C,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ra,za,ya.getSelectionCells());P.push(Ra);R.push(za);if(null!=Ea.dependentProps)for(Ra=0;Ra<Ea.dependentProps.length;Ra++){var ka=Ea.dependentPropsDefVal[Ra],-pa=Ea.dependentPropsVals[Ra];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ka);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Ra],pa,ya.getSelectionCells());P.push(Ea.dependentProps[Ra]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",P,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function V(Ra,za){za.style.left="0px";za.style.top="0px";za.style.position=-"relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Ra,za,Ea){function C(R){if(null==R||R==mxConstants.NONE)P.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)P.style.background="";else{var W=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&W.light!=W.dark?P.style.background="linear-gradient(to right bottom, "+W.cssText+" 50%, "+mxUtils.invertLightDarkColor(W).cssText+-" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ra,W,Ea);C(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function X(Ra,za,Ea,C,P,-R,W){null!=za&&(za=za.split(","),wa.push({name:Ra,values:za,type:Ea,defVal:C,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ra)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:P};pa=la(Ra,"",xa,0==pa%2,W);T(Ra,C,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ia)}));btn.style.height=-"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ra,za,Ea,C,P,R,W){if(0<P){var ia=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ia[ka]=null!=za[ka]?za[ka]:null!=C?C:"";wa.push({name:Ra,values:ia,type:Ea,defVal:C,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ra,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Ra,C.checked?"1":"0",Ea,null,C)});return C}-function la(Ra,za,Ea,C,P){var R=Ea.dispName,W=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(P?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Ra);ia.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);C&&(ka.style.textAlign="right");ia.appendChild(ka);-ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ra,-za,Ea));else if("bool"==W||"boolean"==W)ka.appendChild(na(Ra,za,Ea));else if("enum"==W){var pa=Ea.enumList;ka.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ka.appendChild(xa);for(P=0;P<pa.length;P++)if(R=pa[P],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){var Ia=mxEvent.getSource(ua);if(!(Ia!=ka&&Ia!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),-Wa=null;V(ka,Va);for(ua=0;ua<pa.length;ua++){Ia=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ta,mxResources.get(Ia.dispName,null,Ia.dispName));Va.appendChild(Ta);null==Ia.val&&(Ta.value="null",Wa=Ta)}Va.value=null==za&&null!=Wa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var ab=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Wa||"null"==ab.value)ab=null;T(Ra,ab,Ea)});Va.focus();mxEvent.addListener(Va,"blur",-function(){xa.innerHTML="";for(var ab=0;ab<pa.length;ab++){var Pa=pa[ab];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(X(Ra,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,P));else if("staticArr"==W)ka.appendChild(fa(Ra,za,Ea.subType,Ea.subDefVal,Ea.size,ia,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ra?(ia.firstChild.innerHTML=-"",ia.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ia.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ta=document.createElement("div");ta.className="gePropValue";ka.appendChild(ta);ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));-mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){function Ia(){var Ta=Wa.value;Ta=0==Ta.length&&"string"!=W&&"numbers"!=W?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",W="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var ab=null;try{ab="numbers"==W?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==W?parseInt(Ta):Ta)+"")}catch(Pa){}T(Ra,ab,Ea,null,Wa)}var Va=mxEvent.getSource(ua);-if(!(Va!=ka&&Va!=ta||mxEvent.isConsumed(ua))){ta.innerHTML="";var Wa=document.createElement("input");V(ta,Wa);Wa.value=decodeURIComponent(za);Wa.className="gePropEditor";"int"!=W&&"float"!=W||Ea.allowAuto||(Wa.type="number",Wa.step="int"==W?"1":"any",null!=Ea.min&&(Wa.min=parseFloat(Ea.min)),null!=Ea.max&&(Wa.max=parseFloat(Ea.max)));ta.appendChild(Wa);mxEvent.addListener(Wa,"keypress",function(Ta){13==Ta.keyCode&&Ia()});Wa.focus();mxEvent.addListener(Wa,"blur",function(){Ia()})}}))}Ea.isDeletable&&-(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ra,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ia.appendChild(ka);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ja=document.createElement("table");Ja.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=-"16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Ra=Ja.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var C=k.childNodes[Ea],P=C.nodeName.toUpperCase();"INPUT"!=P&&"SELECT"!=P||k.removeChild(C)}catch(R){}}else Ba.style.backgroundImage=-"url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Ra.length;Ea++)Ra[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ja.appendChild(Aa);var ra=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&-1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||N||Ja.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var Ca in v)if(N=v[Ca],!N.primary&&("function"!=typeof N.isVisible||N.isVisible(J,this))){var Da=null!=N.getValue?N.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(J,this):N.defVal;if("separator"==N.type)ra=!ra;else{if("staticArr"==N.type)N.size=parseInt(J.style[N.sizeProperty]||v[N.sizeProperty].defVal)||-0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Oa=[];for(Aa=0;Aa<va.length;Aa++){var Qa=J.style[va[Aa]];Oa.push(v[va[Aa]].subDefVal);Na.push(null!=Qa?Qa.split(","):[])}N.dependentPropsDefVal=Oa;N.dependentPropsVals=Na}Ja.appendChild(la(Ca,Da,N,Ma,ra));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,-size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ja);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var X=document.createElement("div");+this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,O){function T(Ua,za,Ea,B,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==+Ua;)W.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<W.length?null!=B?W.splice(B,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ua,za,ya.getSelectionCells());P.push(Ua);R.push(za);if(null!=Ea.dependentProps)for(Ua=0;Ua<Ea.dependentProps.length;Ua++){var ka=Ea.dependentPropsDefVal[Ua],+pa=Ea.dependentPropsVals[Ua];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ka);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Ua],pa,ya.getSelectionCells());P.push(Ea.dependentProps[Ua]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",P,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function V(Ua,za){za.style.left="0px";za.style.top="0px";za.style.position=+"relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Ua,za,Ea){function B(R){if(null==R||R==mxConstants.NONE)P.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)P.style.background="";else{var W=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&W.light!=W.dark?P.style.background="linear-gradient(to right bottom, "+W.cssText+" 50%, "+mxUtils.invertLightDarkColor(W).cssText++" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ua,W,Ea);B(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function X(Ua,za,Ea,B,P,+R,W){null!=za&&(za=za.split(","),wa.push({name:Ua,values:za,type:Ea,defVal:B,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ua)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:B,countProperty:P};pa=la(Ua,"",xa,0==pa%2,W);T(Ua,B,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ia)}));btn.style.height=+"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ua,za,Ea,B,P,R,W){if(0<P){var ia=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ia[ka]=null!=za[ka]?za[ka]:null!=B?B:"";wa.push({name:Ua,values:ia,type:Ea,defVal:B,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ua,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Ua,B.checked?"1":"0",Ea,null,B)});return B}+function la(Ua,za,Ea,B,P){var R=Ea.dispName,W=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(P?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Ua);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",B=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);B&&(ka.style.textAlign="right");ia.appendChild(ka);+ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ua,+za,Ea));else if("bool"==W||"boolean"==W)ka.appendChild(na(Ua,za,Ea));else if("enum"==W){var pa=Ea.enumList;ka.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ka.appendChild(xa);for(P=0;P<pa.length;P++)if(R=pa[P],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){var Ja=mxEvent.getSource(ua);if(!(Ja!=ka&&Ja!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),+Oa=null;V(ka,Va);for(ua=0;ua<pa.length;ua++){Ja=pa[ua];var Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(Sa,mxResources.get(Ja.dispName,null,Ja.dispName));Va.appendChild(Sa);null==Ja.val&&(Sa.value="null",Oa=Sa)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Ua,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",+function(){xa.innerHTML="";for(var Za=0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(X(Ua,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,P));else if("staticArr"==W)ka.appendChild(fa(Ua,za,Ea.subType,Ea.subDefVal,Ea.size,ia,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ua?(ia.firstChild.innerHTML=+"",ia.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ia.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ka.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));+mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){function Ja(){var Sa=Oa.value;Sa=0==Sa.length&&"string"!=W&&"numbers"!=W?0:Sa;Ea.allowAuto&&(null!=Sa.trim&&"auto"==Sa.trim().toLowerCase()?(Sa="auto",W="string"):(Sa=parseFloat(Sa),Sa=isNaN(Sa)?0:Sa));null!=Ea.min&&Sa<Ea.min?Sa=Ea.min:null!=Ea.max&&Sa>Ea.max&&(Sa=Ea.max);var Za=null;try{Za="numbers"==W?Sa.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==W?parseInt(Sa):Sa)+"")}catch(Pa){}T(Ua,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);+if(!(Va!=ka&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");V(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=W&&"float"!=W||Ea.allowAuto||(Oa.type="number",Oa.step="int"==W?"1":"any",null!=Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Sa){13==Sa.keyCode&&Ja()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ja()})}}))}Ea.isDeletable&&+(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ua,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ia.appendChild(ka);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=+"16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Ua=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],P=B.nodeName.toUpperCase();"INPUT"!=P&&"SELECT"!=P||k.removeChild(B)}catch(R){}}else Ba.style.backgroundImage=+"url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Ua.length;Ea++)Ua[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&+1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||O||Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var Ca in v)if(O=v[Ca],!O.primary&&("function"!=typeof O.isVisible||O.isVisible(J,this))){var Da=null!=O.getValue?O.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=O.getDefaultValue?O.getDefaultValue(J,this):O.defVal;if("separator"==O.type)sa=!sa;else{if("staticArr"==O.type)O.size=parseInt(J.style[O.sizeProperty]||v[O.sizeProperty].defVal)||+0;else if(null!=O.dependentProps){var va=O.dependentProps,Na=[],Ra=[];for(Aa=0;Aa<va.length;Aa++){var Ta=J.style[va[Aa]];Ra.push(v[va[Aa]].subDefVal);Na.push(null!=Ta?Ta.split(","):[])}O.dependentPropsDefVal=Ra;O.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,O,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(O=wa[Aa],v=O.parentRow,Ca=0;Ca<O.values.length;Ca++)Ma=la(O.name,O.values[Ca],{type:O.type,parentRow:O.parentRow,isDeletable:O.isDeletable,index:Ca,defVal:O.defVal,countProperty:O.countProperty,+size:O.size},0==Ca%2,O.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,O=document.createElement("div");O.style.padding="6px 20px 0 24px";k.appendChild(O);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var X=document.createElement("div");X.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(X,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);V.push(X);T.appendChild(X)}var fa=mxUtils.bind(this,function(ya){null!=V[ya]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,na(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,-function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ja=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,+function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ia=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){J.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=J.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!J.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),J.getModel().isVertex(Da[va])&&(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null)));J.getModel().setStyle(Da[va],Na)}}finally{J.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px";if(null!=Ba){var Ma="1px solid";null!=Ba.border&&(Ma=Ba.border);if(null!=Ba.gradient)Ga.style.backgroundImage="linear-gradient("+-mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ra=mxUtils.getLightDarkColor(Ba.fill);Ga.style.backgroundImage="linear-gradient(to right bottom, "+ra.cssText+" 50%, "+ra.light+" 50.3%)"}null==-Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ra=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+ra.cssText,Ga.style.borderRightColor=ra.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ra=mxUtils.getValue(wa,-mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+ra;Ga.style.borderRadius="0";N.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",N.appendChild(Ma),-Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});N.innerText="";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(N),Ja(ya[Aa])});null==this.format.currentScheme?fa(Math.min(V.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("++mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var sa=mxUtils.getLightDarkColor(Ba.fill);Ga.style.backgroundImage="linear-gradient(to right bottom, "+sa.cssText+" 50%, "+sa.light+" 50.3%)"}null==+Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(sa=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+sa.cssText,Ga.style.borderRightColor=sa.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),sa=mxUtils.getValue(wa,+mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+sa;Ga.style.borderRadius="0";O.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",O.appendChild(Ma),+Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});O.innerText="";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(O),Ia(ya[Aa])});null==this.format.currentScheme?fa(Math.min(V.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(la,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(la),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));na(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,v){var J=Graph.fontMapping[v];null==J&&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==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,J,N){if(null!=k&&0<k.length&&null!=v&&0<v.length){N=null!=N?N:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var V=N[T];null!=-V&&V.url!=v&&(V.elt.parentNode.removeChild(V.elt),V=null);null==V?(V=v,"http:"==v.substring(0,5)&&(V=PROXY_URL+"?url="+encodeURIComponent(v)),V={name:k,url:v,elt:Graph.createFontElement(k,V)},N[T]=V,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=J&&("link"==V.elt.nodeName.toLowerCase()?(V.elt.onload=J,V.elt.onerror=J):J()),null!=v&&v.appendChild(V.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();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 J=k[v].getAttribute("data-font-src");if(null!=J){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,J)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(v))}catch(N){}}}return k};+k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,J,O){if(null!=k&&0<k.length&&null!=v&&0<v.length){O=null!=O?O:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var V=O[T];null!=+V&&V.url!=v&&(V.elt.parentNode.removeChild(V.elt),V=null);null==V?(V=v,"http:"==v.substring(0,5)&&(V=PROXY_URL+"?url="+encodeURIComponent(v)),V={name:k,url:v,elt:Graph.createFontElement(k,V)},O[T]=V,v=O==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=J&&("link"==V.elt.nodeName.toLowerCase()?(V.elt.onload=J,V.elt.onerror=J):J()),null!=v&&v.appendChild(V.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();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 J=k[v].getAttribute("data-font-src");if(null!=J){var O="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=O&&Graph.addFont(O,J)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(v))}catch(O){}}}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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=-T}n.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(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):J.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=-function(T){var V=this.graph.getCellStyle(T);if(null!=V&&"rack"==V.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=V.rackUnitSize?parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=V.marginLeft||0;U.marginRight=V.marginRight||0;U.marginTop=V.marginTop||0;U.marginBottom=V.marginBottom||0;U.allowGaps=V.allowGaps||0;U.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,-arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,V,U,X,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&-Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=X.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)X.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);X.setSelectionCells(Ba)}function V(Aa){X.setHiddenTags(Aa?[]:fa.slice());T();X.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";-var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var ra=0;ra<Aa.length;ra++)(function(Ca){function Da(){var za=X.getCellsForTags([Ca],null,null,!0);X.isEnabled()?X.setSelectionCells(za):X.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(X.hiddenTags,Ca),Na=document.createElement("tr"),Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";var Qa=document.createElement("img");Qa.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Qa.setAttribute("title",-mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";Oa.appendChild(Qa);mxEvent.addListener(Qa,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(X.hiddenTags,Ca)):(X.toggleHiddenTag(Ca),T(),X.refresh());mxEvent.consume(za)});Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.align="center";-Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.selectImage);Qa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){V(!0);Da();mxEvent.consume(za)});Oa.appendChild(Qa);Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.overflow=-"hidden";Oa.style.whiteSpace="nowrap";Oa.style.textOverflow="ellipsis";Oa.style.verticalAlign="middle";Oa.style.cursor="pointer";Oa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Oa.appendChild(a);mxEvent.addListener(Oa,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<X.hiddenTags.length)V(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);-X.setHiddenTags(Ea);T();X.refresh()}mxEvent.consume(za)});Na.appendChild(Oa);if(X.isEnabled()){Oa=document.createElement("td");Oa.style.verticalAlign="middle";Oa.style.textAlign="center";Oa.style.width="18px";if(null==Ba){Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.trashImage);Qa.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor=-"pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);X.removeTagsForCells(X.model.getDescendants(X.model.getRoot()),[Ca]);X.refresh();mxEvent.consume(za)});Oa.appendChild(Qa)}else{var Ra=document.createElement("input");Ra.setAttribute("type","checkbox");Ra.style.margin="0px";Ra.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ra.checked=Ra.defaultChecked;Ra.style.background=-"transparent";Ra.setAttribute("title",mxResources.get(Ra.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ra,"change",function(za){Ra.checked?X.addTagsForCells(X.getSelectionCells(),[Ca]):X.removeTagsForCells(X.getSelectionCells(),[Ca]);mxEvent.consume(za)});Oa.appendChild(Ra)}Na.appendChild(Oa)}Ma.appendChild(Na)})(Aa[ra]);Ga.appendChild(Ma);la.appendChild(Ga)}}var X=this,fa=X.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding=+T}n.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(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):J.apply(this,arguments)};var O=this.layoutManager.getLayout;this.layoutManager.getLayout=+function(T){var V=this.graph.getCellStyle(T);if(null!=V&&"rack"==V.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=V.rackUnitSize?parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=V.marginLeft||0;U.marginRight=V.marginRight||0;U.marginTop=V.marginTop||0;U.marginBottom=V.marginBottom||0;U.allowGaps=V.allowGaps||0;U.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return O.apply(this,+arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,O,T,V,U,X,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&+Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,O){function T(){for(var Aa=X.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)X.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);X.setSelectionCells(Ba)}function V(Aa){X.setHiddenTags(Aa?[]:fa.slice());T();X.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";+var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var sa=0;sa<Aa.length;sa++)(function(Ca){function Da(){var za=X.getCellsForTags([Ca],null,null,!0);X.isEnabled()?X.setSelectionCells(za):X.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(X.hiddenTags,Ca),Na=document.createElement("tr"),Ra=document.createElement("td");Ra.style.align="center";Ra.style.width="16px";var Ta=document.createElement("img");Ta.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ta.setAttribute("title",+mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Ta,va?75:25);Ta.className="geAdaptiveAsset";Ta.style.verticalAlign="middle";Ta.style.cursor="pointer";Ta.style.width="16px";if(v||Editor.isDarkMode())Ta.style.filter="invert(100%)";Ra.appendChild(Ta);mxEvent.addListener(Ta,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(X.hiddenTags,Ca)):(X.toggleHiddenTag(Ca),T(),X.refresh());mxEvent.consume(za)});Na.appendChild(Ra);Ra=document.createElement("td");Ra.style.align="center";+Ra.style.width="16px";Ta=document.createElement("img");Ta.setAttribute("src",Editor.selectImage);Ta.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ta,va?75:25);Ta.className="geAdaptiveAsset";Ta.style.verticalAlign="middle";Ta.style.cursor="pointer";Ta.style.width="16px";if(v||Editor.isDarkMode())Ta.style.filter="invert(100%)";mxEvent.addListener(Ta,"click",function(za){V(!0);Da();mxEvent.consume(za)});Ra.appendChild(Ta);Na.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",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Ra.appendChild(a);mxEvent.addListener(Ra,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<X.hiddenTags.length)V(!0);else{var Ea=fa.slice(),B=mxUtils.indexOf(Ea,Ca);Ea.splice(B,1);+X.setHiddenTags(Ea);T();X.refresh()}mxEvent.consume(za)});Na.appendChild(Ra);if(X.isEnabled()){Ra=document.createElement("td");Ra.style.verticalAlign="middle";Ra.style.textAlign="center";Ra.style.width="18px";if(null==Ba){Ra.style.align="center";Ra.style.width="16px";Ta=document.createElement("img");Ta.setAttribute("src",Editor.trashImage);Ta.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Ta,va?75:25);Ta.className="geAdaptiveAsset";Ta.style.verticalAlign="middle";Ta.style.cursor=+"pointer";Ta.style.width="16px";if(v||Editor.isDarkMode())Ta.style.filter="invert(100%)";mxEvent.addListener(Ta,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);X.removeTagsForCells(X.model.getDescendants(X.model.getRoot()),[Ca]);X.refresh();mxEvent.consume(za)});Ra.appendChild(Ta)}else{var Ua=document.createElement("input");Ua.setAttribute("type","checkbox");Ua.style.margin="0px";Ua.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ua.checked=Ua.defaultChecked;Ua.style.background=+"transparent";Ua.setAttribute("title",mxResources.get(Ua.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ua,"change",function(za){Ua.checked?X.addTagsForCells(X.getSelectionCells(),[Ca]):X.removeTagsForCells(X.getSelectionCells(),[Ca]);mxEvent.consume(za)});Ra.appendChild(Ua)}Na.appendChild(Ra)}Ma.appendChild(Na)})(Aa[sa]);Ga.appendChild(Ma);la.appendChild(Ga)}}var X=this,fa=X.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding="10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);X.addListener(mxEvent.ROOT,function(){fa=X.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=X.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);fa.sort();X.isSelectionEmpty()?U(fa):U(fa,X.getCommonTagsForCells(X.getSelectionCells()))}});X.selectionModel.addListener(mxEvent.CHANGE,qa);X.model.addListener(mxEvent.CHANGE,qa);X.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";-ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(X.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ja=wa.cloneNode(!1);Ja.style.backgroundImage="url("+Editor.visibleImage+")";Ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ja,"click",function(Aa){X.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=X.hiddenTags.slice());T();X.refresh();mxEvent.consume(Aa)});ya.appendChild(Ja);null!=-J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};-Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",!1,J);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,V=0;V<N.length;V++)N[V].getAttribute("face")==J&&(T=!0,N[V].setAttribute("face",k),null!=v?N[V].setAttribute("data-font-src",v):N[V].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.apply(this,arguments)&&+ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(X.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ia=wa.cloneNode(!1);Ia.style.backgroundImage="url("+Editor.visibleImage+")";Ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ia,"click",function(Aa){X.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=X.hiddenTags.slice());T();X.refresh();mxEvent.consume(Aa)});ya.appendChild(Ia);null!=+J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=O&&ya.appendChild(O);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};+Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",!1,J);for(var O=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,V=0;V<O.length;V++)O[V].getAttribute("face")==J&&(T=!0,O[V].setAttribute("face",k),null!=v?O[V].setAttribute("data-font-src",v):O[V].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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(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 L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=L.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 K=Graph.prototype.getSvg;Graph.prototype.getSvg=-function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var ra=Ba.ownerDocument;Ga=null!=ra.createElementNS?ra.createElementNS(mxConstants.NS_SVG,"style"):ra.createElement("style");null!=ra.setAttributeNS?-Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Oa=Ma[va].url;Graph.isCssFontUrl(Oa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Oa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Oa+'");\n}\n'}Ga.appendChild(ra.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);+function(k,v,J,O,T,V,U,X,fa,na,la,qa,ya,wa,Ia,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var sa=Ba.ownerDocument;Ga=null!=sa.createElementNS?sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?+Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Ra=Ma[va].url;Graph.isCssFontUrl(Ra)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Ra)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Ra+'");\n}\n'}Ga.appendChild(sa.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var aa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){aa.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 ja=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ja.apply(this,arguments);this.enumerationState=0};var ca=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ca.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 J=k.view.scale,N=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));v.bounds.equals(k)&&v.value==N&&v.scale==J||(v.bounds=k,v.value=N,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&+v){var J=k.view.scale,O=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));v.bounds.equals(k)&&v.value==O&&v.scale==J||(v.bounds=k,v.value=O,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.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,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 N=!1,T=0,V=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),X=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=+!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var O=!1,T=0,V=0,U=mxUtils.bind(this,function(){O||(O=!0,this.model.beginUpdate())}),X=mxUtils.bind(this,function(){O&&(O=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=this.stoppingCustomActions,qa=k[V++],ya=[];if(null!=qa.open)if(X(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),X());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(U(),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&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&-this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ja=qa.tags.toggle;0==Ja.length&&(Ja=this.getAllTags());for(wa=0;wa<Ja.length;wa++)this.toggleHiddenTag(Ja[wa])}Ja=null;null!=qa.tags.hidden&&(null==Ja&&(Ja=[]),Ja=Ja.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ja&&(Ja=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,-Aa[wa])&&0>mxUtils.indexOf(Ja,Aa[wa])&&Ja.push(Aa[wa])}null!=Ja&&this.setHiddenTags(Ja);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():X()}else this.stoppingCustomActions=this.executingCustomActions=!1,X(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");-N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),V=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),V=!0);V&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(N){}return v};-Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var N=v[J],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var N=[],T=0;T<v[J].length;T++)if("*"==v[J][T])N.push(v[J][T]);else{var V=k[v[J][T]];null!=V?""!=V&&N.push(V):N.push(v[J][T])}v[J]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var Y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return Y.apply(this,arguments)&&+this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ia=qa.tags.toggle;0==Ia.length&&(Ia=this.getAllTags());for(wa=0;wa<Ia.length;wa++)this.toggleHiddenTag(Ia[wa])}Ia=null;null!=qa.tags.hidden&&(null==Ia&&(Ia=[]),Ia=Ia.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ia&&(Ia=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,+Aa[wa])&&0>mxUtils.indexOf(Ia,Aa[wa])&&Ia.push(Aa[wa])}null!=Ia&&this.setHiddenTags(Ia);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():X()}else this.stoppingCustomActions=this.executingCustomActions=!1,X(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var O=document.createElement("div");+O.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=O.getElementsByTagName("a"),V=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),V=!0);V&&this.labelChanged(v,O.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(O){}return v};+Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var O=v[J],T;for(T in O)this.updateCustomLinkAction(k,O[T],"cells"),this.updateCustomLinkAction(k,O[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var O=[],T=0;T<v[J].length;T++)if("*"==v[J][T])O.push(v[J][T]);else{var V=k[v[J][T]];null!=V?""!=V&&O.push(V):O.push(v[J][T])}v[J]=O}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,+null,v));if(null!=k.excludeCells){for(var J=[],O=0;O<v.length;O++)0>k.excludeCells.indexOf(v[O].id)&&J.push(v[O]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var O=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=O},O))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var Y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return Y.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,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},X=0;X<k.length;X++)0<k[X].length&&(U[k[X]]=!0,V++);for(X=0;X<v.length;X++)if(J&&this.model.getParent(v[X])==this.model.root||this.model.isVertex(v[X])||this.model.isEdge(v[X])){var fa=this.getTagsForCell(v[X]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=-na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=N||this.isCellVisible(v[X]))&&T.push(v[X])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};-Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var V=0;V<T.length;V++)null==J[T[V]]&&(J[T[V]]=!0,v.push(T[V]))}}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 J=0;J<k.length;J++){for(var N=this.getTagsForCell(k[J]),T=N.split(" "),V=!1,U=0;U<-v.length;U++){var X=mxUtils.trim(v[U]);""!=X&&0>mxUtils.indexOf(T,X)&&(N=0<N.length?N+" "+X:X,V=!0)}V&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),V=!1,U=0;U<v.length;U++){var X=mxUtils.indexOf(T,v[U]);0<=X&&(T.splice(X,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",-T.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 J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,-J,N)};Graph.prototype.highlightCell=function(k,v,J,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var V=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),V=new mxCellHighlight(this,v,T,!1),null!=N&&(V.opacity=N),V.highlight(k),window.setTimeout(function(){null!=V.shape&&(mxUtils.setPrefixedStyle(V.shape.node.style,"transition","all 1200ms ease-in-out"),V.shape.node.style.opacity=0);window.setTimeout(function(){V.destroy()},-1200)},J));return V};Graph.prototype.addSvgShadow=function(k,v,J,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,+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,J,O){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},X=0;X<k.length;X++)0<k[X].length&&(U[k[X]]=!0,V++);for(X=0;X<v.length;X++)if(J&&this.model.getParent(v[X])==this.model.root||this.model.isVertex(v[X])||this.model.isEdge(v[X])){var fa=this.getTagsForCell(v[X]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=+na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=O||this.isCellVisible(v[X]))&&T.push(v[X])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],O=0;O<k.length;O++){var T=this.getTagsForCell(k[O]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};+Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},O=0;O<k.length;O++){var T=this.getTagsForCell(k[O]);if(0<T.length){T=T.split(" ");for(var V=0;V<T.length;V++)null==J[T[V]]&&(J[T[V]]=!0,v.push(T[V]))}}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 J=0;J<k.length;J++){for(var O=this.getTagsForCell(k[J]),T=O.split(" "),V=!1,U=0;U<+v.length;U++){var X=mxUtils.trim(v[U]);""!=X&&0>mxUtils.indexOf(T,X)&&(O=0<O.length?O+" "+X:X,V=!0)}V&&this.setAttributeForCell(k[J],"tags",O)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var O=this.getTagsForCell(k[J]);if(0<O.length){for(var T=O.split(" "),V=!1,U=0;U<v.length;U++){var X=mxUtils.indexOf(T,v[U]);0<=X&&(T.splice(X,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",+T.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 J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,O){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,+J,O)};Graph.prototype.highlightCell=function(k,v,J,O,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var V=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),V=new mxCellHighlight(this,v,T,!1),null!=O&&(V.opacity=O),V.highlight(k),window.setTimeout(function(){null!=V.shape&&(mxUtils.setPrefixedStyle(V.shape.node.style,"transition","all 1200ms ease-in-out"),V.shape.node.style.opacity=0);window.setTimeout(function(){V.destroy()},+1200)},J));return V};Graph.prototype.addSvgShadow=function(k,v,J,O){O=null!=O?O:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&O&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,h=parseFloat(v[3])+T,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return T};Graph.prototype.updateShadowFilter=function(k,v){mxClient.IS_SF||(v?(v=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),k.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+v.cssText+")"):k.style.filter="")};Graph.prototype.setShadowVisible=function(k,v){v=null!=v?v:!0;this.shadowVisible=k;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);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 J=this.model.getChildAt(this.model.root,v);while(v++<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",@@ -3461,32 +3461,32 @@ mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.x[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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(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 da=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,V,U,X,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return da.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,V){"1"==mxUtils.getValue(v.style,"lineShape",-null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ha.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,N){function T(){Ja.value=Math.max(1,Math.min(la,Math.max(parseInt(Ja.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ja.value),parseInt(wa.value))))}function V(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=-ra.checked;ya.checked&&wa.value<Ja.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ja.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=P.value;k.lastPrintGrid=W.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=C.value;var Ia={};Ia.border=parseInt(P.value);Ia.scale=parseInt(R.value)/100;-Ia.grid=W.checked;Ia.shadows=ia.checked;Ia.transparent=ka.checked;Ia.includeCopy=pa.checked;Ia.sheetsAcross=parseInt(Ea.value);Ia.sheetsDown=parseInt(C.value);Ia.pagesFrom=parseInt(wa.value);Ia.pagesTo=parseInt(Ja.value);Ia.allPages=qa.checked;Ia.selection=Ba.checked;Ia.pageView=Ga.checked;Ia.crop=Ma.checked;Ia.fit=ra.checked;return null!=J?J(!ua,Ia):k.print(!ua,Ia)}var U=k.editor.graph,X=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";+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 da=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,O,T,V,U,X,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return da.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,O,T,V){"1"==mxUtils.getValue(v.style,"lineShape",+null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ha.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,O){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function V(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=+sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=P.value;k.lastPrintGrid=W.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=B.value;var Ja={};Ja.border=parseInt(P.value);Ja.scale=parseInt(R.value)/100;+Ja.grid=W.checked;Ja.shadows=ia.checked;Ja.transparent=ka.checked;Ja.includeCopy=pa.checked;Ja.sheetsAcross=parseInt(Ea.value);Ja.sheetsDown=parseInt(B.value);Ja.pagesFrom=parseInt(wa.value);Ja.pagesTo=parseInt(Ia.value);Ja.allPages=qa.checked;Ja.selection=Ba.checked;Ja.pageView=Ga.checked;Ja.crop=Ma.checked;Ja.fit=sa.checked;return null!=J?J(!ua,Ja):k.print(!ua,Ja)}var U=k.editor.graph,X=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));X.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.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");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);-mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.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";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ja=-wa.cloneNode(!0);fa.appendChild(Ja);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ja,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ja,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ja.value=Math.min(la,Math.max(1,-k.lastPrintPagesToInput))):(wa.value=na,Ja.value=na);wa.setAttribute("max",la);Ja.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ja.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&X.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=+mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.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";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=+wa.cloneNode(!0);fa.appendChild(Ia);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ia,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ia,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ia.value=Math.min(la,Math.max(1,+k.lastPrintPagesToInput))):(wa.value=na,Ia.value=na);wa.setAttribute("max",la);Ia.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ia.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&X.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom="1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&X.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name","printSize");U.appendChild(Ga);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=-!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom="8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ra);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");-var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Oa=va.cloneNode(!0),Qa=va.cloneNode(!0),Ra=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Qa.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=ra&&(ra.checked=!ra.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",-k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Oa.appendChild(v);mxUtils.write(Qa,mxResources.get("fitToBy"));var C=Ea.cloneNode(!0);C.setAttribute("value",k.lastPrintSheetsDown||"1");Ra.appendChild(C);mxEvent.addListener(Ea,"click",function(ua){ra.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(C,"click",function(ua){ra.checked=-!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?ra.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Oa);Da.appendChild(Qa);Da.appendChild(Ra);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";+!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(sa);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");+var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Ra=va.cloneNode(!0),Ta=va.cloneNode(!0),Ua=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Ta.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=sa&&(sa.checked=!sa.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",+k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Ra.appendChild(v);mxUtils.write(Ta,mxResources.get("fitToBy"));var B=Ea.cloneNode(!0);B.setAttribute("value",k.lastPrintSheetsDown||"1");Ua.appendChild(B);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(B,"click",function(ua){sa.checked=+!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Ra);Da.appendChild(Ta);Da.appendChild(Ua);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.style.width="40px";P.style.marginLeft="4px";P.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(P);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var W=document.createElement("input");W.setAttribute("type","checkbox");W.style.marginTop="12px";W.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(W);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,"click",function(ua){W.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ia.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ka),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&-(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);X.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?-(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Ia){ua=Ia.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=+(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));O=null!=O?O:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";O=mxUtils.button(mxResources.get(O),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});O.className="geBtn gePrimaryBtn";v.appendChild(O);k.editor.cancelFirst||v.appendChild(U);X.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?+(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ra=function(ua,Ja){ua=Ja.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ra),k.removeListener(xa))};k.editor.addListener("hideDialog",ra)}this.container=X};var Z=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 Z.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)}})();(function(){EditorUi.VERSION="28.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&&+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.1.1";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||"1"==urlParams.dev;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:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',@@ -3523,72 +3523,71 @@ Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("typenavigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));null!=ja&&(Y=Y.cloneNode(!0),Y.setAttribute("scale",ja));null!=ca&&(Y=Y.cloneNode(!0),Y.setAttribute("border",ca));c=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!F&&!x&&(I||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(Y),g,null!=m?m.getTitle():null,oa,ba);else if(F||!x&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(Y),c=this.getEmbeddedSvg(c,g,n,null,M,L,ba,null,null,m.scale,m.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,m,n){c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var K=L.getElementsByTagName("mxGraphModel"),aa=0<K.length?K[0]:null;K=L;null==aa&&m?(aa=mxUtils.getNodeValue(L),0<aa.length&&(aa=Graph.decompress(aa),null!=aa&&0<aa.length&&(K=L.cloneNode(!1),K.appendChild(mxUtils.parseXml(aa).documentElement)))):null==aa||m?K=L.cloneNode(!0):(K=L.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(aa)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],I=F.node;-if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(I);I.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&(null!=F.viewState.backgroundImage.originalSrc?F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.originalSrc,F):Graph.isPageLink(F.viewState.backgroundImage.src)&&-(F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.src,F))),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,M,null,n),I=I.cloneNode(!1),I.appendChild(M)));c(I)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var m=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?-m.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);-null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var I=x.cells[F];if(null!=I){for(var M in I)null!=I[M].value&&(I[M].value="["+I[M].value.length+"]"),-null!=I[M].xmlValue&&(I[M].xmlValue="["+I[M].xmlValue.length+"]"),null!=I[M].style&&(I[M].style="["+I[M].style.length+"]"),mxUtils.isEmptyObject(I[M])&&delete I[M];mxUtils.isEmptyObject(I)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,-g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=function(c,g){g=c.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 c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?-this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?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(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var Y=null!=this.pages?-this.pages[0]:null;null==Y||this.currentPage==Y?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=Y.viewState&&null!=Y.viewState&&ba.setBackgroundImage(Y.viewState.backgroundImage);ba.getGlobalVariable=function(da){return"page"==da&&null!=Y?Y.getName():"pagenumber"==da?1:oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=Y&&ba.model.setRoot(Y.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,-c,g,m,n,x,M,K,ja,ca);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){I=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var L=g.view.scale;F=Math.floor(I.x/L-g.view.translate.x);L=Math.floor(I.y/L-g.view.translate.y);I=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+-g));c.setAttribute("x0",F);c.setAttribute("y0",L)}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!=x&&(x=x.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':-"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&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;">'+n+"</div>\n</div>\n"+-(null==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,g,m,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.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==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+-x+"'\"/>\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==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" 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 g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")+" ("+m+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),-m={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=-null!=x?x: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 I=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<I.length;F++)g[I[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(aa){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":-"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,-K,aa,ja,void 0,void 0,!F,ca,ba,oa,Y,da)}catch(X){this.handleError(X)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;if(I||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);-this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else Z=ha+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();J(V)}),n)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z);g="";for(var k in c)m=-c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=-K?"1":"0";"pdf"==g&&(null!=aa?(J=aa.from,N=aa.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,-color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ja&&isFinite(ja)?ja:null,h:ca&&isFinite(ca)?ca:null,crop:null!=ba&&ba?"1":"0",fit:null!=Y&&Y?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:da,sheetsDown:ha}};EditorUi.prototype.setMode=-function(c,g){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 g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m+1));try{g=JSON.parse(c)}catch(n){}}}return g};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 g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};-EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(I){var M=null!=c.data?c.data:"";null!=I&&0<I.length&&(0<M.length&&(M+="\n"),M+=I);I=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return n};this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);-this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),-ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();aa()}));ja();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,-k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,N){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==-K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ja=0;ja<aa.length;ja++)x.setAttributeForCell(M,aa[ja].nodeName,0<aa[ja].nodeValue.length?aa[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "+M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=-oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var Y=c.getAttribute("geometry");if(null!=Y){Y=JSON.parse(Y);var da=x.getCellGeometry(M);if(null!=da){da=da.clone();for(key in Y){var ha=parseFloat(Y[key]);"dx"==key?da.x+=ha:"dy"==key?da.y+=ha:"dw"==key?da.width+=ha:"dh"==key?da.height+=ha:da[key]=parseFloat(Y[key])}x.model.setGeometry(M,da)}}}catch(k){null!=window.console&&console.log("Error in icon for "+-M.id+": "+k)}}}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,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.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{F.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=x.getDate(),I=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+I+"-"+M+"-"+x))}return m=mxResources.get("copyOf",-[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!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 F=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);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));x=!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.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+I})}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(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}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)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction=-{label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var I=c[F].node.cloneNode(!1);-I.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");I.appendChild(M);null!=g&&(g.eltCount+=I.getElementsByTagName("*").length,g.nodeCount+=I.getElementsByTagName("mxCell").length);m=(m<<5)-m+this.hashValue(I,function(L,K,aa,ja){return!ja||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==L.nodeName&&"previous"==K?null:aa:-Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){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,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,I=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=I&&(n^=this.hashValue(F,g,m)+this.hashValue(I,-g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,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 g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));-g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\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 g=this.sidebar.palettes[c];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);-delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));c=null!=c?c:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var n=g.previousSibling;m.insertBefore(g,c);m.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var m=mxUtils.parseXml(c.getData());-if("mxlibrary"==m.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(c,n,m.documentElement.getAttribute("title"),g)}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.showSearchWindow=function(c,g){var m=c?"findReplace":"find",-n=m+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(m))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=-g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,-expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,M=mxUtils.bind(this,function(ha,Z){0==ha.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(ha,Z)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),-null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ha){M(g,ha)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");K.style.backgroundColor="inherit";n.style.position="relative";-var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=ja?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),-mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var ca=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight=-"2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=aa.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ja||-c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(Z)})))}),Y=mxUtils.bind(this,function(ha,Z,k,v){ha=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var N=ca.getCellGeometry(ha[J]);null!=N&&N.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};-null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),da=mxUtils.bind(this,function(ha){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ha),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=ca.getSelectionCells(),k=ca.view.getBounds(Z);if(null!=k&&0<k.width&&0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=-v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;Y(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor=-"copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,da(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),-null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor="";L.style.backgroundColor=-"";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,N,T,V,U,X){if(null!=Z&&"image/"==k.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,N,T),Z)],Z[0].vertex=!0,Y(Z,new mxRectangle(0,0,N,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=I&&null!=I.parentNode&&-0<g.length&&(I.parentNode.removeChild(I),I=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ha);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=la.documentElement.getElementsByTagName("diagram");-for(ya=0;ya<wa.length;ya++){var Ja=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ja);null!=Aa&&Y(Ja,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=X&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(X,+if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(I);I.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,M,null,n,F),I=I.cloneNode(!1),+I.appendChild(M)));c(I)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var m=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?m.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=+function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];+null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var I=x.cells[F];if(null!=I){for(var M in I)null!=I[M].value&&(I[M].value="["+I[M].value.length+"]"),null!=I[M].xmlValue&&(I[M].xmlValue="["+I[M].xmlValue.length+"]"),null!=I[M].style&&(I[M].style="["+I[M].style.length+"]"),mxUtils.isEmptyObject(I[M])&&delete I[M];mxUtils.isEmptyObject(I)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);+mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=+function(c,g){g=c.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 c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?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(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var Y=null!=this.pages?this.pages[0]:null;null==Y||this.currentPage==Y?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=Y.viewState&&null!=Y.viewState&&ba.setBackgroundImage(Y.viewState.backgroundImage);ba.getGlobalVariable=function(da){return"page"==da&&null!=Y?Y.getName():"pagenumber"==da?1:+oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=Y&&ba.model.setRoot(Y.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,c,g,m,n,x,M,K,ja,ca);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){I=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());+var L=g.view.scale;F=Math.floor(I.x/L-g.view.translate.x);L=Math.floor(I.y/L-g.view.translate.y);I=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",L)}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!=x&&(x=x.replace(/&/g,"&"));c=+null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"++(null==x&&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;">'+n+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};+EditorUi.prototype.getHtml2=function(c,g,m,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.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==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"++(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'++x+'" 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 g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")++" ("+m+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),m={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||+null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x: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 I=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<I.length;F++)g[I[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(aa){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,m,n,x,+F,I,M,L,K,aa,ja,ca,ba,oa,Y,da){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,K,aa,ja,void 0,void 0,!F,ca,ba,oa,Y,da)}catch(X){this.handleError(X)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var O=this.editor.graph.background;+if(I||O==mxConstants.NONE)O=null;var T=this.editor.graph.getSvg(O,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else Z=ha+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();J(V)}),n)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,I,M,L,+K,aa,ja,ca,ba,oa,Y,da,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,O=null,T=null;if(!EditorUi.isElectronApp&&+(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=aa?(J=aa.from,O=aa.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=+aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:O,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ja&&isFinite(ja)?ja:null,h:ca&&isFinite(ca)?ca:null,crop:null!=+ba&&ba?"1":"0",fit:null!=Y&&Y?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:da,sheetsDown:ha}};EditorUi.prototype.setMode=function(c,g){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 g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m++1));try{g=JSON.parse(c)}catch(n){}}}return g};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 g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||+(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(I){var M=null!=c.data?c.data:"";null!=I&&0<I.length&&(0<M.length&&(M+="\n"),M+=I);I=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return n};+this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),+ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();aa()}));ja();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};+EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,O){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));+if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ja=0;ja<aa.length;ja++)x.setAttributeForCell(M,aa[ja].nodeName,0<aa[ja].nodeValue.length?aa[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "++M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var Y=c.getAttribute("geometry");if(null!=Y){Y=JSON.parse(Y);var da=x.getCellGeometry(M);if(null!=da){da=da.clone();for(key in Y){var ha=parseFloat(Y[key]);"dx"==key?da.x+=ha:"dy"==key?da.y+=ha:"dw"==key?da.width+=ha:"dh"==key?da.height+=ha:+da[key]=parseFloat(Y[key])}x.model.setGeometry(M,da)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}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,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.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{F.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=+x.getDate(),I=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+I+"-"+M+"-"+x))}return m=mxResources.get("copyOf",[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!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 F=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);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");+this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{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.clearStatus():this.updateStatus(mxUtils.bind(this,function(){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"));x=!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.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?+"on":"off")+"_theme_"+I})}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(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}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)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=+function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var I=c[F].node.cloneNode(!1);I.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");I.appendChild(M);null!=g&&(g.eltCount+=I.getElementsByTagName("*").length,g.nodeCount+=I.getElementsByTagName("mxCell").length);+m=(m<<5)-m+this.hashValue(I,function(L,K,aa,ja){return!ja||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==L.nodeName&&"previous"==K?null:aa:Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){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,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=+c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,I=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=I&&(n^=this.hashValue(F,g,m)+this.hashValue(I,g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=+function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,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 g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\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 g=this.sidebar.palettes[c];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));+c=null!=c?c:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var n=g.previousSibling;m.insertBefore(g,c);m.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var m=mxUtils.parseXml(c.getData());if("mxlibrary"==m.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(c,n,m.documentElement.getAttribute("title"),g)}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.showSearchWindow=function(c,g){var m=c?"findReplace":"find",n=m+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(m))});this[n].window.addListener("hide",+function(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==+c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,M=mxUtils.bind(this,function(ha,Z){0==ha.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(ha,+Z)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ha){M(g,ha)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");+K.style.backgroundColor="inherit";n.style.position="relative";var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=+ja?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var ca=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),+ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=aa.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),+g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ja||c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(Z)})))}),Y=mxUtils.bind(this,function(ha,Z,k,v){ha=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var O=ca.getCellGeometry(ha[J]);null!=O&&O.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&+(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),da=mxUtils.bind(this,function(ha){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ha),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=ca.getSelectionCells(),k=ca.view.getBounds(Z);if(null!=k&&0<k.width&&+0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;Y(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor=+"light-dark(#fefefe, #000000)",L.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,da(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.graphHandler.first&&+(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor=+"";L.style.backgroundColor="";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,O,T,V,U,X){if(null!=Z&&"image/"==k.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,O,T),Z)],Z[0].vertex=!0,Y(Z,new mxRectangle(0,0,O,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=+I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ha);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=la.documentElement.getElementsByTagName("diagram");+for(ya=0;ya<wa.length;ya++){var Ia=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ia);null!=Aa&&Y(Ia,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=X&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(X,function(la){na(la,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Z,k)}}));ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ha){L.style.cursor="";L.style.backgroundColor="";ha.stopPropagation();ha.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));K.insertBefore(aa,K.firstChild);mxEvent.addListener(aa,"click",m);m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));K.insertBefore(m,K.firstChild);mxEvent.addListener(m,"click",da);".scratchpad"==c.title&&(this.addSelectionToScratchpad=da);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,@@ -3636,15 +3635,15 @@ function(K,aa,ja,ca){if("_blank"==aa||null!=K&&0<K.length){var ba=m("_blank"==aafunction(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,aa,oa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(Y){this.spinner.stop();this.handleError(Y)}))}),null!=ca?ja(ca):this.pickFolder(aa,ja)))}});x=[App.MODE_BROWSER];I||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,aa,ja){M(K.value,aa,K,ja);this.hideDialog(null,null,L.container)}),x,null,"application/pdf");this.showDialog(L.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,m,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,m){g(null)};EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var Y=g?null:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);null==Y&&0==g&&(Y=this.editor.graph.shapeBackgroundColor);var da=this.editor.graph.addForeignObjectWarning;-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ha=mxUtils.lightDarkColorSupported,Z=mxUtils.preferDarkColor;if("light"==aa||"dark"==aa)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==aa;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),N=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ha=mxUtils.lightDarkColorSupported,Z=mxUtils.preferDarkColor;if("light"==aa||"dark"==aa)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==aa;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),O=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);O.apply(this,arguments)};var T=this.editor.graph.getSvg(Y,c,I,M,null,m,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!ca,aa,ja);mxUtils.lightDarkColorSupported=ha;mxUtils.preferDarkColor=Z;this.editor.graph.addForeignObjectWarning=da;n&&this.editor.graph.addSvgShadow(T);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,I));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var X=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(la,aa,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,X,this.thumbImageCache)):X(la)});ca?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ja,ca,ba,oa,Y){var da=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");da.setAttribute("x",ca);da.setAttribute("y",ba+.5);da.setAttribute("width",oa.width);da.setAttribute("height",oa.height);null==da.setAttributeNS?da.setAttribute("xlink:href",Y):da.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Y);ja.replaceChild(da,ja.lastChild);M()}function x(){if(I<aa.length)aa[I++](x)}var F="";g=c.getElementsByTagName("style");for(var I=0;I<g.length;I++)F+=g[I].innerHTML;g=c.getElementsByTagName("switch");counter=g.length;var M=mxUtils.bind(this,function(){counter--;0==counter&&m(c)}),L={},K={},aa=[];for(I=0;I<g.length;I++)mxUtils.bind(this,function(ja){var ca=ja.getElementsByTagName("div");if(0<ca.length)try{var ba=ca[0].cloneNode(!0),oa=parseInt(ba.style.marginLeft),Y=parseInt(ba.style.paddingTop),da=ba.getElementsByTagName("div")[1],ha=ca=!1,Z=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;ha="vertical-"==v.substring(0,9);ca="-rl"==v.substring(v.length--3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&ca?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=L[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?da.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?-da.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,Y,v,J),L[N]=T);"1px"==ba.style.height&&("unsafe center"==Z?Y-=T.height/2:"unsafe flex-end"==Z&&(Y-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,Y,T.width,T.height+parseInt(da.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=-K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,function(X){n(ja,oa,Y,T,X);K[N]=X;V()}),F):(n(ja,oa,Y,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"++3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&ca?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var O=ba.outerHTML,T=L[O];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?da.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?+da.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,Y,v,J),L[O]=T);"1px"==ba.style.height&&("unsafe center"==Z?Y-=T.height/2:"unsafe flex-end"==Z&&(Y-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,Y,T.width,T.height+parseInt(da.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=+K[O];null==U?Graph.htmlToPng(O,T.width,T.height,mxUtils.bind(this,function(X){n(ja,oa,Y,T,X);K[O]=X;V()}),F):(n(ja,oa,Y,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();L.id=I;null!=M&&L.setAttribute("name",M);m&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);n&&L.setAttribute("disabled","disabled");F&&(c.appendChild(L),m=document.createElement("label"),mxUtils.write(m,g),m.setAttribute("for",I),c.appendChild(m),x||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,g){var m=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var I=document.createElement("option");I.setAttribute("value","custom");mxUtils.write(I,mxResources.get("custom")+"...");F.appendChild(I);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==F.value){var M=new FilenameDialog(this,x,mxResources.get("ok"),function(L){null!=L?(x=L,I.setAttribute("title",L)):(F.value="blank",I.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(M.container,300,80,!0,!1);M.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));@@ -3670,9 +3669,9 @@ oa.appendChild(ba);ba=document.createElement("option");mxUtils.write(ba,mxResour"text"),da.style.width="50px",da.style.marginLeft="6px",da.style.marginBottom="10px",da.value=m+"px",ca.appendChild(da),mxUtils.br(ca);var ha=this.addLinkSection(ca,n),Z=K?this.addCheckbox(ca,mxResources.get("transparentBackground"),!1):null;null!=Z&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ja&&(mxUtils.write(ca,mxResources.get("pages")+":"),ca.appendChild(k),mxUtils.br(ca),c+=30),v=this.addCheckbox(ca,mxResources.get("selectedPage")+": "+g));var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginTop="16px";ja=document.createElement("option");ja.setAttribute("value","0");mxUtils.write(ja,mxResources.get("light"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","1");mxUtils.write(ja,mxResources.get("dark"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","auto");mxUtils.write(ja,mxResources.get("automatic"));ja.setAttribute("selected","selected");J.appendChild(ja);aa&&(mxUtils.write(ca,-mxResources.get("appearance")+":"),ca.appendChild(J),mxUtils.br(ca),c+=30);var N=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,N),V=T.getEditInput();n&&(V.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=V.style.marginLeft;U.style.marginTop="8px";var X=this.addCheckbox(ca,mxResources.get("tags"),!0);X.style.marginLeft=V.style.marginLeft;X.style.marginBottom="16px";-X.style.marginTop="16px";mxEvent.addListener(N,"change",function(){N.checked?(U.removeAttribute("disabled"),V.removeAttribute("disabled"),X.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));V.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ha.getTarget(),ha.getColor(),null==-v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=Y?Y.value:null,null!=da?da.value:null,X.checked,oa.value,null!=Z?Z.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=Y?(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ha.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");+mxResources.get("appearance")+":"),ca.appendChild(J),mxUtils.br(ca),c+=30);var O=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,O),V=T.getEditInput();n&&(V.style.marginLeft=O.style.marginLeft,O.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=V.style.marginLeft;U.style.marginTop="8px";var X=this.addCheckbox(ca,mxResources.get("tags"),!0);X.style.marginLeft=V.style.marginLeft;X.style.marginBottom="16px";+X.style.marginTop="16px";mxEvent.addListener(O,"change",function(){O.checked?(U.removeAttribute("disabled"),V.removeAttribute("disabled"),X.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));V.checked&&O.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ha.getTarget(),ha.getColor(),null==+v?!1:v.checked,O.checked,T.getLink(),U.checked,null!=Y?Y.value:null,null!=da?da.value:null,X.checked,oa.value,null!=Z?Z.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=Y?(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ha.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");F.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:"+(x?"10":"4")+"px";F.appendChild(I);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";F.appendChild(M);mxUtils.write(F,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ja=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ja&&(ja.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ba=parseInt(L.value)||0;m(!K.checked,null!=aa?aa.checked:!1,null!=ja?ja.checked:!1,ca,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,I,M,L){I=null!=I?I:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace=@@ -3681,13 +3680,13 @@ mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.se"checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!aa.isSelectionEmpty()||"selectionOnly"!=c[ca]){var Z=document.createElement("option");mxUtils.write(Z,mxResources.get(c[ca]));Z.setAttribute("value",c[ca]);ha.appendChild(Z)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ha),mxUtils.br(K),ja+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(Y.checked=!0)})):F&&(K.appendChild(da),mxUtils.write(K,mxResources.get("crop")),mxUtils.br(K),ja+=30,mxEvent.addListener(Y,"change",function(){Y.checked?da.removeAttribute("disabled"):da.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?L&&(Y.style.display="none",Y.nextSibling.style.display="none",Y.nextSibling.nextSibling.style.display="none",ja-=30):(ha.value="diagram",da.setAttribute("checked","checked"),da.defaultChecked=!0,mxEvent.addListener(Y,"change",function(){ha.value=Y.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=M&&"webp"!=M),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));v.appendChild(L);"svg"==M&&mxUtils.lightDarkColorSupported?-(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),+(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),O=null;if("png"==M||"jpeg"==M||"webp"==M)O=this.addCheckbox(K,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ja+=30;aa=null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<aa?":":""),I,null,null,"jpeg"!=M&&"webp"!=M),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="28px";"png"==M||"svg"==M?(I=function(){T.checked?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),V.appendChild(F),F=document.createElement("option"),F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),V.appendChild(F),1<aa?(T.style.marginBottom="12px",V.style.marginBottom="16px",K.appendChild(V),mxUtils.br(K),ja+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(V.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",I),I()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),mxUtils.write(K,mxResources.get("embedImages")),mxUtils.br(K),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(X),mxUtils.write(K,mxResources.get("embedFonts")),mxUtils.br(K),ja+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);I=document.createElement("option");I.setAttribute("value","blank");mxUtils.write(I,mxResources.get("openInNewWindow"));fa.appendChild(I);I=document.createElement("option");I.setAttribute("value","self");mxUtils.write(I,mxResources.get("openInThisWindow"));fa.appendChild(I);I=document.createElement("div");mxUtils.write(I,mxResources.get("LinksLost"));I.style.margin="7px";I.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(I),mxUtils.br(K),mxUtils.br(K),ja+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=V.value;x(ba.value,k.checked,!Y.checked,J.checked,T.checked,U.checked&&g,oa.value,da.checked,("png"==M||"svg"==M)&&"currentPage"==V.value,-fa.value,null!=N?N.checked:null,null!=v?v.value:null,ha.value,X.checked)}),null,m,n);this.showDialog(m.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText=+fa.value,null!=O?O.checked:null,null!=v?v.value:null,ha.value,X.checked)}),null,m,n);this.showDialog(m.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),I.shadowVisible&&n,!n),aa=this.addCheckbox(F,m),ja=this.addCheckbox(F,mxResources.get("lightbox"),!0),ca=this.addEditButton(F,ja),ba=ca.getEditInput(),oa=1<I.model.getChildCount(I.model.getRoot()),Y=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);Y.style.marginLeft=ba.style.marginLeft;Y.style.marginBottom="12px";Y.style.marginTop="8px";mxEvent.addListener(ja,"change",function(){ja.checked?(oa&&Y.removeAttribute("disabled"),ba.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,aa.checked,ja.checked,ca.getLink(),Y.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,I,M){function L(ba){var oa=" ",Y="";n&&(oa=" 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!=aa?"&page="+aa:"")+(x?"&edit=_blank":@@ -3752,14 +3751,14 @@ null!=aa&&0<aa.length&&(ba=this.importXml(aa,m,n,K,null,null!=ja?mxEvent.isContr(ca=!0,this.importGraphML(c,oa)):null!=L&&null!=I&&EditorUi.isVisioFilename(I)?(ca=!0,this.importVisio(L,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,g=mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?oa(Y.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==Y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,g,I):this.parseFile(L,g,I)):0==c.indexOf("PK")&&null!=L?(ca=!0,this.importZipFile(L,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(ba)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ja?mxEvent.isControlDown(ja):null));ca||null==M||M(ba);return ba};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){n=null!=n?n:this.maxImageSize;K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var Y=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var da=aa||this.resampleThreshold,ha=0;ha<c.length;ha++)if("image/svg"!==c[ha].type.substring(0,9)&&"image/"===c[ha].type.substring(0,6)&&c[ha].size>da){Y=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[Y],"crop",[ba],"resizeImages",[oa],"ignoreEmbeddedXml",-[ja],"evt",[ca]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,fa,na,la,qa,ya,wa,Ja,Aa){try{if(null!=X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(X,fa,na,la,qa,ya,wa,Ja,Aa,ba,ja,ca)}catch(Ba){return this.handleError(Ba),-null}});F=null!=F?F:mxUtils.bind(this,function(X){k.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],V=mxUtils.bind(this,function(X,fa){T[X]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var la=T[X]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(X){var fa=c[X];if(null!=fa){var na=new FileReader;-na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ja=mxUtils.parseXml(wa),Aa=Ja.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==-Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(X,mxUtils.bind(this,function(){try{if(null!=Ja){var Ca=Ja.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Oa=Da.getAttribute("viewBox");if(null==Oa||-0==Oa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Qa=Oa.split(" ");3<Qa.length&&(va=parseFloat(Qa[2]),Na=parseFloat(Qa[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ra=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+X*v,m+X*v,Math.max(1,Math.round(va*Ra)),Math.max(1,Math.round(Na*Ra)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,-Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):V(X,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+X*v,m+X*v,0,0,fa.name)}))}else V(X,mxUtils.bind(this,function(){return null}))}else{ya=-!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var ra=new Image;ra.src=la.target.result;V(X,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+X*v,m+X*v,ra.width,ra.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(X,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Oa=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+X*v,m+X*v,Math.round(va*Oa),Math.round(Na*Oa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=+[ja],"evt",[ca]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,fa,na,la,qa,ya,wa,Ia,Aa){try{if(null!=X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(X,fa,na,la,qa,ya,wa,Ia,Aa,ba,ja,ca)}catch(Ba){return this.handleError(Ba),+null}});F=null!=F?F:mxUtils.bind(this,function(X){k.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,O=J,T=[],V=mxUtils.bind(this,function(X,fa){T[X]=fa;if(0==--O){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var la=T[X]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(X){var fa=c[X];if(null!=fa){var na=new FileReader;+na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ia=mxUtils.parseXml(wa),Aa=Ia.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==+Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(X,mxUtils.bind(this,function(){try{if(null!=Ia){var Ca=Ia.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ra=Da.getAttribute("viewBox");if(null==Ra||+0==Ra.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Ta=Ra.split(" ");3<Ta.length&&(va=parseFloat(Ta[2]),Na=parseFloat(Ta[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ua=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+X*v,m+X*v,Math.max(1,Math.round(va*Ua)),Math.max(1,Math.round(Na*Ua)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,+Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var B=qa.indexOf(";");0<B&&(qa=qa.substring(0,B)+qa.substring(qa.indexOf(",",B+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(B){}return null})):V(X,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+X*v,m+X*v,0,0,fa.name)}))}else V(X,mxUtils.bind(this,function(){return null}))}else{ya=+!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var sa=new Image;sa.src=la.target.result;V(X,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+X*v,m+X*v,sa.width,sa.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(X,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Ra=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+X*v,m+X*v,Math.round(va*Ra),Math.round(Na*Ra),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=la.target.result,x(qa,fa.type,g+X*v,m+X*v,240,160,fa.name,function(Ca){V(X,function(){return Ca})},fa)}catch(Ca){V(X,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else V(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+X*v,m+X*v,240,160,fa.name,function(la){V(X,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(Y){Y=[];for(ha=0;ha<c.length;ha++)Y.push(c[ha]);c=Y;this.confirmImageResize(function(k){oa=k;Z()},L)}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,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,I){if(F||g)mxSettings.setResizeImages(F?I:null),mxSettings.save();m();c(I)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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):@@ -3768,44 +3767,44 @@ action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=fu0,0,ja,ca);var oa=ba.toDataURL();if(oa.length<g.length){var Y=document.createElement("canvas");Y.width=ja;Y.height=ca;var da=Y.toDataURL();oa!==da&&(g=oa,M=ja,L=ca)}}}catch(ha){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,I):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=m&&(n.onerror=m);n.src=c}catch(x){if(null!=m)m(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=-function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==+function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,O){var T=JSON.parse(O);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=X,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:V,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};g.cellEditor.editMermaidData=-function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,X),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,config:T.config},-null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,-"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(V){c.handleError(V)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,J){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(V){c.handleError(V)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&+function(v,J,O){var T=JSON.parse(O);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,X),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,config:T.config},+null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var O=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=O)this.editPlantUmlData(v,J,O);else if(O=this.graph.getAttributeForCell(v,"mermaidData"),null!=O&&window.isMermaidEnabled)this.editMermaidData(v,J,O);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,+"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(V){c.handleError(V)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,J){var O=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);O=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(V){c.handleError(V)}return O};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var F=g.setBackgroundImage;g.setBackgroundImage=function(v){null!=v&&null!=v.originalSrc&&(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.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(v,J){v=-null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+1),J=J.getProperty("patches"),N=0;N<J.length;N++)if(null!=J[N][EditorUi.DIFF_UPDATE]&&null!=J[N][EditorUi.DIFF_UPDATE][v]||null!=J[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var I=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J){var N=I.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=-J?c.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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==-urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(V,U,X){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,X)&&mxEvent.consume(V);null!=T&&T(V,U,X)};L.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,-null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var aa=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=-function(v,J,N){if(c.editor.graph.isSelectionEmpty())aa.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,J,N):this.addPopupMenuArrangeItems(v,J,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&-g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=+null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var O=v.indexOf(",");if(0<O)for(v=v.substring(O+1),J=J.getProperty("patches"),O=0;O<J.length;O++)if(null!=J[O][EditorUi.DIFF_UPDATE]&&null!=J[O][EditorUi.DIFF_UPDATE][v]||null!=J[O][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[O][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var I=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J,O){var T=I.apply(this,arguments);null!=T&&null!=T.originalSrc&&(T=+J?c.createImageForPageLink(T.originalSrc,O,null,!0):{src:T.originalSrc});return T};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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==urlParams.dev&&+(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,O){var T=J;J=function(V,U,X){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,X)&&mxEvent.consume(V);null!=T&&T(V,U,X)};L.call(this,v,J,O)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,+null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,O){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,O);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,O);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,O)};var aa=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=+function(v,J,O){if(c.editor.graph.isSelectionEmpty())aa.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,O);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,J,O):this.addPopupMenuArrangeItems(v,J,O),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,O),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,O),this.addMenuItems(v,["lockUnlock","-"],null,O),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&+g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,O)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,O);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"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.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ja=g.getExportVariables;g.getExportVariables=function(){var v=ja.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var ca=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var Y=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");-if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))Y.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var da=this.actions.get("print");da.setEnabled(!mxClient.IS_IOS||!navigator.standalone);da.visible=da.isEnabled();if(!this.editor.chromeless||+null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var Y=g.labelLinkClicked;g.labelLinkClicked=function(v,J,O){var T=J.getAttribute("href");+if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(O)&&mxEvent.isPopupTrigger(O))Y.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(O)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var da=this.actions.get("print");da.setEnabled(!mxClient.IS_IOS||!navigator.standalone);da.visible=da.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&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,J){null!=J&&g.isEnabled()&&!g.isEditing()&&null!=J.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),-this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,N=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),-mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?+this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,O=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=O&&(O.parentNode.removeChild(O),O=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==O&&(O=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),+mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=O&&(O.parentNode.removeChild(O),O=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,X)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(V),X*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){da=this.editor.graph.view;var ha=mxSettings.getUnit();da.setUnit(ha);Editor.pageSizeUnit=ha==mxConstants.METERS?mxConstants.MILLIMETERS:ha;da.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,da.unit);this.refresh()}if("1"==urlParams.styledev){da=document.getElementById("geFooter");null!=da&&(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)})),da.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:Z.apply(this,arguments)}}da=document.getElementById("geInfo");null!=da&&da.parentNode.removeChild(da);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});-mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,X=J.y/-V-T.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(X=U=null),this.importFiles(N,U,X,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(X=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,-null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,X,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):-(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,X,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ja=Math.max(1,wa.width);-wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ja)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,X,Ja*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,X,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),+mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),O=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,X=J.y/+V-T.y;if(0<O.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(O,!0)):(mxEvent.isAltDown(v)&&(X=U=null),this.importFiles(O,U,X,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(X=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,+null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,X,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;O=J.getElementsByTagName("img");null!=O&&1==O.length?(na=O[0].getAttribute("src"),null==na&&(na=O[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(O=J.getElementsByTagName("a"),null!=O&&1==O.length?na=O[0].getAttribute("href"):+(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,X,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ia=Math.max(1,wa.width);+wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ia)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,X,Ia*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,X,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),U,X,!0))}}v.stopPropagation();v.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(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});-g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,-N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"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(da=Editor.currentTheme,"simple"==da||"sketch"==da)this.doSetCurrentTheme(da,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||+g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),O=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,+O-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"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(da=Editor.currentTheme,"simple"==da||"sketch"==da)this.doSetCurrentTheme(da,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));da=!1;if(null!=urlParams.dark)da=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)da="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||da&&"auto"!=mxSettings.settings.darkMode||(da=mxSettings.settings.darkMode);"auto"==da&&this.isAutoDarkModeSupported()&&(da=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof da?"1"==da:da);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){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);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,J){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&-c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||-this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));+c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var C=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||+this.toggleFormatPanel(!0));this.lastWindowWidth=c}C.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var F=null,I=null,M=null,L=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){L=parseInt(this.diagramContainer.style.height);I=mxEvent.getClientY(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){M=parseInt(this.diagramContainer.style.width);F=mxEvent.getClientX(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(K){var aa=!1;null!=F&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(K)-F)+"px",aa=!0);null!=I&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(K)-I)+"px",aa=!0);aa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(K){null==F&&null==I||mxEvent.consume(K);I=F=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";@@ -3896,14 +3895,14 @@ F);this.isCompatibleString(x)?g(x):g(null,n,I)}))}))};EditorUi.prototype.readTypnull!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(m=g.getElementsByTagName("img"),1==m.length&&(n=m[0].getAttribute("src"),m=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(m=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(m=x)}catch(F){}}null!=m&&(mxUtils.setTextContent(g,m),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,m){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,c,g,m)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var m=this.editor,n=m.graph,-x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,N=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var X=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);-la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ja=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ja/(X.height/ha.view.scale),la.width*wa/(X.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(X=n.getBoundingBox(n.getSelectionCells())),la.width=(X.width+1)*wa/ha.view.scale,la.height=(X.height+-1)*wa/ha.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==Z){Z=PrintDialog.createPrintPreview(ha,wa,null,0,fa,na,qa);Z.title=this.getBaseFilename(!0);Z.pageSelector=!1;Z.mathEnabled=!1;fa=g.border;isNaN(fa)||(Z.pageMargin=fa);g.selection&&(Z.isCellVisible=function(Ma){return ha.isCellSelected(Ma)});var Aa=Z.writeHead;Z.writeHead=function(Ma,ra){ra=null!=ra?ra:"";g.shadows||(ra+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');-mxClient.IS_GC&&(ra+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(ra+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ha.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'+-mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=Z.drawBackgroundImage;Z.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(ra){ra.setAttribute("href","javascript:void(0)")}))}}var Ga=Z.addGraphFragment;Z.addGraphFragment=function(Ma,ra,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");-if(this.graph.shadowVisible)for(var Oa=va.getElementsByTagName("svg"),Qa=0;Qa<Oa.length;Qa++)ha.addSvgShadow(Oa[Qa])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{X=ha.background;if(null==X||""==X||X==mxConstants.NONE)X="#ffffff";Z.backgroundColor=X;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,+x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,O=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var X=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);+la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ia=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ia/(X.height/ha.view.scale),la.width*wa/(X.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(X=n.getBoundingBox(n.getSelectionCells())),la.width=(X.width+1)*wa/ha.view.scale,la.height=(X.height++1)*wa/ha.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==Z){Z=PrintDialog.createPrintPreview(ha,wa,null,0,fa,na,qa);Z.title=this.getBaseFilename(!0);Z.pageSelector=!1;Z.mathEnabled=!1;fa=g.border;isNaN(fa)||(Z.pageMargin=fa);g.selection&&(Z.isCellVisible=function(Ma){return ha.isCellSelected(Ma)});var Aa=Z.writeHead;Z.writeHead=function(Ma,sa){sa=null!=sa?sa:"";g.shadows||(sa+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');+mxClient.IS_GC&&(sa+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(sa+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ha.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'++mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=Z.drawBackgroundImage;Z.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(sa){sa.setAttribute("href","javascript:void(0)")}))}}var Ga=Z.addGraphFragment;Z.addGraphFragment=function(Ma,sa,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");+if(this.graph.shadowVisible)for(var Ra=va.getElementsByTagName("svg"),Ta=0;Ta<Ra.length;Ta++)ha.addSvgShadow(Ra[Ta])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{X=ha.background;if(null==X||""==X||X==mxConstants.NONE)X="#ffffff";Z.backgroundColor=X;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.appendGraph(ha,wa,fa,na,k,!0,v,la,g.selection?ha.getSelectionCells():null);k=ha.getCustomFonts();if(null!=Z.wnd)for(la=0;la<k.length;la++)fa=k[la].name,na=k[la].url,Graph.isCssFontUrl(na)?Z.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(na)+'" charset="UTF-8" type="text/css">'):(Z.wnd.document.writeln('<style type="text/css">'),Z.wnd.document.writeln('@font-face {\nfont-family: "'+-mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),Z.wnd.document.writeln("</style>"))}J&&(ha.useCssTransforms=J,ha.currentTranslate=N,ha.currentScale=T,ha.view.translate=V,ha.view.scale=U);return Z}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||(K=parseInt(M)-1,F=parseInt(L)-1);for(var aa=K;aa<=+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),Z.wnd.document.writeln("</style>"))}J&&(ha.useCssTransforms=J,ha.currentTranslate=O,ha.currentScale=T,ha.view.translate=V,ha.view.scale=U);return Z}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||(K=parseInt(M)-1,F=parseInt(L)-1);for(var aa=K;aa<=F;aa++){var ja=this.pages[aa];M=ja==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var ca=K=!1,ba=null,oa=null;null==ja.viewState&&null==ja.root&&this.updatePageRoot(ja);null!=ja.viewState&&(L=ja.viewState.pageVisible,K=ja.viewState.mathEnabled,ca=ja.viewState.shadowVisible,ba=ja.viewState.background,oa=ja.viewState.backgroundImage,M.pageFormat=ja.viewState.pageFormat,M.gridSize=ja.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ja));M.background=ba;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=ca;var Y=M.getGraphBounds;M.getGraphBounds=function(){var ha=Y.apply(this,arguments),Z=this.backgroundImage;if(null!=Z&&null!=Z.width&&null!=Z.height){var k=this.view.translate,v=this.view.scale;ha=mxRectangle.fromRectangle(ha);ha.add(new mxRectangle((k.x+Z.x)*v,(k.y+Z.y)*v,Z.width*v,Z.height*v))}return ha};var da=M.getGlobalVariable;M.getGlobalVariable=function(ha){return"page"==ha?ja.getName():"pagenumber"==ha?aa+1:"pagecount"==ha?null!=this.pages?this.pages.length:1:da.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ja);M.model.setRoot(ja.root)}x=I(M,x,aa!=F,ja.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=I(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):@@ -3931,37 +3930,37 @@ this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(x){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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(x){c||this.handleError(x)}};EditorUi.prototype.installMessageHandler=function(c){var g=null,m=!1,n=!1,x=null,F=mxUtils.bind(this,function(L,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var K=-L.data,aa=null,ja=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(Ca){}return ra});if("json"==urlParams.proto){var ca=-!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(ra){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));-return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(ra){null!=ra?I.postMessage(JSON.stringify({event:"prompt",value:ra,message:K}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,+L.data,aa=null,ja=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(Ca){}return sa});if("json"==urlParams.proto){var ca=+!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(sa){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));+return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(sa){null!=sa?I.postMessage(JSON.stringify({event:"prompt",value:sa,message:K}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,!1);ba.init();return}if("draft"==K.action){var oa=ja(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):-null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){I.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var Y=1==K.enableRecent,da=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,-!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(ra,Ca,Da,va){ra=ra||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(ra,L,ra!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):-null,da?mxUtils.bind(this,function(ra,Ca){this.remoteInvoke("searchDiagrams",[ra,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:ra,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=-this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=-K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=-(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(ra){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==-K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var V=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(ra,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(V,this.editor.graph,null,!0,function(va){U(ra,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);-this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=ra;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),X=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==K.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(ra)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var ra=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Qa){return"page"==Qa?Ca.getName():"pagenumber"==Qa?1:ra.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=-v.model,Na=va.getChildCells(va.getRoot()),Oa={};for(Da=0;Da<K.layerIds.length;Da++)Oa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Oa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Qa){X(Qa.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){X(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),-m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else if(na=mxUtils.bind(this,-function(){var ra=this.createLoadMessage("export");ra.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();ra.xml=mxUtils.getXml(Ca);ra.data=this.getFileData(null,null,!0,null,null,null,Ca);ra.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),ra.data=this.getHtml(Ca,this.editor.graph),ra.xml=mxUtils.getXml(Ca),ra.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?-K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=K.asText?Na:Editor.createSvgDataUri(Na);I.postMessage(JSON.stringify(ra),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,-null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||-K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Oa){Da(mxUtils.getXml(Oa))})):Da(mxUtils.getXml(Na))}));return}I.postMessage(JSON.stringify(ra),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;+null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&this.actions.get("exit").funct()}));try{ba.init()}catch(sa){I.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var Y=1==K.enableRecent,da=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,+!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(sa,Ca,Da,va){sa=sa||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(sa,L,sa!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,Y?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):+null,da?mxUtils.bind(this,function(sa,Ca){this.remoteInvoke("searchDiagrams",[sa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:sa,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=+this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=+K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,O=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(O-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=+(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(sa){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==+K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var V=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(sa,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(V,this.editor.graph,null,!0,function(va){U(sa,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);+this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=sa;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),X=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==K.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(sa)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var sa=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Ta){return"page"==Ta?Ca.getName():"pagenumber"==Ta?1:sa.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=+v.model,Na=va.getChildCells(va.getRoot()),Ra={};for(Da=0;Da<K.layerIds.length;Da++)Ra[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Ra[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ta){X(Ta.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){X(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),+m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?U("data:image/png;base64,"+sa.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else if(na=mxUtils.bind(this,+function(){var sa=this.createLoadMessage("export");sa.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();sa.xml=mxUtils.getXml(Ca);sa.data=this.getFileData(null,null,!0,null,null,null,Ca);sa.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),sa.data=this.getHtml(Ca,this.editor.graph),sa.xml=mxUtils.getXml(Ca),sa.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?+K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=K.asText?Na:Editor.createSvgDataUri(Na);I.postMessage(JSON.stringify(sa),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,+null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(sa.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||+K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Ra){Da(mxUtils.getXml(Ra))})):Da(mxUtils.getXml(Na))}));return}I.postMessage(JSON.stringify(sa),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){ca=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.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+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=K.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=K.noSaveBtn);if(null!=K.rough){var qa=Editor.sketchMode;this.doSetSketchMode(K.rough);qa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=K.dark&&this.setDarkMode(K.dark);null!=K.border&&(this.embedExportBorder=K.border);null!=K.theme&&(this.embedExportTheme=K.theme);null!=K.background&&(this.embedExportBackground=K.background);null!=K.viewport&&(this.embedViewport=K.viewport);this.embedExitPoint=null;if(null!=K.rect){var ya=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,K.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,K.rect.top)+"px";this.minInlineWidth=K.minWidth;this.minInlineHeight=K.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=-"";var wa=K.maxFitScale,Ja=K.rect.width+2*ya,Aa=K.rect.height+2*ya;aa=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();Ja=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ja):Ja,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,ra.height-80);this.diagramContainer.style.width=Ja+"px";this.diagramContainer.style.height=ra+"px";var Ca=this.editor.graph;ra=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);-if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=ra;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);-var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(ra){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();-null!=Ba&&(oa=ja(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(ra){I.postMessage(JSON.stringify({event:"merge",message:K,error:ra}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),-"*");return}}catch(ra){this.handleError(ra)}}var Ga=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(ra,Ca){m=!0;try{c(ra,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),+"";var wa=K.maxFitScale,Ia=K.rect.width+2*ya,Aa=K.rect.height+2*ya;aa=mxUtils.bind(this,function(){var sa=mxUtils.getDocumentSize();Ia=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ia):Ia,sa.width-80);sa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,sa.height-80);this.diagramContainer.style.width=Ia+"px";this.diagramContainer.style.height=sa+"px";var Ca=this.editor.graph;sa=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);+if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=sa;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);+var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(sa){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();+null!=Ba&&(oa=ja(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(sa){I.postMessage(JSON.stringify({event:"merge",message:K,error:sa}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),+"*");return}}catch(sa){this.handleError(sa)}}var Ga=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(sa,Ca){m=!0;try{c(sa,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));x=Da}),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)Ca=this.createLoadMessage("load"),Ca.xml=ra,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(ra){Ma(ra,L)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ja)):-null!=K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ma(ra.responseText,L):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===-typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(ra){Ma(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(ra){Ma(Ga(),L)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):+g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=sa,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(sa){Ma(sa,L)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ja)):+null!=K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?Ma(sa.responseText,L):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===+typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(sa){Ma(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(sa){Ma(Ga(),L)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(F,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(L,K,aa){M.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:L,target:K,allowOpener:aa}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,m,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=m?" ("+m+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),@@ -3971,24 +3970,24 @@ function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new Textn.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=F}catch(I){this.handleError(I)}}));x.setAttribute("title","copy");x.className="geBtn";m.appendChild(x)}),!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(c){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(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"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,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g)}))};EditorUi.prototype.doImportCsv=function(c,g){try{var m=c.split("\n"),n=[],x=[],F=[],I={};if(0<m.length){var M=-{},L=this.editor.graph,K=null,aa=null,ja=null,ca=null,ba=null,oa=null,Y=null,da="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",N=!1,T=null,V=null,U=40,X=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ta):(L.setSelectionCells(ta),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ja=null,Aa="auto";Z=null;for(var Ba=[],-Ga=null,Ma=null,ra=0;ra<m.length&&"#"==m[ra].charAt(0);){c=m[ra].replace(/\r$/,"");for(ra++;ra<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ra].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ra].substring(1)),ra++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ja=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?Y=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==-Da?da=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):-"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?X=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[ra])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[ra].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ja&&(Ja="%"+Da[0]+-"%");if(null!=Ba)for(var Oa=0;Oa<Ba.length;Oa++)null==M[Ba[Oa].to]&&(M[Ba[Oa].to]={});ha=[];for(va=ra+1;va<m.length;va++){var Qa=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Qa){var Ra=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Ra+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ha.push(Qa)}L.model.beginUpdate();try{for(va=0;va<ha.length;va++){Qa=ha[va];var za=null,Ea=null!=c?k+Qa[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=-mxUtils.indexOf(n,za));var C=new mxCell(Ja,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var P=0;P<Qa.length;P++)L.setAttributeForCell(C,Da[P],Qa[P]),null==za||m||L.setAttributeForCell(za,Da[P],Qa[P]);if(null!=ba&&null!=Y){var R=Y[C.getAttribute(ba)];null!=R&&(L.labelChanged(C,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ja){var W=ja[C.getAttribute(ca)];null!=W&&(C.style=W)}L.setAttributeForCell(C,-"placeholders","1");C.style=L.replacePlaceholders(C,C.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(L.model.setStyle(za,C.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=C;if(!m)for(Oa=0;Oa<Ba.length;Oa++)M[Ba[Oa].to][za.getAttribute(Ba[Oa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);-Z=null!=Ca?L.model.getCell(k+Qa[Ca]):null;if(za.vertex){Ra=null!=Z?0:ya;ra=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ra+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ra+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ia.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):+{},L=this.editor.graph,K=null,aa=null,ja=null,ca=null,ba=null,oa=null,Y=null,da="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",O=!1,T=null,V=null,U=40,X=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ia=null,Aa="auto";Z=null;for(var Ba=[],+Ga=null,Ma=null,sa=0;sa<m.length&&"#"==m[sa].charAt(0);){c=m[sa].replace(/\r$/,"");for(sa++;sa<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[sa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[sa].substring(1)),sa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ia=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?Y=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==+Da?da=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?O="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):+"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?X=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]++"%");if(null!=Ba)for(var Ra=0;Ra<Ba.length;Ra++)null==M[Ba[Ra].to]&&(M[Ba[Ra].to]={});ha=[];for(va=sa+1;va<m.length;va++){var Ta=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Ta){var Ua=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Ua+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ha.push(Ta)}L.model.beginUpdate();try{for(va=0;va<ha.length;va++){Ta=ha[va];var za=null,Ea=null!=c?k+Ta[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=+mxUtils.indexOf(n,za));var B=new mxCell(Ia,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");B.collapsed=O;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,O);for(var P=0;P<Ta.length;P++)L.setAttributeForCell(B,Da[P],Ta[P]),null==za||m||L.setAttributeForCell(za,Da[P],Ta[P]);if(null!=ba&&null!=Y){var R=Y[B.getAttribute(ba)];null!=R&&(L.labelChanged(B,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ja){var W=ja[B.getAttribute(ca)];null!=W&&(B.style=W)}L.setAttributeForCell(B,+"placeholders","1");B.style=L.replacePlaceholders(B,B.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[B])):(L.model.setStyle(za,B.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=B;if(!m)for(Ra=0;Ra<Ba.length;Ra++)M[Ba[Ra].to][za.getAttribute(Ba[Ra].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);+Z=null!=Ca?L.model.getCell(k+Ta[Ca]):null;if(za.vertex){Ua=null!=Z?0:ya;sa=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ua+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=sa+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ia.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ia.height+na:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+X}m?(null==I[Ea]&&(I[Ea]=[]),I[Ea].push(za)):(n.push(za),null!=Z?(Z.style=L.replacePlaceholders(Z,da,K),L.addCell(za,Z),x.push(Z)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ka="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?x[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ka||"auto"!=-J&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=F.slice(),ta=F.slice();for(Oa=0;Oa<Ba.length;Oa++){var ua=Ba[Oa];for(va=0;va<n.length;va++){za=n[va];var Ia=mxUtils.bind(this,function(kb,ob,hb){var pb=ob.getAttribute(hb.from);if(null!=pb&&""!=pb){pb=pb.split(",");for(var sb=0;sb<pb.length;sb++){var ib=M[hb.to][pb[sb]];if(null==ib&&null!=oa){ib=new mxCell(pb[sb],new mxGeometry(ya,wa,0,0),oa);ib.style=L.replacePlaceholders(ob,ib.style,K);var mb=this.editor.graph.getPreferredSizeForCell(ib);+J&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=F.slice(),ra=F.slice();for(Ra=0;Ra<Ba.length;Ra++){var ua=Ba[Ra];for(va=0;va<n.length;va++){za=n[va];var Ja=mxUtils.bind(this,function(kb,ob,hb){var pb=ob.getAttribute(hb.from);if(null!=pb&&""!=pb){pb=pb.split(",");for(var sb=0;sb<pb.length;sb++){var ib=M[hb.to][pb[sb]];if(null==ib&&null!=oa){ib=new mxCell(pb[sb],new mxGeometry(ya,wa,0,0),oa);ib.style=L.replacePlaceholders(ob,ib.style,K);var mb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=mb.width+na;ib.geometry.height=mb.height+na;M[hb.to][pb[sb]]=ib;ib.vertex=!0;ib.id=pb[sb];F.push(L.addCell(ib))}if(null!=ib){mb=hb.label;null!=hb.fromlabel&&(mb=(ob.getAttribute(hb.fromlabel)||"")+(mb||""));null!=hb.sourcelabel&&(mb=L.replacePlaceholders(ob,hb.sourcelabel,K)+(mb||""));null!=hb.tolabel&&(mb=(mb||"")+(ib.getAttribute(hb.tolabel)||""));null!=hb.targetlabel&&(mb=(mb||"")+L.replacePlaceholders(ib,hb.targetlabel,K));var nb="target"==hb.placeholders==!hb.invert?ib:kb;nb=null!=hb.style?L.replacePlaceholders(nb,hb.style,K):L.createCurrentEdgeStyle();mb=L.insertEdge(null,null,mb||"",hb.invert?ib:kb,hb.invert?kb:ib,nb);if(null!=hb.labels)for(nb=0;nb<hb.labels.length;nb++){var qb=hb.labels[nb],ub=new mxCell(qb.label||nb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!hb.invert?ib:kb,ub.value,K));if(null!=-qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);mb.insert(ub)}if(null!=hb.data)for(var zb in hb.data)L.setAttributeForCell(mb,zb,hb.data[zb]);ta.push(mb);mxUtils.remove(hb.invert?kb:ib,xa)}}}});Ia(za,za,ua);if(null!=I[za.id])for(P=0;P<I[za.id].length;P++)Ia(za,I[za.id][P],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],P=0;P<Ma.length;P++)L.setAttributeForCell(za,mxUtils.trim(Ma[P]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=-U;Va.checkOverlap=!0;var Wa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());for(var kb=0;kb<F.length;kb++){var ob=L.getCellGeometry(F[kb]);ob.x=Math.round(L.snap(ob.x));ob.y=Math.round(L.snap(ob.y));"auto"==v&&(ob.width=Math.round(L.snap(ob.width)));"auto"==J&&(ob.height=Math.round(L.snap(ob.height)))}};if("["==Aa.charAt(0)){var Ta=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Wa();Ta()});la=null}else if("circle"==Aa){var ab=new mxCircleLayout(L);ab.disableEdgeStyle=-!1;ab.resetEdges=!1;var Pa=ab.isVertexIgnored;ab.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){ab.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ta.length==2*F.length-1&&1==xa.length){L.view.validate();var Sa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Sa.levelDistance=X;Sa.edgeRouting=!1;Sa.resetEdges=!1;Sa.sortEdges=!0;this.executeLayout(function(){Sa.execute(L.getDefaultParent(),-0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=X;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ta);L.moveCells(ta,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,-2,fa,X),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ta.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*X;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());-Wa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?+qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);mb.insert(ub)}if(null!=hb.data)for(var zb in hb.data)L.setAttributeForCell(mb,zb,hb.data[zb]);ra.push(mb);mxUtils.remove(hb.invert?kb:ib,xa)}}}});Ja(za,za,ua);if(null!=I[za.id])for(P=0;P<I[za.id].length;P++)Ja(za,I[za.id][P],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],P=0;P<Ma.length;P++)L.setAttributeForCell(za,mxUtils.trim(Ma[P]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=+U;Va.checkOverlap=!0;var Oa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());for(var kb=0;kb<F.length;kb++){var ob=L.getCellGeometry(F[kb]);ob.x=Math.round(L.snap(ob.x));ob.y=Math.round(L.snap(ob.y));"auto"==v&&(ob.width=Math.round(L.snap(ob.width)));"auto"==J&&(ob.height=Math.round(L.snap(ob.height)))}};if("["==Aa.charAt(0)){var Sa=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Oa();Sa()});la=null}else if("circle"==Aa){var Za=new mxCircleLayout(L);Za.disableEdgeStyle=+!1;Za.resetEdges=!1;var Pa=Za.isVertexIgnored;Za.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){Za.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ra.length==2*F.length-1&&1==xa.length){L.view.validate();var Qa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Qa.levelDistance=X;Qa.edgeRouting=!1;Qa.resetEdges=!1;Qa.sortEdges=!0;this.executeLayout(function(){Qa.execute(L.getDefaultParent(),+0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=X;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,+2,fa,X),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ra.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*X;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());+Oa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(m,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,m,n,x){c=new LinkDialog(this,c,g,m,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){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++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"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==c||c.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));@@ -4030,29 +4029,29 @@ return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=ffunction(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,m,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,m,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),n=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<n.length){var x="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,f,l,u,y,q){function B(){for(var Y=M.getElementsByTagName("div"),da=0,ha=0;ha<Y.length;ha++)"none"!=Y[ha].style.display&&Y[ha].parentNode==M&&da++;L.style.display=0==da?"block":"none"}function H(Y,da,ha,Z){function k(){da.removeChild(N);da.removeChild(T);J.style.display="block";v.style.display="block"}x={div:da,comment:Y,saveCallback:ha,deleteOnCancel:Z};var v=da.querySelector(".geCommentTxt"),J=da.querySelector(".geCommentActionsList"),N=document.createElement("textarea");-N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=Y.content;da.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(da.parentNode.removeChild(da),B()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";Y.content=N.value;mxUtils.write(v,Y.content);k();ha(Y);x=null});mxEvent.addListener(N,"keydown",-mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(U.click(),mxEvent.consume(X)):27==X.keyCode&&(V.click(),mxEvent.consume(X)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);da.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(Y,da){da.innerText="";Y=new Date(Y.modifiedDate);var ha=b.timeSince(Y);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(da,+var CommentsWindow=function(b,f,l,u,y,q){function C(){for(var Y=M.getElementsByTagName("div"),da=0,ha=0;ha<Y.length;ha++)"none"!=Y[ha].style.display&&Y[ha].parentNode==M&&da++;L.style.display=0==da?"block":"none"}function H(Y,da,ha,Z){function k(){da.removeChild(O);da.removeChild(T);J.style.display="block";v.style.display="block"}x={div:da,comment:Y,saveCallback:ha,deleteOnCancel:Z};var v=da.querySelector(".geCommentTxt"),J=da.querySelector(".geCommentActionsList"),O=document.createElement("textarea");+O.className="geCommentEditTxtArea";O.style.minHeight=v.offsetHeight+"px";O.value=Y.content;da.insertBefore(O,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(da.parentNode.removeChild(da),C()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";Y.content=O.value;mxUtils.write(v,Y.content);k();ha(Y);x=null});mxEvent.addListener(O,"keydown",+mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(U.click(),mxEvent.consume(X)):27==X.keyCode&&(V.click(),mxEvent.consume(X)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);da.insertBefore(T,v);J.style.display="none";v.style.display="none";O.focus()}function S(Y,da){da.innerText="";Y=new Date(Y.modifiedDate);var ha=b.timeSince(Y);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(da,mxResources.get("timeAgo",[ha],"{1} ago"));da.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString())}function E(Y){var da=document.createElement("img");da.className="geCommentBusyImg";da.src=IMAGE_PATH+"/spin.gif";Y.appendChild(da);Y.busyImg=da}function Q(Y){Y.style.border="1px solid red";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function c(Y){Y.style.border="";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function g(Y,da,ha,Z,k){function v(na,la,qa){var ya=document.createElement("li");-ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ja){la(Ja,Y);Ja.preventDefault();mxEvent.consume(Ja)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(Y);return{pdiv:qa,replies:la}}function N(na,la,qa,ya,wa){function Ja(){E(Ma);-Y.addReply(Ga,function(ra){Ga.id=ra;Y.replies.push(Ga);c(Ma);qa&&qa()},function(ra){Aa();Q(Ma);b.handleError(ra,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(ra){Ja()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=Y.id;null==Y.replies&&(Y.replies=[]);var Ma=g(Ga,Y.replies,Ba,Z+1);la?Aa():Ja()}if(k||!Y.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",+ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,Y);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(Y);return{pdiv:qa,replies:la}}function O(na,la,qa,ya,wa){function Ia(){E(Ma);+Y.addReply(Ga,function(sa){Ga.id=sa;Y.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();Q(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(sa){Ia()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=Y.id;null==Y.replies&&(Y.replies=[]);var Ma=g(Ga,Y.replies,Ba,Z+1);la?Aa():Ia()}if(k||!Y.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",Y.id);T.style.marginLeft=20*Z+5+"px";Y.isResolved&&(F.style.opacity="0.7");var V=document.createElement("div");V.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=Y.user&&null!=Y.user.pictureUrl?Y.user.pictureUrl:Editor.userImage;V.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";V.appendChild(U);var X=document.createElement("div");X.className="geCommentUsername";mxUtils.write(X,null!=Y.user?Y.user.displayName:mxResources.get("unknownUser"));U.appendChild(X);X=document.createElement("div");X.className="geCommentDate";X.setAttribute("data-commentId",Y.id);S(Y,X);U.appendChild(X);T.appendChild(V);V=document.createElement("div");V.className="geCommentTxt";mxUtils.write(V,Y.content||"");T.appendChild(V);Y.isLocked&&(T.style.opacity="0.5");V=document.createElement("div");V.className="geCommentActions";var fa=document.createElement("ul");fa.className="geCommentActionsList";V.appendChild(fa);m||Y.isLocked||0!=-Z&&!n||v(mxResources.get("reply"),function(){N("",!0)},Y.isResolved);U=b.getCurrentUser();null==U||null==Y.user||U.id!=Y.user.id||m||Y.isLocked||(v(mxResources.get("edit"),function(){function na(){H(Y,T,function(){E(T);Y.editComment(Y.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},Y.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);Y.deleteComment(function(na){if(!0===+Z&&!n||v(mxResources.get("reply"),function(){O("",!0)},Y.isResolved);U=b.getCurrentUser();null==U||null==Y.user||U.id!=Y.user.id||m||Y.isLocked||(v(mxResources.get("edit"),function(){function na(){H(Y,T,function(){E(T);Y.editComment(Y.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},Y.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);Y.deleteComment(function(na){if(!0===na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=J(Y).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<da.length;na++)if(da[na]==Y){da.splice(na,1);break}L.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(na){Q(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},-Y.isResolved));m||Y.isLocked||0!=Z||v(Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";Y.isResolved=!Y.isResolved;mxUtils.write(qa,Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=Y.isResolved?"none":"",wa=J(Y).replies,Ja="light-dark("+(Y.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ja;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),-Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}B()}Y.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=Y.replies&&ha<Y.replies.length;ha++)V=Y.replies[ha],V.isResolved=Y.isResolved,g(V,Y.replies,null,Z+1,k);null!=x&&(x.comment.id==Y.id?(k=Y.content,Y.content=x.comment.content,H(Y,T,x.saveCallback,+Y.isResolved));m||Y.isLocked||0!=Z||v(Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";Y.isResolved=!Y.isResolved;mxUtils.write(qa,Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=Y.isResolved?"none":"",wa=J(Y).replies,Ia="light-dark("+(Y.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ia;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),+Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}C()}Y.isResolved?O(mxResources.get("reOpened")+": ",!0,la,!1,!0):O(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=Y.replies&&ha<Y.replies.length;ha++)V=Y.replies[ha],V.isResolved=Y.isResolved,g(V,Y.replies,null,Z+1,k);null!=x&&(x.comment.id==Y.id?(k=Y.content,Y.content=x.comment.content,H(Y,T,x.saveCallback,x.deleteOnCancel),Y.content=k):null==x.comment.id&&x.comment.pCommentId==Y.id&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var I=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(I)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=I;K.style.padding="3px 4px 4px 4px";I=document.createElement("a");I.className="geButton";if(!m){var aa=I.cloneNode();aa.style.backgroundImage="url("+Editor.plusImage+")";aa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(aa,"click",function(Y){function da(){H(ha,Z,function(k){E(Z);b.addComment(k,function(v){k.id=v;ba.push(k);c(Z)},function(v){Q(Z);da();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ha=b.newComment("",b.getCurrentUser()),Z=g(ha,ba,null,0);da();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(aa)}var ja=I.cloneNode();ja.style.backgroundImage="url("+Editor.checkImage+")";ja.setAttribute("title",mxResources.get("showResolved"));var ca=!1;mxEvent.addListener(ja,"click",function(Y){(ca=!ca)?ja.classList.add("geActiveItem"):ja.classList.remove("geActiveItem");oa();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(ja);b.commentsRefreshNeeded()&&(aa=I.cloneNode(),aa.style.backgroundImage="url("+Editor.refreshImage+")",aa.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(aa,"click",function(Y){oa();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(aa));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geButton geAdaptiveAsset",mxEvent.addListener(I,"click",function(Y){q();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(I));F.appendChild(K);var ba=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var Y=x.div.querySelector(".geCommentEditTxtArea"),da=x.div.querySelector(".geCommentEditBtns");x.comment.content=Y.value;Y.parentNode.removeChild(Y);da.parentNode.removeChild(da)}catch(ha){b.handleError(ha)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ha){function Z(k){if(null!=k){k.sort(function(J,N){return new Date(J.modifiedDate)-new Date(N.modifiedDate)});for(var v=0;v<k.length;v++)Z(k[v].replies)}}ha.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";ba=ha;for(ha=0;ha<ba.length;ha++)Z(ba[ha].replies),+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ha){function Z(k){if(null!=k){k.sort(function(J,O){return new Date(J.modifiedDate)-new Date(O.modifiedDate)});for(var v=0;v<k.length;v++)Z(k[v].replies)}}ha.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";ba=ha;for(ha=0;ha<ba.length;ha++)Z(ba[ha].replies),g(ba[ha],ba,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ha){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ha&&ha.message?": "+ha.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function Y(v){var J=ha[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)Y(v.replies[J])}if(this.window.isVisible()){for(var da=M.querySelectorAll(".geCommentDate"),ha={},Z=0;Z<da.length;Z++){var k=da[Z];ha[k.getAttribute("data-commentId")]=k}for(Z=0;Z<ba.length;Z++)Y(ba[Z])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),F,f,l,u,y,!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,l,u,y,q,B,H,S,E,Q){var c=document.createElement("div");c.style.textAlign="center";Q=null!=Q?Q:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=Q+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),+this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,C,H,S,E,Q){var c=document.createElement("div");c.style.textAlign="center";Q=null!=Q?Q:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=Q+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),g.appendChild(f),c.appendChild(g));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=H&&(q.innerHTML=H+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");-b.editor.cancelFirst&&E.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});E.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);c.appendChild(E);S?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop=+b.editor.cancelFirst&&E.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});E.appendChild(n);null!=C?(n.innerHTML=C+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);c.appendChild(E);S?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):E.style.marginTop="12px";this.init=function(){n.focus()};this.container=c},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,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,l){this.ui=b;this.page=f;this.previous=this.name=l}@@ -4067,19 +4066,19 @@ EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&nullEditorUi.prototype.createImageForPageLink=function(b,f,l,u){var y=b.indexOf(","),q=null;0<y&&(y=this.getPageById(b.substring(y+1)),null!=y&&y!=f&&(q=this.getImageForPage(y,f,l,u),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};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,l,u){l=null!=l?l:this.editor.graph;var y=l.getGlobalVariable;l=this.createTemporaryGraph(l.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);l.getGlobalVariable=function(H){return"pagenumber"==H?q+1:"page"==H&&null!=f?f.getName():y.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=-"";u=l.getSvg(null,null,null,null,null,null,null,null,null,null,u,null,null,null,!0,!0);var B=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(u)),B.width,B.height,B.x,B.y)};+"";u=l.getSvg(null,null,null,null,null,null,null,null,null,null,u,null,null,null,!0,!0);var C=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(u)),C.width,C.height,C.x,C.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(){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(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 l=b.sizeDidChange,u=null,y=this;b.sizeDidChange=-function(){var B=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&(u=y.currentPage,y.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);-this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,H){C=H.getProperty("edit").changes;for(H=0;H<C.length;H++)if(C[H]instanceof RenamePage||C[H]instanceof ChangePage||C[H]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==C.length&&C[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var l=b.sizeDidChange,u=null,y=this;b.sizeDidChange=+function(){var C=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&(u=y.currentPage,y.pageSelected());return C};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);+this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,H){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};EditorUi.prototype.scrollToPage=function(b,f){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),u=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(u!=this.lastScrollPage||f)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=u)};EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var u=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(u.setViewState(f),this.editor.updateGraphComponents(),u.view.revalidate(),u.sizeDidChange()),u.container.scrollLeft=u.view.translate.x*u.view.scale+f.scrollLeft,u.container.scrollTop=u.view.translate.y*u.view.scale+f.scrollTop,u.restoreSelection(l))};-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=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!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:B,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=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!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,u,y),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,f,l,u){l||(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);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),u=this.getBackgroundImageObject(b.backgroundImage,u),null!=u&&f.setAttribute("backgroundImage",-JSON.stringify(u)));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(y){return y.name+"^"+y.url}).join("|"))};+Graph.prototype.saveViewState=function(b,f,l,u,y){l||(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);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),u=this.getBackgroundImageObject(b.backgroundImage,+u,y),null!=u&&f.setAttribute("backgroundImage",JSON.stringify(u)));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(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;@@ -4092,20 +4091,20 @@ u=!0;for(y=0;y<l.length;y++)if(l[y].name==b){u=!1;break}u&&this.extFonts.push({nEditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var l=Editor.extractParserError(f);if(l)throw Error(l);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),l=new mxCodec(f.ownerDocument),b.root=l.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(l=Editor.extractParserError(f))throw Error(l);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 l=new mxCodec(b.node.ownerDocument),u=new mxGraphModel;l.decode(b.node,u);l=new mxCodec(f.ownerDocument);var y=new mxGraphModel;l.decode(f,y);this.selectPage(b.page);f=this.diffCells(u.root,y.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,l){try{if(b!=this.currentPage){var u=this.editor.graph;u.isEditing()&&u.stopEditing(!1);f=null!=f?f:!1;u.isMouseDown=!1;u.reset();var y=u.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,l);q.execute();y.add(q);y.notify();f||u.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(B){this.handleError(B)}};+EditorUi.prototype.selectPage=function(b,f,l){try{if(b!=this.currentPage){var u=this.editor.graph;u.isEditing()&&u.stopEditing(!1);f=null!=f?f:!1;u.isMouseDown=!1;u.reset();var y=u.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,l);q.execute();y.add(q);y.notify();f||u.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(C){this.handleError(C)}};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,l){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),l),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,l){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,l);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var u=this.currentPage;u==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,u=this.pages[l]):1>=this.pages.length&&(u=this.insertPage(),f.model.execute(new RenamePage(this,u,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,u))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};-EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},B=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,B),[l.root]);l.viewState=b==this.currentPage?u.getViewState():b.viewState;this.initDiagramNode(l);+EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},C=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,C),[l.root]);l.viewState=b==this.currentPage?u.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(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return l};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=[],l=[],u=0;u<b.length;u++)try{l.push(this.clonePage(b[u]))}catch(y){f.push(mxResources.get("pageWithNumber",[u+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(y){}throw b;}return l};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,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(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),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))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var l=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(y,q){q.className="geTab gePageTab";this.pages[y]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",-"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text","<diagram/>"),l=y):mxEvent.consume(B)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(B){l=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(B){null!=l&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(B){null!=l&&-y!=l&&this.movePage(l,y);B.stopPropagation();B.preventDefault()}));f.appendChild(q)})(u,this.createTabForPage(this.pages[u],u+1));u=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();+"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(C){b.isEnabled()?(mxClient.IS_FF&&C.dataTransfer.setData("Text","<diagram/>"),l=y):mxEvent.consume(C)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(C){l=null;C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(C){null!=l&&(C.dataTransfer.dropEffect="move");C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(C){null!=l&&+y!=l&&this.movePage(l,y);C.stopPropagation();C.preventDefault()}));f.appendChild(q)})(u,this.createTabForPage(this.pages[u],u+1));u=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=u;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(y){this.checkTabScrollerOverflow()}))}};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("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):this.rightScrollTab.classList.remove("mxDisabled")):(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};@@ -4115,59 +4114,59 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(nEditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,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.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var l=mxEvent.getClientX(b),u=mxEvent.getClientY(b);f.popup(l,u,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var l=this.createTab(),u=b.getName()||mxResources.get("untitled"),y=b.getId();l.setAttribute("title",u+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,u);l.appendChild(f);this.addTabListeners(b,l);return l};-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,B=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),H=mxUtils.bind(this,+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==u)||mxEvent.isPopupTrigger(S))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var E=new mxPopupMenu(this.createPageMenu(b));E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var Q=mxEvent.getClientX(S),c=mxEvent.getClientY(S);E.popup(Q,c,null,S);-this.setCurrentMenu(E,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,B,null,H);mxEvent.addGestureListeners(f,B,null,H)};+this.setCurrentMenu(E,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,C,null,H);mxEvent.addGestureListeners(f,C,null,H)};EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,u){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),u));this.editor.graph.isEnabled()&&(l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",-[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,B,H){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(u,q[E]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=-[];this.traverse(y,!0,mxUtils.bind(this,function(H,S){var E=null!=S&&this.isTreeEdge(S);E&&q.push(S);H==y||null!=S&&!E||q.push(H);return(null==S||E)&&(H==y||!this.model.isCollapsed(H))}));this.model.setCollapsed(y,u);for(var B=0;B<q.length;B++)this.model.setVisible(q[B],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,B,H,S){return this.model.filterCells(this.getEdges(u,y,q,B,H,S),mxUtils.bind(this,+[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,H){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(u,q[E]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=+[];this.traverse(y,!0,mxUtils.bind(this,function(H,S){var E=null!=S&&this.isTreeEdge(S);E&&q.push(S);H==y||null!=S&&!E||q.push(H);return(null==S||E)&&(H==y||!this.model.isCollapsed(H))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,H,S){return this.model.filterCells(this.getEdges(u,y,q,C,H,S),mxUtils.bind(this,function(E){return this.isTreeEdge(E)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!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 u(Z){return x.isVertex(Z)&&q(Z)}function y(Z){var k=!1;null!=Z&&(k="1"==-n.getCurrentCellStyle(Z).treeMoving);return k}function q(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),k="tree"==(null!=k?k.style:n.getCellStyle(Z)).containerType);return k}function B(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),n.view.getState(Z),k=null!=(null!=k?k.style:n.getCellStyle(Z)).childLayout);return k}function H(Z){Z=n.view.getState(Z);if(null!=Z){var k=n.getIncomingTreeEdges(Z.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=-k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==Z.y&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==Z.y+Z.height&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>Z.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Z,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=n.cloneCells([J[0],Z]);n.model.setTerminal(N[0],n.model.getTerminal(J[0],-!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?Z.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?Z.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=V.x,N[1].geometry.y-=V.y);var U=n.view.getState(Z),X=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-N[1].geometry.width-10)*X:fa.y+=-(k?Z.geometry.height+10:-N[1].geometry.height-10)*X;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/-X),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/X))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ja=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ja.push(Ba);(null==Ba||Ga)&&Ja.push(Aa);return null==Ba||Ga});n.moveCells(Ja,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(N,-v)}finally{n.model.endUpdate()}}function E(Z){n.model.beginUpdate();try{var k=H(Z),v=n.getIncomingTreeEdges(Z),J=n.cloneCells([v[0],Z]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],Z,!1);var N=n.model.getParent(Z),T=N.geometry,V=[];n.view.currentRoot!=N&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(Z,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&V.push(na);(null==na||la)&&V.push(fa);return null==na||la});var U=Z.geometry.width+40,-X=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,X=-X):k==mxConstants.DIRECTION_WEST?(U=-U,X=0):k==mxConstants.DIRECTION_EAST&&(X=0);n.moveCells(V,U,X);return n.addCells(J,N)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==-n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var X=n.model.getTerminal(J[U],!1);null!=X&&k.push(X)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height--V.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-V.x+10,T[1].geometry.y-=T[1].geometry.height+V.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+V.x+40):T[1].geometry.x+(T[1].geometry.width-V.x+40),T[1].geometry.y=null==fa?Z.geometry.y+(Z.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-V.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}-function c(Z,k,v){Z=n.getOutgoingTreeEdges(Z);v=n.view.getState(v);var J=[];if(null!=v&&null!=Z){for(var N=0;N<Z.length;N++){var T=n.view.getState(n.model.getTerminal(Z[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(V,U){return k?V.x+V.width-U.x-U.width:V.y+V.height-U.y-U.height})}return J}function g(Z,k){var v=H(Z),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||+n.getCurrentCellStyle(Z).treeMoving);return k}function q(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),k="tree"==(null!=k?k.style:n.getCellStyle(Z)).containerType);return k}function C(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),n.view.getState(Z),k=null!=(null!=k?k.style:n.getCellStyle(Z)).childLayout);return k}function H(Z){Z=n.view.getState(Z);if(null!=Z){var k=n.getIncomingTreeEdges(Z.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=+k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==Z.y&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==Z.y+Z.height&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>Z.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Z,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),O=n.cloneCells([J[0],Z]);n.model.setTerminal(O[0],n.model.getTerminal(J[0],+!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?O[1].geometry.x+=k?Z.geometry.width+10:-O[1].geometry.width-10:O[1].geometry.y+=k?Z.geometry.height+10:-O[1].geometry.height-10;n.view.currentRoot!=v&&(O[1].geometry.x-=V.x,O[1].geometry.y-=V.y);var U=n.view.getState(Z),X=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-O[1].geometry.width-10)*X:fa.y+=+(k?Z.geometry.height+10:-O[1].geometry.height-10)*X;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/+X),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/X))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(O,+v)}finally{n.model.endUpdate()}}function E(Z){n.model.beginUpdate();try{var k=H(Z),v=n.getIncomingTreeEdges(Z),J=n.cloneCells([v[0],Z]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],Z,!1);var O=n.model.getParent(Z),T=O.geometry,V=[];n.view.currentRoot!=O&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(Z,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&V.push(na);(null==na||la)&&V.push(fa);return null==na||la});var U=Z.geometry.width+40,+X=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,X=-X):k==mxConstants.DIRECTION_WEST?(U=-U,X=0):k==mxConstants.DIRECTION_EAST&&(X=0);n.moveCells(V,U,X);return n.addCells(J,O)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),O=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],O=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==+n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],O));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var X=n.model.getTerminal(J[U],!1);null!=X&&k.push(X)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;O==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height-+V.y+40):O==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-V.x+10,T[1].geometry.y-=T[1].geometry.height+V.y+40):(T[1].geometry.x=O==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+V.x+40):T[1].geometry.x+(T[1].geometry.width-V.x+40),T[1].geometry.y=null==fa?Z.geometry.y+(Z.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-V.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}+function c(Z,k,v){Z=n.getOutgoingTreeEdges(Z);v=n.view.getState(v);var J=[];if(null!=v&&null!=Z){for(var O=0;O<Z.length;O++){var T=n.view.getState(n.model.getTerminal(Z[O],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(V,U){return k?V.x+V.width-U.x-U.width:V.y+V.height-U.y-U.height})}return J}function g(Z,k){var v=H(Z),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)==J&&v!=k?m.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(Z),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(Z),null!=v&&0<v.length&&(J=c(n.model.getTerminal(v[0],!0),J,Z),Z=n.view.getState(Z),null!=Z&&(Z=mxUtils.indexOf(J,Z),0<=Z&&(Z+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=Z&&Z<=J.length-1&&n.setSelectionCell(J[Z].cell)))))}var m=this,n=m.editor.graph,x=n.getModel(),F=m.menus.createPopupMenu;m.menus.createPopupMenu=function(Z,k,v){F.apply(this,arguments);if(1==n.getSelectionCount()){k=n.getSelectionCell();var J=n.getOutgoingTreeEdges(k);Z.addSeparator();0<J.length&&(u(n.getSelectionCell())&&this.addMenuItems(Z,["selectChildren"],null,v),this.addMenuItems(Z,["selectDescendants"],null,v));u(n.getSelectionCell())?(Z.addSeparator(),0<n.getIncomingTreeEdges(k).length&&this.addMenuItems(Z,["selectSiblings","selectParent"],null,v)):0<n.model.getEdgeCount(k)&&this.addMenuItems(Z,["selectConnections"],null,v)}};m.actions.addAction("selectChildren",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();Z=mxEvent.isControlDown(Z)?null:n.getOutgoingTreeEdges(k);if(null!=Z&&0<Z.length){k=[];for(var v=0;v<Z.length;v++)k.push(n.model.getTerminal(Z[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");m.actions.addAction("selectDescendants",function(Z){var k=n.getSelectionCell();-if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(Z)||n.traverse(k,!0,function(J,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(Z)&&v.push(N);(null==N||T)&&v.push(J);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(Z){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(Z=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k),+if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(Z)||n.traverse(k,!0,function(J,O){var T=null!=O&&n.isTreeEdge(O);T&&mxEvent.isControlDown(Z)&&v.push(O);(null==O||T)&&v.push(J);return null==O||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(Z){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(Z=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k),null!=Z&&0<Z.length?n.setSelectionCell(n.model.getTerminal(Z[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");m.actions.addAction("selectSiblings",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k);Z=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var J=0;J<v.length;J++)Z.push(n.model.getTerminal(v[J],!1));0==Z.length&&(Z=n.model.getChildren(n.model.getParent(k)));-n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var N=Z[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(V,U){var X=null!=U&&n.isTreeEdge(U);X&&T.push(U);(null==U||X)&&T.push(V);return null==U||X});0<T.length&&(v=v.concat(T),-N=n.getIncomingTreeEdges(Z[J]),Z=Z.concat(N))}else null!=N&&v.push(Z[J])}Z=v;return I.apply(this,arguments)};m.hoverIcons.getStateAt=function(Z,k,v){return u(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(Z,k){Z=null!=Z?Z:this.getSelectionCells();for(var v=Z.slice(0),J=0;J<v.length;J++){var N=n.view.getState(v[J]);if(null!=N&&u(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],Z)}}this.model.beginUpdate();-try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var X=this.cloneCell(T[0]);this.addEdge(X,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,N,T,V){for(var U=null,X=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!B(Z[fa])&&this.isCellCollapsed(Z[fa])?X=X.concat(this.getSubtree(Z[fa])):-X.push(Z[fa]);Z=mxUtils.removeDuplicates(X);this.model.beginUpdate();try{X=N;var na=this.getCurrentCellStyle(N);if(null!=Z&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){N=n.model.getParent(Z[fa]);break}if(null!=X&&N!=X&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(X);+n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var O=Z[J];x.isEdge(O)&&q(O)&&(v.push(O),O=x.getTerminal(O,!1));if(u(O)){var T=[];n.traverse(O,!0,function(V,U){var X=null!=U&&n.isTreeEdge(U);X&&T.push(U);(null==U||X)&&T.push(V);return null==U||X});0<T.length&&(v=v.concat(T),+O=n.getIncomingTreeEdges(Z[J]),Z=Z.concat(O))}else null!=O&&v.push(Z[J])}Z=v;return I.apply(this,arguments)};m.hoverIcons.getStateAt=function(Z,k,v){return u(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(Z,k){Z=null!=Z?Z:this.getSelectionCells();for(var v=Z.slice(0),J=0;J<v.length;J++){var O=n.view.getState(v[J]);if(null!=O&&u(O.cell)){var T=n.getIncomingTreeEdges(O.cell);for(O=0;O<T.length;O++)mxUtils.remove(T[O],Z)}}this.model.beginUpdate();+try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var X=this.cloneCell(T[0]);this.addEdge(X,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,O,T,V){for(var U=null,X=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!C(Z[fa])&&this.isCellCollapsed(Z[fa])?X=X.concat(this.getSubtree(Z[fa])):+X.push(Z[fa]);Z=mxUtils.removeDuplicates(X);this.model.beginUpdate();try{X=O;var na=this.getCurrentCellStyle(O);if(null!=Z&&u(O)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){O=n.model.getParent(Z[fa]);break}if(null!=X&&O!=X&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(X);null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=Z&&U.length==Z.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(X)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],X,!0);else if(u(Z[fa])&&(la=n.getIncomingTreeEdges(Z[fa]),0<la.length))if(!J)u(X)&&0>mxUtils.indexOf(Z,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],X,!0);else if(0==-n.getIncomingTreeEdges(U[fa]).length){na=X;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(N.isEdge(T[V])&&null==N.getTerminal(T[V],!0)){N.setTerminal(T[V],Z,!0);var U=-n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ja={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?+n.getIncomingTreeEdges(U[fa]).length){na=X;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var O=n.model,T=null;O.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(O.isEdge(T[V])&&null==O.getTerminal(T[V],!0)){O.setTerminal(T[V],Z,!0);var U=+n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{O.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ja={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?aa[Z.keyCode]:mxEvent.isAltDown(Z)?ja[Z.keyCode]:null;null!=v?(v.funct(Z),mxEvent.consume(Z)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==Z.which?v=mxEvent.isShiftDown(Z)?E(k):Q(k):13==Z.which&&(v=S(k,!mxEvent.isShiftDown(Z)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(Z)):37==Z.keyCode?(g(k,mxConstants.DIRECTION_WEST),-mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||ca.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,N,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var X=H(Z),fa=X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||-k==mxConstants.DIRECTION_WEST;return X==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||B(Z)||n.traverse(Z,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,-arguments);(y(this.state.cell)||u(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),+mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||ca.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,O,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var X=H(Z),fa=X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||+k==mxConstants.DIRECTION_WEST;return X==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||C(Z)||n.traverse(Z,!0,function(v,J){var O=null!=J&&n.isTreeEdge(J);O&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||O)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||O});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,+arguments);(y(this.state.cell)||u(this.state.cell))&&!C(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(Z){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(Z)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var Y=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){Y.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 da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Z){da.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=Z?"":"none")};var ha=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Z,k){ha.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 u=l.apply(this,arguments),y=this.graph,q=this;return u.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);B.insert(E);B.insert(H);B.insert(S);return q.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};');+function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);C.insert(E);C.insert(H);C.insert(S);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);var Q=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};');Q.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),E.style);c.geometry.relative=!0;c.edge=!0;H.insertEdge(c,!0);Q.insertEdge(c,!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 m=new mxCell("",new mxGeometry(0,0,0,0),E.style);m.geometry.relative=!0;m.edge=!0;H.insertEdge(m,!0);g.insertEdge(m,!1);var n=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};');-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;H.insertEdge(x,!0);n.insertEdge(x,!1);B.insert(E);B.insert(c);B.insert(m);B.insert(x);B.insert(H);B.insert(S);B.insert(Q);B.insert(g);B.insert(n);return q.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 q.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 q.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 q.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,+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;H.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(E);C.insert(c);C.insert(m);C.insert(x);C.insert(H);C.insert(S);C.insert(Q);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=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;');+C.vertex=!0;return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=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};');+C.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;C.insertEdge(H,!1);return q.createVertexTemplateFromCells([C,H],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=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};');C.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;C.insertEdge(H,!1);return q.createVertexTemplateFromCells([C,H],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.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"};');y.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 E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);var Q=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"};');Q.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.relative=-!0;c.edge=!0;H.insertEdge(c,!0);Q.insertEdge(c,!1);B.insert(E);B.insert(c);B.insert(H);B.insert(S);B.insert(Q);return q.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"};');y.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return q.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 q.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 E=new mxCell("",new mxGeometry(0,0,0,0),H.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;S.insertEdge(E,!1);return q.createVertexTemplateFromCells([H,E,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+!0;c.edge=!0;H.insertEdge(c,!0);Q.insertEdge(c,!1);C.insert(E);C.insert(c);C.insert(H);C.insert(S);C.insert(Q);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=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"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],+C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=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"};');C.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;C.insertEdge(H,!1);return q.createVertexTemplateFromCells([C,H],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.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;C.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 E=new mxCell("",new mxGeometry(0,0,0,0),H.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;S.insertEdge(E,!1);return q.createVertexTemplateFromCells([H,E,C,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;EditorUi.initMinimalTheme=function(){function b(E,Q){if(EditorUi.windowed){var c=E.editor.graph;c.popupMenuHandler.hideMenu();null==E.formatWindow?(E.formatWindow=new WrapperWindow(E,"",Math.max(10,E.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";E.createFormat(g).init()}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.formatWindow.window.setTitle(mxResources.get("format"))})),E.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){E.formatWindow.window.fit()})),E.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):E.formatWindow.window.setVisible(null!=Q?Q:!E.formatWindow.window.isVisible())}else null==E.formatElt&&(E.formatElt=E.createSidebarContainer(),E.createFormat(E.formatElt).init(),E.formatElt.style.border="none",E.formatElt.style.width="240px",E.formatElt.style.borderLeftWidth="1px",E.formatElt.style.borderLeftStyle="solid",E.formatElt.style.right="0px"),Q=E.diagramContainer.parentNode,null!=E.formatElt.parentNode?(E.formatElt.parentNode.removeChild(E.formatElt),Q.style.right="0px"):(Q.parentNode.appendChild(E.formatElt),Q.style.right=E.formatElt.style.width)}function f(E,Q){if(EditorUi.windowed){var c=E.editor.graph;c.popupMenuHandler.hideMenu();null==E.sidebarWindow?(E.sidebarWindow=new WrapperWindow(E,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(g){E.createShapesPanel(g)}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),@@ -4176,23 +4175,23 @@ E.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){E.sdocument.body.clientWidth}catch(E){}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;EditorUi.prototype.closableScratchpad=!1;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.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var y=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(E,Q){null!=Q.shortcut&&900>l&&!mxClient.IS_IOS?E.firstChild.nextSibling.setAttribute("title",Q.shortcut):y.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=-function(E){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=E?E:!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 q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(E){B.apply(this,+function(E){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=E?E:!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 q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var C=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(E){C.apply(this,arguments);if(E){var Q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=Q&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=Q&&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(){};EditorUi.prototype.installFormatToolbar=function(E){var Q=this.editor.graph,c=document.createElement("div");c.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%;";Q.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<Q.getSelectionCount()?(E.appendChild(c),c.innerHTML="Selected: "+Q.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var E=this.formatWindow.window.toggleMinimized,Q=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(Q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+Q-140+"px"):(this.div.style.width=Q+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-Q+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(J,N,T){var V=n.menus.get(J);N=I.addMenu(mxResources.get(J),mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(J));n.menus.menuCreated(V,N,"geButton");null!=T&&-(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function Q(J,N,T,V,U,X){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=X?fa.style.backgroundImage="url("+X+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",-"disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&N.appendChild(J[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>l,N=E("diagram",null,J?Editor.menuImage:null);c([N,Q(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),-n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=E("insert",!0,J?ja:null);c([N,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")++mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(J,O,T){var V=n.menus.get(J);O=I.addMenu(mxResources.get(J),mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));O.className="geButton";O.setAttribute("title",mxResources.get(J));n.menus.menuCreated(V,O,"geButton");null!=T&&+(O.style.backgroundImage="url("+T+")",O.innerText="");return O}function Q(J,O,T,V,U,X){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=X?fa.style.backgroundImage="url("+X+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&O(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",+"disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,O,T){O=document.createElement("div");O.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&O.appendChild(J[T]);F.appendChild(O);return O}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>l,O=E("diagram",null,J?Editor.menuImage:null);c([O,Q(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),+n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);O=E("insert",!0,J?ja:null);c([O,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||O.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")+" ("+da.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ha.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([Z,k]),520<=l&&c([v,640<=l?Q("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?Q("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||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<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var I=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var N=-J.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",J.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),aa=n.updateTabContainer;+EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var I=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var O=+J.getMode();"google"==O?O="googleDrive":"github"==O?O="gitHub":"gitlab"==O?O="gitLab":"onedrive"==O&&(O="oneDrive");O=mxResources.get(O);F.setAttribute("title",J.getTitle()+(null!=O?" ("+O+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),aa=n.updateTabContainer;n.updateTabContainer=function(){aa.apply(this,arguments);n.tabContainer.appendChild(K)};var ja=Editor.addBoxImage;if(null!=n.hoverIcons){var ca=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());var oa=n.actions.get("zoomIn"),Y=n.actions.get("zoomOut");m=n.actions.get("resetView");var da=n.actions.get("undo"),ha=n.actions.get("redo"),Z=Q("",da.funct,null,"",da,Editor.undoImage),k=Q("",ha.funct,null,"",ha,Editor.redoImage),v=Q("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.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)}})();DrawioComment=function(b,f,l,u,y,q,B){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\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\nfindInDiagram=Find in Diagram\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\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\nshadows=Shadows\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\ntypeSlashToSearch=Type / to search\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\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\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\ncopyAsSvg=Copy as SVG\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.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpSpaces=Remember imported spaces\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;+(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)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\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\nfindInDiagram=Find in Diagram\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\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\nshadows=Shadows\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\ntypeSlashToSearch=Type / to search\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\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\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\ncopyAsSvg=Copy as SVG\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.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpSpaces=Remember imported spaces\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,f,l){this.init(b,f,l)};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,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};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=@@ -4209,7 +4208,7 @@ S);S();urlParams.page=u.currentPage;S=null;this.graph.getModel().beginUpdate();t(this.graph.panningHandler.isForcePanningEvent=function(x){return!mxEvent.isPopupTrigger(x.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.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var I=x.indexOf(",");u.selectPageById(x.substring(I+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=this.getGraphBounds();this.handleCustomLink(x,F);M.equals(this.getGraphBounds())||u.crop()}}catch(L){alert(L.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof l){var q=-this.getObservableParent(b),B=new l(mxUtils.bind(this,function(H){0<b.offsetWidth&&(B.disconnect(),y())}));B.observe(q,{attributes:!0})}else y()}};+this.getObservableParent(b),C=new l(mxUtils.bind(this,function(H){0<b.offsetWidth&&(C.disconnect(),y())}));C.observe(q,{attributes:!0})}else y()}};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 f=b.background,l=mxUtils.bind(this,function(u){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,u&&b.view.validateBackground())});this.addListener("graphChanged",function(){f=b.background;l(!0)});this.addListener("darkModeChanged",function(){l(!0)});l(!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,f=this.isDarkMode();f?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=f?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};@@ -4226,17 +4225,17 @@ this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWi(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},y=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",u),this.graph.addListener("size",u)):new ResizeSensor(this.graph.container,u));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,f.width+2*this.graph.border),0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;u=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",u):new ResizeSensor(this.graph.container,u))}else 9>=document.documentMode||this.graph.addListener("size",-u);var B=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var E=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||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>E)?(H=null,null!=E&&f.height+2*this.graph.border>E-2&&(H=(E-2*this.graph.border-2)/f.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-f.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+H.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){f=this.graph.getGraphBounds();y=null;B(H)}};+u);var C=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var E=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||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>E)?(H=null,null!=E&&f.height+2*this.graph.border>E-2&&(H=(E-2*this.graph.border-2)/f.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-f.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+H.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(H){f=this.graph.getGraphBounds();y=null;C(H)}};GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),l=b.border,u=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/u+l):l,null!=f.y?Math.floor(b.view.translate.y-f.y/u+l):l)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};-GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var H=0;H<u.length;H++){var S=b.getCell(u[H]);null!=S&&(f=!0,q[S.id]=!0)}else for(H=0;H<l.length;H++)S=b.getChildAt(b.root,parseInt(l[H])),null!=S&&(f=!0,q[S.id]=!0);for(H=0;f&&-H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,q[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),f.isVisible(f.getChildAt(f.root,H)))}finally{b.endUpdate()}q=!0}return q};+GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var H=0;H<u.length;H++){var S=b.getCell(u[H]);null!=S&&(f=!0,q[S.id]=!0)}else for(H=0;H<l.length;H++)S=b.getChildAt(b.root,parseInt(l[H])),null!=S&&(f=!0,q[S.id]=!0);for(H=0;f&&+H<C;H++)S=b.getChildAt(b.root,H),b.setVisible(S,q[S.id]||!1)}else for(H=0;H<C;H++)b.setVisible(b.getChildAt(b.root,H),f.isVisible(f.getChildAt(f.root,H)))}finally{b.endUpdate()}q=!0}return q};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 f=b.ownerDocument.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var l=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",l);this.toolbar=f;l();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");-mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),B=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=-"";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(B(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){B(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){B(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",-mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ba,oa){},mouseUp:function(ba,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<-S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,Y,da){ba=this.createToolbarButton(ba,oa,Y,da);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";+mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),C=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=+"";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(C(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){C(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){C(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",+mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||C(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ba,oa){},mouseUp:function(ba,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<+S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,Y,da){ba=this.createToolbarButton(ba,oa,Y,da);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";I=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",I);I()}else if("zoom"==I)this.zoomEnabled&&(Q(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),Q(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),Q(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"==I){if(this.layersEnabled){var K=Q(mxUtils.bind(this,function(ba){if(null!=g)g.parentNode.removeChild(g),@@ -4262,8 +4261,8 @@ this.graphConfig.highlight&&(l.highlight=this.graphConfig.highlight.substring(1)GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("src",Editor.closeBlackImage);l.style.position="fixed";l.style.top="32px";l.style.right="32px";l.style.cursor="pointer";l.className="geAdaptiveAsset";var u=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",u);q.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 y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(m){}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(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var B=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),H=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(f),-document.body.removeChild(l),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var E=q.editor.graph,Q=E.container;Q.style.overflow="hidden";Q.style.inset="0";this.lightboxChrome&&null==b?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(f.style.display="none",l.style.display="none");var c=this;E.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),H=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),+document.body.removeChild(l),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var E=q.editor.graph,Q=E.container;Q.style.overflow="hidden";Q.style.inset="0";this.lightboxChrome&&null==b?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;E.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(n){return c.getImageUrl(n)};return m};this.graphConfig.move&&(E.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(E,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),Q.style.outline="none",Q.style.zIndex=this.lightboxZIndex,l.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(Q)):(document.body.appendChild(Q),document.body.appendChild(l)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(E,this.graph),q.lightboxFit(),q.chromelessResize()}catch(m){q.handleError(m,null,function(){q.destroy()})}}),0);return q};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))};@@ -4280,9 +4279,9 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\"\t z-index: "+(GraphViewer.prototype.lightboxZIndex+2)+";","}\n.geBackground {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t position: fixed;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n opacity: 0.9;","\t z-index: "+(GraphViewer.prototype.lightboxZIndex+1)+";","}\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.geHelpIcon {\n width: 16px;\n margin: 0 4px;\n vertical-align: text-bottom;\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,f,l){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var u=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;u.open("GET",b);u.onload=function(){f(null!=u.getText?u.getText():u.responseText)};u.onerror=l;u.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function B(m,n){if(!m.resizedAttached)m.resizedAttached=+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function C(m,n){if(!m.resizedAttached)m.resizedAttached=new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.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>';m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],I=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var aa,ja,ca,ba;n=function(){if((ca=m.offsetWidth)!=aa||(ba=m.offsetHeight)!=ja)L=!0,aa=ca,ja=ba;M()};var oa=function(Y,da,ha){Y.attachEvent?Y.attachEvent("on"+da,ha):Y.addEventListener(da,ha)};oa(x,"scroll",n);oa(I,"scroll",n)}var H=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,E=!1;(new ResizeObserver(function(){E||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){E=!0;H();S=null;E=!1},200))})).observe(l)}else{var Q=Object.prototype.toString.call(l),c="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===-Q||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){Q=0;for(var g=l.length;Q<g;Q++)B(l[Q],H)}else B(l,H);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();+Q||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){Q=0;for(var g=l.length;Q<g;Q++)C(l[Q],H)}else C(l,H);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();diff --git a/src/main/webapp/plugins/googledrive.js b/src/main/webapp/plugins/googledrive.jsdeleted file mode 100644index 585b4ba30..000000000--- a/src/main/webapp/plugins/googledrive.js+++ /dev/null@@ -1,17 +0,0 @@-/**- * Google Drive plugin limits supported storage to Google Drive, browser and device.- */-Draw.loadPlugin(function(ui)-{- ui.oneDrive = null;- ui.dropbox = null;- ui.gitLab = null;- ui.gitHub = null;- ui.trello = null;-- window.OneDriveClient = null;- window.DropboxClient = null;- window.TrelloClient = null;-- isLocalStorage = false;-});diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.jsindex 37a816b23..770b9cd1a 100644--- a/src/main/webapp/service-worker.js+++ b/src/main/webapp/service-worker.js@@ -1,2 +1,2 @@-if(!self.define){let e,r={};const i=(i,c)=>(i=new URL(i+".js",c).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(c,a)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(r[s])return;let d={};const o=e=>i(e,s),f={module:{uri:s},exports:d,require:o};r[s]=Promise.all(c.map((e=>f[e]||o(e)))).then((e=>(a(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0b2d9cb0ec4407c38508304c026e8515"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"196736fc1ea51bec09a27310e72e0ecf"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{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:"ce61a0e62031a160e057809fefe64aa2"},{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:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"d381db23d3c925eb81854c07b46776a5"},{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:"fdb5a8e9f7cd3114a9f695348b93d207"},{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:"5b9f2e79efc7cadba0c06301edbeeff1"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{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:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"resources/dia_am.txt",revision:"d1c7dc6960d3ee0e570972f9a4831dce"},{url:"resources/dia_ar.txt",revision:"8e8baa9cd98d14b066b3ebde945de434"},{url:"resources/dia_bg.txt",revision:"4813b21d53b4eb86d4d7152a022e4987"},{url:"resources/dia_bn.txt",revision:"2ba94930fcf28d3c7af9e2d50bdf45ca"},{url:"resources/dia_bs.txt",revision:"4f505ac791c142e885f807340f3539c1"},{url:"resources/dia_ca.txt",revision:"abadaf8f57129119a9b0833a4ac166da"},{url:"resources/dia_cs.txt",revision:"83f743c98afc171314b5e16c6f3ef368"},{url:"resources/dia_da.txt",revision:"2c92a85d1576af84ed15afe26b98a650"},{url:"resources/dia_de.txt",revision:"7b462b7e90c90e5b0e1a6dc6723cc0cf"},{url:"resources/dia_el.txt",revision:"b5cb7a7616245606794dd5f69ae97a13"},{url:"resources/dia_eo.txt",revision:"371f578db5447fe728e949800eda49d8"},{url:"resources/dia_es.txt",revision:"d21bb809dbaf5397ed31d85965aaf505"},{url:"resources/dia_et.txt",revision:"390f0888f2828741b78c32fa4206afa8"},{url:"resources/dia_eu.txt",revision:"cbace079f39a38d83749f46b0fc0cdf6"},{url:"resources/dia_fa.txt",revision:"e7167f8e7865b19f60c5ce64c16db277"},{url:"resources/dia_fi.txt",revision:"39a562a8fb10bc4a09145d95890e5474"},{url:"resources/dia_fil.txt",revision:"10cb4f70878dfbb4bd69dba5f406832b"},{url:"resources/dia_fr.txt",revision:"a0a7368861f497a6d22a0e6cfe57bf27"},{url:"resources/dia_gl.txt",revision:"aa7776a1c431b38ddcac5c3c253996bb"},{url:"resources/dia_gu.txt",revision:"27fc2cb44e28f7b51243cfa00328cc25"},{url:"resources/dia_he.txt",revision:"aa94c2ef35ad647d149a094f4c90e15f"},{url:"resources/dia_hi.txt",revision:"2f6ff90a88604757bbcd2977eb8d696b"},{url:"resources/dia_hr.txt",revision:"a710b7d0aa892f77947b3bb4bc06e4e6"},{url:"resources/dia_hu.txt",revision:"024e4ec4ec8222231bc538d3290a6f20"},{url:"resources/dia_id.txt",revision:"7665ebfc3c4c61cc7e79997c572d8bcf"},{url:"resources/dia_it.txt",revision:"743786b04ae77cbf2f08fe869269380f"},{url:"resources/dia_ja.txt",revision:"eac626f063fd37a528073264c5e61dda"},{url:"resources/dia_kn.txt",revision:"03a6e014add05e662186bd8bf0c20dbf"},{url:"resources/dia_ko.txt",revision:"e16d7b493694fe84c981b9ee8fa4392d"},{url:"resources/dia_lt.txt",revision:"3422fb9cbc6298c1eb97cc0a6131e91c"},{url:"resources/dia_lv.txt",revision:"ca86969ccc58ce90c1f1dd4cb3f05e87"},{url:"resources/dia_ml.txt",revision:"ef982b87b5ce46656d9396ffda1575dd"},{url:"resources/dia_mr.txt",revision:"c49ba8057420489056ebb3c32249413e"},{url:"resources/dia_ms.txt",revision:"13dd3b09bbf872f76d401ab6dd823adb"},{url:"resources/dia_my.txt",revision:"8e519f7b900580cd26be6c0bc0ac4a94"},{url:"resources/dia_nl.txt",revision:"83873498df6b6ad511a2dba791ca4ba6"},{url:"resources/dia_no.txt",revision:"54fd906bbf22f0f7353ce806585bbb8e"},{url:"resources/dia_pl.txt",revision:"8c57b33454faa8c0a5456cabab308a03"},{url:"resources/dia_pt-br.txt",revision:"ea2af35d61a3a6ab681bb9544b815f20"},{url:"resources/dia_pt.txt",revision:"1978cabf61e304fb2d0b4c38fc4c0569"},{url:"resources/dia_ro.txt",revision:"ed1c317273f10219b909a95840860738"},{url:"resources/dia_ru.txt",revision:"49be2fa633be9926ebfe79de1cad414f"},{url:"resources/dia_si.txt",revision:"cf39bc4937bef7efe6153b5cfe6fc768"},{url:"resources/dia_sk.txt",revision:"c6f2dca6b2443a1b83b858d8d42fc8db"},{url:"resources/dia_sl.txt",revision:"aa42dc13cdfb617bd96c0bcaf1332f16"},{url:"resources/dia_sr.txt",revision:"59f4b2d3f99384c13c6a97c5cc6e2706"},{url:"resources/dia_sv.txt",revision:"984ad366b5fa667a2ab48119664f412c"},{url:"resources/dia_sw.txt",revision:"d59fe86d4658b28ecb077adb7b12b408"},{url:"resources/dia_ta.txt",revision:"9bd79233aa196442c80d472a2e38f7ed"},{url:"resources/dia_te.txt",revision:"2a025ce93ebca16ed0167fed9057c0d1"},{url:"resources/dia_th.txt",revision:"0432948b18130a42c1ffe92519de0af4"},{url:"resources/dia_tr.txt",revision:"b8dc99de103d62fa445b6ebb7f8d901d"},{url:"resources/dia_uk.txt",revision:"228bc68b91c63d479bd6f96d120033b1"},{url:"resources/dia_vi.txt",revision:"c4ec475c2da9167d3ac99062f69aca73"},{url:"resources/dia_zh-tw.txt",revision:"3e64174c2905d312042bad4f7451aa8a"},{url:"resources/dia_zh.txt",revision:"864acd3d195fed0ad3939e436834d61c"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{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/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/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/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,r={};const i=(i,c)=>(i=new URL(i+".js",c).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(c,a)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(r[s])return;let d={};const o=e=>i(e,s),f={module:{uri:s},exports:d,require:o};r[s]=Promise.all(c.map((e=>f[e]||o(e)))).then((e=>(a(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"0a43db0d17562d385729f1d38073dccd"},{url:"js/extensions.min.js",revision:"49546b5dc442ef2391394f4def07462c"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"23cbac10c03279392888893b3f694007"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"c0f6b9be1801ba990471a576aef71dff"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{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:"ce61a0e62031a160e057809fefe64aa2"},{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:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"25c061e619a1bdbce765821594f0f79d"},{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:"fdb5a8e9f7cd3114a9f695348b93d207"},{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:"5b9f2e79efc7cadba0c06301edbeeff1"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{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:"5d2c5f8a8ca5ee05a0a6d1df90a1468d"},{url:"resources/dia_am.txt",revision:"d1c7dc6960d3ee0e570972f9a4831dce"},{url:"resources/dia_ar.txt",revision:"8e8baa9cd98d14b066b3ebde945de434"},{url:"resources/dia_bg.txt",revision:"4813b21d53b4eb86d4d7152a022e4987"},{url:"resources/dia_bn.txt",revision:"2ba94930fcf28d3c7af9e2d50bdf45ca"},{url:"resources/dia_bs.txt",revision:"4f505ac791c142e885f807340f3539c1"},{url:"resources/dia_ca.txt",revision:"abadaf8f57129119a9b0833a4ac166da"},{url:"resources/dia_cs.txt",revision:"83f743c98afc171314b5e16c6f3ef368"},{url:"resources/dia_da.txt",revision:"2c92a85d1576af84ed15afe26b98a650"},{url:"resources/dia_de.txt",revision:"7b462b7e90c90e5b0e1a6dc6723cc0cf"},{url:"resources/dia_el.txt",revision:"b5cb7a7616245606794dd5f69ae97a13"},{url:"resources/dia_eo.txt",revision:"371f578db5447fe728e949800eda49d8"},{url:"resources/dia_es.txt",revision:"d21bb809dbaf5397ed31d85965aaf505"},{url:"resources/dia_et.txt",revision:"390f0888f2828741b78c32fa4206afa8"},{url:"resources/dia_eu.txt",revision:"cbace079f39a38d83749f46b0fc0cdf6"},{url:"resources/dia_fa.txt",revision:"e7167f8e7865b19f60c5ce64c16db277"},{url:"resources/dia_fi.txt",revision:"39a562a8fb10bc4a09145d95890e5474"},{url:"resources/dia_fil.txt",revision:"10cb4f70878dfbb4bd69dba5f406832b"},{url:"resources/dia_fr.txt",revision:"a0a7368861f497a6d22a0e6cfe57bf27"},{url:"resources/dia_gl.txt",revision:"aa7776a1c431b38ddcac5c3c253996bb"},{url:"resources/dia_gu.txt",revision:"27fc2cb44e28f7b51243cfa00328cc25"},{url:"resources/dia_he.txt",revision:"aa94c2ef35ad647d149a094f4c90e15f"},{url:"resources/dia_hi.txt",revision:"2f6ff90a88604757bbcd2977eb8d696b"},{url:"resources/dia_hr.txt",revision:"a710b7d0aa892f77947b3bb4bc06e4e6"},{url:"resources/dia_hu.txt",revision:"024e4ec4ec8222231bc538d3290a6f20"},{url:"resources/dia_id.txt",revision:"7665ebfc3c4c61cc7e79997c572d8bcf"},{url:"resources/dia_it.txt",revision:"743786b04ae77cbf2f08fe869269380f"},{url:"resources/dia_ja.txt",revision:"eac626f063fd37a528073264c5e61dda"},{url:"resources/dia_kn.txt",revision:"03a6e014add05e662186bd8bf0c20dbf"},{url:"resources/dia_ko.txt",revision:"e16d7b493694fe84c981b9ee8fa4392d"},{url:"resources/dia_lt.txt",revision:"3422fb9cbc6298c1eb97cc0a6131e91c"},{url:"resources/dia_lv.txt",revision:"ca86969ccc58ce90c1f1dd4cb3f05e87"},{url:"resources/dia_ml.txt",revision:"ef982b87b5ce46656d9396ffda1575dd"},{url:"resources/dia_mr.txt",revision:"c49ba8057420489056ebb3c32249413e"},{url:"resources/dia_ms.txt",revision:"13dd3b09bbf872f76d401ab6dd823adb"},{url:"resources/dia_my.txt",revision:"8e519f7b900580cd26be6c0bc0ac4a94"},{url:"resources/dia_nl.txt",revision:"83873498df6b6ad511a2dba791ca4ba6"},{url:"resources/dia_no.txt",revision:"54fd906bbf22f0f7353ce806585bbb8e"},{url:"resources/dia_pl.txt",revision:"8c57b33454faa8c0a5456cabab308a03"},{url:"resources/dia_pt-br.txt",revision:"ea2af35d61a3a6ab681bb9544b815f20"},{url:"resources/dia_pt.txt",revision:"1978cabf61e304fb2d0b4c38fc4c0569"},{url:"resources/dia_ro.txt",revision:"ed1c317273f10219b909a95840860738"},{url:"resources/dia_ru.txt",revision:"49be2fa633be9926ebfe79de1cad414f"},{url:"resources/dia_si.txt",revision:"cf39bc4937bef7efe6153b5cfe6fc768"},{url:"resources/dia_sk.txt",revision:"c6f2dca6b2443a1b83b858d8d42fc8db"},{url:"resources/dia_sl.txt",revision:"aa42dc13cdfb617bd96c0bcaf1332f16"},{url:"resources/dia_sr.txt",revision:"59f4b2d3f99384c13c6a97c5cc6e2706"},{url:"resources/dia_sv.txt",revision:"984ad366b5fa667a2ab48119664f412c"},{url:"resources/dia_sw.txt",revision:"d59fe86d4658b28ecb077adb7b12b408"},{url:"resources/dia_ta.txt",revision:"9bd79233aa196442c80d472a2e38f7ed"},{url:"resources/dia_te.txt",revision:"2a025ce93ebca16ed0167fed9057c0d1"},{url:"resources/dia_th.txt",revision:"0432948b18130a42c1ffe92519de0af4"},{url:"resources/dia_tr.txt",revision:"b8dc99de103d62fa445b6ebb7f8d901d"},{url:"resources/dia_uk.txt",revision:"228bc68b91c63d479bd6f96d120033b1"},{url:"resources/dia_vi.txt",revision:"c4ec475c2da9167d3ac99062f69aca73"},{url:"resources/dia_zh-tw.txt",revision:"3e64174c2905d312042bad4f7451aa8a"},{url:"resources/dia_zh.txt",revision:"864acd3d195fed0ad3939e436834d61c"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{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/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/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/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker.js.mapdiff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.mapindex 24b2c1fee..a98809468 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/e214cb2f0784cc4d9166750db70652f5/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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0b2d9cb0ec4407c38508304c026e8515\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\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\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"196736fc1ea51bec09a27310e72e0ecf\"\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/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\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\": \"ce61a0e62031a160e057809fefe64aa2\"\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\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"d381db23d3c925eb81854c07b46776a5\"\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\": \"fdb5a8e9f7cd3114a9f695348b93d207\"\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\": \"5b9f2e79efc7cadba0c06301edbeeff1\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\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\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"d1c7dc6960d3ee0e570972f9a4831dce\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"8e8baa9cd98d14b066b3ebde945de434\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"4813b21d53b4eb86d4d7152a022e4987\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"2ba94930fcf28d3c7af9e2d50bdf45ca\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"4f505ac791c142e885f807340f3539c1\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"abadaf8f57129119a9b0833a4ac166da\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"83f743c98afc171314b5e16c6f3ef368\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2c92a85d1576af84ed15afe26b98a650\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"7b462b7e90c90e5b0e1a6dc6723cc0cf\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"b5cb7a7616245606794dd5f69ae97a13\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"371f578db5447fe728e949800eda49d8\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"d21bb809dbaf5397ed31d85965aaf505\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"390f0888f2828741b78c32fa4206afa8\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"cbace079f39a38d83749f46b0fc0cdf6\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"e7167f8e7865b19f60c5ce64c16db277\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"39a562a8fb10bc4a09145d95890e5474\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"10cb4f70878dfbb4bd69dba5f406832b\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"a0a7368861f497a6d22a0e6cfe57bf27\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"aa7776a1c431b38ddcac5c3c253996bb\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"27fc2cb44e28f7b51243cfa00328cc25\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"aa94c2ef35ad647d149a094f4c90e15f\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"2f6ff90a88604757bbcd2977eb8d696b\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"a710b7d0aa892f77947b3bb4bc06e4e6\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"024e4ec4ec8222231bc538d3290a6f20\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"7665ebfc3c4c61cc7e79997c572d8bcf\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"743786b04ae77cbf2f08fe869269380f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"eac626f063fd37a528073264c5e61dda\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"03a6e014add05e662186bd8bf0c20dbf\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"e16d7b493694fe84c981b9ee8fa4392d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"3422fb9cbc6298c1eb97cc0a6131e91c\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"ca86969ccc58ce90c1f1dd4cb3f05e87\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"ef982b87b5ce46656d9396ffda1575dd\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"c49ba8057420489056ebb3c32249413e\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"13dd3b09bbf872f76d401ab6dd823adb\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"8e519f7b900580cd26be6c0bc0ac4a94\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"83873498df6b6ad511a2dba791ca4ba6\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"54fd906bbf22f0f7353ce806585bbb8e\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"8c57b33454faa8c0a5456cabab308a03\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"ea2af35d61a3a6ab681bb9544b815f20\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"1978cabf61e304fb2d0b4c38fc4c0569\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"ed1c317273f10219b909a95840860738\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"49be2fa633be9926ebfe79de1cad414f\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"cf39bc4937bef7efe6153b5cfe6fc768\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"c6f2dca6b2443a1b83b858d8d42fc8db\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"aa42dc13cdfb617bd96c0bcaf1332f16\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"59f4b2d3f99384c13c6a97c5cc6e2706\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"984ad366b5fa667a2ab48119664f412c\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"d59fe86d4658b28ecb077adb7b12b408\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"9bd79233aa196442c80d472a2e38f7ed\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"2a025ce93ebca16ed0167fed9057c0d1\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"0432948b18130a42c1ffe92519de0af4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"b8dc99de103d62fa445b6ebb7f8d901d\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"228bc68b91c63d479bd6f96d120033b1\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c4ec475c2da9167d3ac99062f69aca73\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"3e64174c2905d312042bad4f7451aa8a\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"864acd3d195fed0ad3939e436834d61c\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\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/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/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/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,2BACKC,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,iCACKC,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,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,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,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,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/2c0123abb71daab4a82293c9d8ce3f81/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/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0a43db0d17562d385729f1d38073dccd\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"49546b5dc442ef2391394f4def07462c\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\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\": \"23cbac10c03279392888893b3f694007\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\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\": \"c0f6b9be1801ba990471a576aef71dff\"\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/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\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\": \"ce61a0e62031a160e057809fefe64aa2\"\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\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"25c061e619a1bdbce765821594f0f79d\"\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\": \"fdb5a8e9f7cd3114a9f695348b93d207\"\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\": \"5b9f2e79efc7cadba0c06301edbeeff1\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\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\": \"5d2c5f8a8ca5ee05a0a6d1df90a1468d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"d1c7dc6960d3ee0e570972f9a4831dce\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"8e8baa9cd98d14b066b3ebde945de434\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"4813b21d53b4eb86d4d7152a022e4987\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"2ba94930fcf28d3c7af9e2d50bdf45ca\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"4f505ac791c142e885f807340f3539c1\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"abadaf8f57129119a9b0833a4ac166da\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"83f743c98afc171314b5e16c6f3ef368\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2c92a85d1576af84ed15afe26b98a650\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"7b462b7e90c90e5b0e1a6dc6723cc0cf\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"b5cb7a7616245606794dd5f69ae97a13\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"371f578db5447fe728e949800eda49d8\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"d21bb809dbaf5397ed31d85965aaf505\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"390f0888f2828741b78c32fa4206afa8\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"cbace079f39a38d83749f46b0fc0cdf6\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"e7167f8e7865b19f60c5ce64c16db277\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"39a562a8fb10bc4a09145d95890e5474\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"10cb4f70878dfbb4bd69dba5f406832b\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"a0a7368861f497a6d22a0e6cfe57bf27\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"aa7776a1c431b38ddcac5c3c253996bb\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"27fc2cb44e28f7b51243cfa00328cc25\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"aa94c2ef35ad647d149a094f4c90e15f\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"2f6ff90a88604757bbcd2977eb8d696b\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"a710b7d0aa892f77947b3bb4bc06e4e6\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"024e4ec4ec8222231bc538d3290a6f20\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"7665ebfc3c4c61cc7e79997c572d8bcf\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"743786b04ae77cbf2f08fe869269380f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"eac626f063fd37a528073264c5e61dda\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"03a6e014add05e662186bd8bf0c20dbf\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"e16d7b493694fe84c981b9ee8fa4392d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"3422fb9cbc6298c1eb97cc0a6131e91c\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"ca86969ccc58ce90c1f1dd4cb3f05e87\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"ef982b87b5ce46656d9396ffda1575dd\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"c49ba8057420489056ebb3c32249413e\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"13dd3b09bbf872f76d401ab6dd823adb\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"8e519f7b900580cd26be6c0bc0ac4a94\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"83873498df6b6ad511a2dba791ca4ba6\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"54fd906bbf22f0f7353ce806585bbb8e\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"8c57b33454faa8c0a5456cabab308a03\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"ea2af35d61a3a6ab681bb9544b815f20\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"1978cabf61e304fb2d0b4c38fc4c0569\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"ed1c317273f10219b909a95840860738\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"49be2fa633be9926ebfe79de1cad414f\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"cf39bc4937bef7efe6153b5cfe6fc768\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"c6f2dca6b2443a1b83b858d8d42fc8db\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"aa42dc13cdfb617bd96c0bcaf1332f16\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"59f4b2d3f99384c13c6a97c5cc6e2706\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"984ad366b5fa667a2ab48119664f412c\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"d59fe86d4658b28ecb077adb7b12b408\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"9bd79233aa196442c80d472a2e38f7ed\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"2a025ce93ebca16ed0167fed9057c0d1\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"0432948b18130a42c1ffe92519de0af4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"b8dc99de103d62fa445b6ebb7f8d901d\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"228bc68b91c63d479bd6f96d120033b1\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c4ec475c2da9167d3ac99062f69aca73\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"3e64174c2905d312042bad4f7451aa8a\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"864acd3d195fed0ad3939e436834d61c\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\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/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/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/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\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,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,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,2BACKC,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,iCACKC,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,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,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,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file