Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@draw.io>2022-07-27 11:01:16 +0300
committerDavid Benson <david@draw.io>2022-07-27 11:01:16 +0300
commitbb75e49d3a8e3dfdfc031cadb9363d4263ffc749 (patch)
treea7cad661183c03f7e167432874d017a60993662f
parentcd024abfc10ecc63d0bb5c5325676a28a9cbd814 (diff)
20.2.1 releasev20.2.1
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js20
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js71
-rw-r--r--src/main/webapp/js/diagramly/DrawioFileSync.js5
-rw-r--r--src/main/webapp/js/integrate.min.js1254
-rw-r--r--src/main/webapp/js/viewer-static.min.js850
-rw-r--r--src/main/webapp/js/viewer.min.js850
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
11 files changed, 1539 insertions, 1524 deletions
diff --git a/ChangeLog b/ChangeLog
index ec4568d3..f5bfee9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+26-JUL-2022: 20.2.1
+
+- Adds statistics to realtime CF worker
+- Adds checksums for merge(File) error logging
+
22-JUL-2022: 20.2.0
- Changes real-time collaboration CF worker to use the same DO for multiple files
diff --git a/VERSION b/VERSION
index aef988c9..f32c8fc2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20.2.0 \ No newline at end of file
+20.2.1 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index dcf0e0bd..aff23b76 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -470,7 +470,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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:"undefined"!==typeof InstallTrigger,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||"[object SVGForeignObjectElement]"!==
@@ -10969,14 +10969,14 @@ DrawioFile.prototype.updateFile=function(b,d,f,c){null!=f&&f()||(EditorUi.debug(
d))}catch(m){null!=d&&d(m)}}),d))};
DrawioFile.prototype.mergeFile=function(b,d,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),x=b.getShadowPages();if(null!=x&&0<x.length){var z=[this.ui.diffPages(null!=c?c:m,x)],C=this.ignorePatches(z);this.setShadowPages(x);if(C)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",C);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};C={};var e=this.ui.patchPages(m,z[0]),g=this.ui.getHashValueForPages(e,
c),k=this.ui.getHashValueForPages(x,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",z,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(x)),t=this.compressReportData(this.getAnonymizedXmlForPages(e)),p=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(f,z,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+t,null,"mergeFile");return}if(null!=this.sync){var E=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||z.push(E)}this.patch(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(J);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var y=this.getCurrentUser(),B=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,J)}}catch(N){}}};
+this.checksumError(f,z,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+t,null,"mergeFile",g,k,b.getCurrentRevisionId());return}if(null!=this.sync){var E=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||z.push(E)}this.patch(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(J);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var y=this.getCurrentUser(),B=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,J)}}catch(N){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),f=d.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=d.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,d,f){d=null!=d?d:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,d,f,c,l){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var m=0;m<d.length;m++)this.ui.anonymizePatch(d[m]);var x=mxUtils.bind(this,function(k){var n=this.compressReportData(JSON.stringify(d,null,2));k=null==k?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(k.data)),
-25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+n+(null!=k?"\n\nRemote:\n"+k:""),null,7E4)});null==c?x(null):this.getLatestVersion(mxUtils.bind(this,function(k){null!=k&&k.getCurrentEtag()==c?x(k):x(null)}),function(){})}else{var z=this.getCurrentUser(),C=null!=z?z.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",g=JSON.stringify(d).length;b=null;if(null!=d&&this.constructor==DriveFile&&400>g){for(m=0;m<d.length;m++)this.ui.anonymizePatch(d[m]);
-b=JSON.stringify(d);b=null!=b&&250>b.length?Graph.compress(b):null}EditorUi.logError("Checksum "+(null!=b?"Report":"Error")+" in "+l+" "+e,null,this.getMode()+"."+this.getId(),"user_"+C+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+(null!=b?"-json_"+b:"")+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:l,label:"user_"+C+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+
-"-size_"+this.getSize()})}catch(k){}}}catch(k){}};
+DrawioFile.prototype.checksumError=function(b,d,f,c,l,m,x,z){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);var e=mxUtils.bind(this,function(A){var E=this.compressReportData(JSON.stringify(d,null,2));A=null==A?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(A.data)),
+25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+E+(null!=A?"\n\nRemote:\n"+A:""),null,7E4)});null==c?e(null):this.getLatestVersion(mxUtils.bind(this,function(A){null!=A&&A.getCurrentEtag()==c?e(A):e(null)}),function(){})}else{var g=this.getCurrentUser(),k=null!=g?g.id:"unknown",n=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",t=JSON.stringify(d).length,p=null;if(null!=d&&this.constructor==DriveFile&&400>t){for(C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);
+p=JSON.stringify(d);p=null!=p&&250>p.length?Graph.compress(p):null}this.getLatestVersion(mxUtils.bind(this,function(A){try{var E=null!=p?"Report":"Error",y=this.ui.getHashValueForPages(A.getShadowPages());EditorUi.logError("Checksum "+E+" in "+l+" "+n,null,this.getMode()+"."+this.getId(),"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+t+"-patches_"+d.length+(null!=p?"-json_"+p:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=x?"-current_"+x:"")+(null!=z?
+"-rev_"+this.ui.hashValue(z):"")+(null!=y?"-latest_"+y:"")+(null!=A?"-latestRev_"+this.ui.hashValue(A.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+n,action:l,label:"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+t+"-patches_"+d.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(A){}};
DrawioFile.prototype.sendErrorReport=function(b,d,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),z=null!=x?this.ui.hashValue(x.id):"unknown",C=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",e=this.getTitle(),g=e.lastIndexOf(".");x="xml";0<g&&(x=e.substring(g));var k=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+z+C+"\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!=d?"\n\n"+d:
"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+k+"\n\nShadow:\n"+l+"\n\nData:\n"+m,c)}catch(n){}};
@@ -11726,7 +11726,7 @@ D.appendChild(S);Q.appendChild(D);this.container=Q};var T=ChangePageSetup.protot
this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var q=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(D){}};W.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(q){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};b.afterDecode=function(d,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.1";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(e,g,k,n,t,p,A){p=null!=p?p:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -12264,8 +12264,8 @@ l,"applied",m)}return c};DrawioFileSync.prototype.isRealtimeActive=function(){re
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),d=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,d,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([d])}this.localFileWasChanged=!1}catch(f){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
DrawioFileSync.prototype.merge=function(b,d,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var x=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var z=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(z,this.ui.pages):null;var C=this.file.isRealtime()?this.ui.diffPages(z,this.file.ownPages):null;z=this.ui.applyPatches(z,b);var e=null==d?null:this.ui.getHashValueForPages(z);
-this.file.setShadowPages(z);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",d,"current",e,"valid",d==e,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",x,"etag",this.file.getDescriptorEtag(f));if(null!=d&&d!=e){var g=this.ui.hashValue(x),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+d+"\nCurrent: "+e,x,"merge");
-"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(z)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+this.file.setShadowPages(z);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",d,"current",e,"valid",d==e,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",x,"etag",this.file.getDescriptorEtag(f));if(null!=d&&d!=e){var g=this.ui.hashValue(x),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+d+"\nCurrent: "+e,x,"merge",
+d,e,x);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(z)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(x),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,p)}}catch(A){}}};
DrawioFileSync.prototype.fileChanged=function(b,d,f,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=f&&f()||(this.isValidState()?this.catchup(m,b,d,f):null!=d&&d())}),d):null!=d&&d())}),c?this.cacheReadyDelay:0);return this.notifyThread=l};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 7277eb32..7f65d3ef 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -338,13 +338,12 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
var from = this.ui.hashValue(file.getCurrentEtag());
var to = this.ui.hashValue(this.getCurrentEtag());
- this.checksumError(error, patches,
- 'Shadow Details: ' + JSON.stringify(patchedDetails) +
- '\nChecksum: ' + checksum + '\nCurrent: ' + current +
- '\nCurrent Details: ' + JSON.stringify(currentDetails) +
- '\nFrom: ' + from + '\nTo: ' + to +
- '\n\nFile Data:\n' + fileData +
- '\nPatched Shadow:\n' + data, null, 'mergeFile');
+ this.checksumError(error, patches, 'Shadow Details: ' +
+ JSON.stringify(patchedDetails) + '\nChecksum: ' +
+ checksum + '\nCurrent: ' + current + '\nCurrent Details: ' +
+ JSON.stringify(currentDetails) + '\nFrom: ' + from + '\nTo: ' +
+ to + '\n\nFile Data:\n' + fileData + '\nPatched Shadow:\n' +
+ data, null, 'mergeFile', checksum, current, file.getCurrentRevisionId());
// Abnormal termination
return;
@@ -484,7 +483,7 @@ DrawioFile.prototype.compressReportData = function(data, limit, max)
/**
* Adds the listener for automatically saving the diagram for local changes.
*/
-DrawioFile.prototype.checksumError = function(error, patches, details, etag, functionName)
+DrawioFile.prototype.checksumError = function(error, patches, details, etag, functionName, checksum, current, rev)
{
this.stats.checksumErrors++;
this.inConflictState = true;
@@ -575,29 +574,39 @@ DrawioFile.prototype.checksumError = function(error, patches, details, etag, fun
}
}
- var type = (data != null) ? 'Report' : 'Error';
-
- EditorUi.logError('Checksum ' + type + ' in ' + functionName + ' ' + id,
- null, this.getMode() + '.' + this.getId(),
- 'user_' + uid + ((this.sync != null) ?
- '-client_' + this.sync.clientId : '-nosync') +
- '-bytes_' + bytes + '-patches_' + patches.length +
- ((data != null) ? ('-json_' + data) : '') +
- '-size_' + this.getSize());
-
- // Logs checksum error for file
- try
- {
- EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + id,
- action: functionName, label: 'user_' + uid + ((this.sync != null) ?
- '-client_' + this.sync.clientId : '-nosync') +
- '-bytes_' + bytes + '-patches_' + patches.length +
- '-size_' + this.getSize()});
- }
- catch (e)
- {
- // ignore
- }
+ this.getLatestVersion(mxUtils.bind(this, function(latestFile)
+ {
+ // Logs checksum error for file
+ try
+ {
+ var type = (data != null) ? 'Report' : 'Error';
+ var latest = this.ui.getHashValueForPages(latestFile.getShadowPages());
+
+ EditorUi.logError('Checksum ' + type + ' in ' + functionName + ' ' + id,
+ null, this.getMode() + '.' + this.getId(),
+ 'user_' + uid + ((this.sync != null) ?
+ '-client_' + this.sync.clientId : '-nosync') +
+ '-bytes_' + bytes + '-patches_' + patches.length +
+ ((data != null) ? ('-json_' + data) : '') +
+ '-size_' + this.getSize() +
+ ((checksum != null) ? ('-expected_' + checksum) : '') +
+ ((current != null) ? ('-current_' + current) : '') +
+ ((rev != null) ? ('-rev_' + this.ui.hashValue(rev)) : '') +
+ ((latest != null) ? ('-latest_' + latest) : '') +
+ ((latestFile != null) ? ('-latestRev_' + this.ui.hashValue(
+ latestFile.getCurrentRevisionId())) : ''));
+
+ EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + id,
+ action: functionName, label: 'user_' + uid + ((this.sync != null) ?
+ '-client_' + this.sync.clientId : '-nosync') +
+ '-bytes_' + bytes + '-patches_' + patches.length +
+ '-size_' + this.getSize()});
+ }
+ catch (e)
+ {
+ // ignore
+ }
+ }), error);
}
}
catch (e)
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index 2164a26d..69d3d07e 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -1274,8 +1274,9 @@ DrawioFileSync.prototype.merge = function(patches, checksum, desc, success, erro
{
var to = this.ui.hashValue(target);
var from = this.ui.hashValue(this.file.getCurrentRevisionId());
- this.file.checksumError(error, patches, 'From: ' + from + '\nTo: ' + to +
- '\nChecksum: ' + checksum + '\nCurrent: ' + current, target, 'merge');
+ this.file.checksumError(error, patches, 'From: ' + from +
+ '\nTo: ' + to + '\nChecksum: ' + checksum + '\nCurrent: ' +
+ current, target, 'merge', checksum, current, target);
if (urlParams['test'] == '1')
{
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 8e6e55a3..848cb650 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -470,7 +470,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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:"undefined"!==typeof InstallTrigger,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||"[object SVGForeignObjectElement]"!==
@@ -10968,15 +10968,15 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,f,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(v){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[v]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=v?this.mergeFile(v,b,f,d):this.reloadFile(b,
f))}catch(x){null!=f&&f(x)}}),f))};
DrawioFile.prototype.mergeFile=function(b,f,k,d){var v=!0;try{this.stats.fileMerged++;var x=this.getShadowPages(),B=b.getShadowPages();if(null!=B&&0<B.length){var D=[this.ui.diffPages(null!=d?d:x,B)],K=this.ignorePatches(D);this.setShadowPages(B);if(K)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",K);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(x,this.ui.pages):null;d={};K={};var c=this.ui.patchPages(x,D[0]),e=this.ui.getHashValueForPages(c,
-d),g=this.ui.getHashValueForPages(B,K);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",x,"pages",this.ui.pages,"patches",D,"backup",this.backupPatch,"checksum",e,"current",g,"valid",e==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=e&&e!=g){var q=this.compressReportData(this.getAnonymizedXmlForPages(B)),n=this.compressReportData(this.getAnonymizedXmlForPages(c)),p=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,D,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+e+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(K)+"\nFrom: "+p+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}if(null!=this.sync){var C=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==C||mxUtils.isEmptyObject(C)||D.push(C)}this.patch(D,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw v=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(v)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var u=this.getCurrentUser(),y=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,I)}}catch(N){}}};
+d),g=this.ui.getHashValueForPages(B,K);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",x,"pages",this.ui.pages,"patches",D,"backup",this.backupPatch,"checksum",e,"current",g,"valid",e==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=e&&e!=g){var q=this.compressReportData(this.getAnonymizedXmlForPages(B)),n=this.compressReportData(this.getAnonymizedXmlForPages(c)),m=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,D,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+e+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(K)+"\nFrom: "+m+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile",e,g,b.getCurrentRevisionId());return}if(null!=this.sync){var C=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==C||mxUtils.isEmptyObject(C)||D.push(C)}this.patch(D,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw v=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(v)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var u=this.getCurrentUser(),y=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,I)}}catch(N){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var v=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,v,!0);k.appendChild(v)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,k,d,v){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var x=0;x<f.length;x++)this.ui.anonymizePatch(f[x]);var B=mxUtils.bind(this,function(g){var q=this.compressReportData(JSON.stringify(f,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
-25E3);this.sendErrorReport("Checksum Error in "+v+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+q+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==d?B(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==d?B(g):B(null)}),function(){})}else{var D=this.getCurrentUser(),K=null!=D?D.id:"unknown",c=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",e=JSON.stringify(f).length;b=null;if(null!=f&&this.constructor==DriveFile&&400>e){for(x=0;x<f.length;x++)this.ui.anonymizePatch(f[x]);
-b=JSON.stringify(f);b=null!=b&&250>b.length?Graph.compress(b):null}EditorUi.logError("Checksum "+(null!=b?"Report":"Error")+" in "+v+" "+c,null,this.getMode()+"."+this.getId(),"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+f.length+(null!=b?"-json_"+b:"")+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+c,action:v,label:"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+f.length+
-"-size_"+this.getSize()})}catch(g){}}}catch(g){}};
+DrawioFile.prototype.checksumError=function(b,f,k,d,v,x,B,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var K=0;K<f.length;K++)this.ui.anonymizePatch(f[K]);var c=mxUtils.bind(this,function(z){var C=this.compressReportData(JSON.stringify(f,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
+25E3);this.sendErrorReport("Checksum Error in "+v+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+C+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==d?c(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==d?c(z):c(null)}),function(){})}else{var e=this.getCurrentUser(),g=null!=e?e.id:"unknown",q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",n=JSON.stringify(f).length,m=null;if(null!=f&&this.constructor==DriveFile&&400>n){for(K=0;K<f.length;K++)this.ui.anonymizePatch(f[K]);
+m=JSON.stringify(f);m=null!=m&&250>m.length?Graph.compress(m):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var C=null!=m?"Report":"Error",u=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+C+" in "+v+" "+q,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+n+"-patches_"+f.length+(null!=m?"-json_"+m:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=B?"-current_"+B:"")+(null!=D?
+"-rev_"+this.ui.hashValue(D):"")+(null!=u?"-latest_"+u:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+q,action:v,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+n+"-patches_"+f.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(z){}};
DrawioFile.prototype.sendErrorReport=function(b,f,k,d){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),D=null!=B?this.ui.hashValue(B.id):"unknown",K=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",c=this.getTitle(),e=c.lastIndexOf(".");B="xml";0<e&&(B=c.substring(e));var g=null!=k?k.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="+D+K+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+v+"\n\nData:\n"+x,d)}catch(q){}};
@@ -11043,7 +11043,7 @@ LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=fu
LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
LocalFile.prototype.saveFile=function(b,f,k,d,v){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var x=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var B=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),K=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
function(q){this.savingFile=!1;null!=d&&d({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[n],"conflict",this.desc.lastModified!=n.lastModified);this.desc.lastModified==n.lastModified?q.write(x?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var z=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(B,z,D,e);this.removeDraft()}catch(C){e(C)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(n){this.invalidFileHandle=!0;e(n)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,x?"image/png":"text/xml",x);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(m){try{var z=this.desc;this.savingFile=!1;this.desc=m;this.fileSaved(B,z,D,e);this.removeDraft()}catch(C){e(C)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(n){this.invalidFileHandle=!0;e(n)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,x?"image/png":"text/xml",x);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(x?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});x?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){K(c)}),d,this.ui.getCurrentFile()!=this?B:null,f.scale,f.border)):K(B)};
LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};StorageFile.prototype.saveAs=function(b,f,k){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,k)};
@@ -11059,11 +11059,11 @@ StorageFile.listFiles=function(b,f,k,d){b.getDatabaseItems(function(v){var x=[];
StorageLibrary.prototype.isRenamable=function(b,f,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,k){RemoteFile.call(this,b,f,k.title);this.libObj=k};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,k){};
RemoteLibrary.prototype.saveAs=function(b,f,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,k){StorageFile.call(this,b,f,k);b=k;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,k){return!1};UrlLibrary.prototype.saveAs=function(b,f,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,k){function d(g,q,n,p,z,C){function u(){mxEvent.addListener(y,"click",null!=C?C:function(){n!=App.MODE_GOOGLE||b.isDriveDomain()?n==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(n,!0);f()})):n==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(n,!0);f()}),
+var StorageDialog=function(b,f,k){function d(g,q,n,m,z,C){function u(){mxEvent.addListener(y,"click",null!=C?C:function(){n!=App.MODE_GOOGLE||b.isDriveDomain()?n==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(n,!0);f()})):n==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(n,!0);f()}),
function(F){b.spinner.stop();b.handleError(F)}):(b.setMode(n,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}D++;++B>k&&(mxUtils.br(K),B=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height=
"100px";y.style.whiteSpace="nowrap";y.setAttribute("title",q);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,q);y.appendChild(I);if(null!=g){var N=document.createElement("img");N.setAttribute("src",g);N.setAttribute("border","0");N.setAttribute("align","absmiddle");N.style.width="60px";N.style.height="60px";N.style.paddingBottom="6px";y.appendChild(N)}else I.style.paddingTop=
-"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=z)for(g=0;g<z.length;g++)mxUtils.br(I),mxUtils.write(I,z[g]);if(null!=p&&null==b[p]){N.style.visibility="hidden";mxUtils.setOpacity(I,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(y);
-var m=window.setTimeout(function(){null==b[p]&&(t.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,J){null!=b[p]&&J.getProperty("client")==b[p]&&(window.clearTimeout(m),mxUtils.setOpacity(I,100),N.style.visibility="",t.stop(),u(),"drive"==p&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else u();K.appendChild(y)}k=null!=k?k:2;var v=document.createElement("div");v.style.textAlign="center";v.style.whiteSpace="nowrap";v.style.paddingTop="0px";v.style.paddingBottom=
+"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=z)for(g=0;g<z.length;g++)mxUtils.br(I),mxUtils.write(I,z[g]);if(null!=m&&null==b[m]){N.style.visibility="hidden";mxUtils.setOpacity(I,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(y);
+var p=window.setTimeout(function(){null==b[m]&&(t.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,J){null!=b[m]&&J.getProperty("client")==b[m]&&(window.clearTimeout(p),mxUtils.setOpacity(I,100),N.style.visibility="",t.stop(),u(),"drive"==m&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else u();K.appendChild(y)}k=null!=k?k:2;var v=document.createElement("div");v.style.textAlign="center";v.style.whiteSpace="nowrap";v.style.paddingTop="0px";v.style.paddingBottom=
"20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";x.style.padding="10px 0px 20px 0px";var B=0,D=0,K=document.createElement("div");K.style.paddingTop="2px";x.appendChild(K);var c=document.createElement("p"),e=document.createElement("p");e.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(e,mxResources.get("saveDiagramsTo")+":");v.appendChild(e);v.appendChild(x);B=0;"function"===typeof window.DriveClient&&
d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");x=document.createElement("span");x.style.position="absolute";x.style.cursor="pointer";x.style.bottom="27px";x.style.color="gray";x.style.userSelect="none";x.style.textAlign="center";x.style.left="50%";mxUtils.setPrefixedStyle(x.style,
@@ -11075,30 +11075,30 @@ b.addLanguageMenu(f,!0);null!=k&&(k.style.bottom="19px")}var d=document.createEl
D=document.createElement("tbody"),K=document.createElement("tr"),c=document.createElement("td"),e=document.createElement("td");B.setAttribute("align","center");c.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);e.style.textAlign="left";e.appendChild(d);K.appendChild(c);K.appendChild(e);D.appendChild(K);B.appendChild(D);f.appendChild(B);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(x,mxResources.get("createNewDiagram"));mxEvent.addListener(x,"click",function(){b.hideDialog();b.actions.get("new").funct()});v.appendChild(x);mxUtils.br(v);x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="22px";x.style.fontSize=
"18px";x.style.padding="10px";x.style.width="340px";mxUtils.write(x,mxResources.get("openExistingDiagram"));mxEvent.addListener(x,"click",function(){b.actions.get("open").funct()});v.appendChild(x);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(n){x.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));x.style.marginBottom="16px";v.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){n()})});v.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";v.style.paddingBottom="18px";v.appendChild(d);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(k=0;k<g.length;k++)B=document.createElement("option"),mxUtils.write(B,g[k].displayName),B.value=k,q.appendChild(B),
-B=document.createElement("option"),B.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(B,"<"+g[k].email+">"),B.setAttribute("disabled","disabled"),q.appendChild(B);B=document.createElement("option");mxUtils.write(B,mxResources.get("addAccount"));B.value=g.length;q.appendChild(B);mxEvent.addListener(q,"change",function(){var n=q.value,p=g.length!=n;p&&b.drive.setUser(g[n]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(n){x.style.marginBottom="24px";var m=document.createElement("a");m.style.display="inline-block";m.style.color="gray";m.style.cursor="pointer";m.style.marginTop="6px";mxUtils.write(m,mxResources.get("signOut"));x.style.marginBottom="16px";v.style.paddingBottom="18px";mxEvent.addListener(m,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){n()})});v.appendChild(m)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";v.style.paddingBottom="18px";v.appendChild(d);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(k=0;k<g.length;k++)B=document.createElement("option"),mxUtils.write(B,g[k].displayName),B.value=k,q.appendChild(B),
+B=document.createElement("option"),B.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(B,"<"+g[k].email+">"),B.setAttribute("disabled","disabled"),q.appendChild(B);B=document.createElement("option");mxUtils.write(B,mxResources.get("addAccount"));B.value=g.length;q.appendChild(B);mxEvent.addListener(q,"change",function(){var n=q.value,m=g.length!=n;m&&b.drive.setUser(g[n]);b.drive.authorize(m,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
b.showSplash()})},!0)});v.appendChild(q)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(v);this.container=f},EmbedDialog=function(b,f,k,d,v,x,B,D,K){B=null!=B?B:"Check out the diagram I made using @drawio";d=document.createElement("div");var c=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>f.length?c?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div");
x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(f.length));d.appendChild(x);var e=document.createElement("textarea");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.marginTop="10px";e.style.resize="none";e.style.height="150px";e.style.width="440px";e.style.border=
"1px solid gray";e.value=mxResources.get("updatingDocument");d.appendChild(e);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(e.value=f,e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)):(e.setAttribute("readonly","true"),e.value=mxResources.get("tooLargeUseDownload"))},0)};x=document.createElement("div");x.style.position="absolute";x.style.bottom="36px";x.style.right="32px";var g=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=D?D:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var n=5E5>f.length?e.value:f;if(null!=v)v(n);else if(c)try{var p=b.openLink(n);null!=p&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=n.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(C){}}),
+mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=D?D:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var n=5E5>f.length?e.value:f;if(null!=v)v(n);else if(c)try{var m=b.openLink(n);null!=m&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=m&&null!=m.location.href&&m.location.href.substring(0,8)!=n.substring(0,8)&&(m.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(C){}}),
k||500)}catch(C){b.handleError({message:C.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",x.appendChild(g));if(!c||7500<f.length)D=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=K?K:"embed.txt","txt",f,"text/plain")}),D.className="geBtn",x.appendChild(D);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var q=mxUtils.button("",function(){try{var n="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(e.value);b.openLink(n)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});D=document.createElement("img");D.setAttribute("src",Editor.facebookImage);D.setAttribute("width","18");D.setAttribute("height",
-"18");D.setAttribute("border","0");q.appendChild(D);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";x.appendChild(q)}7168>f.length&&(q=mxUtils.button("",function(){try{var n="https://twitter.com/intent/tweet?text="+encodeURIComponent(B)+"&url="+encodeURIComponent(e.value);b.openLink(n)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
+b.saveData(null!=K?K:"embed.txt","txt",f,"text/plain")}),D.className="geBtn",x.appendChild(D);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var q=mxUtils.button("",function(){try{var n="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(e.value);b.openLink(n)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}});D=document.createElement("img");D.setAttribute("src",Editor.facebookImage);D.setAttribute("width","18");D.setAttribute("height",
+"18");D.setAttribute("border","0");q.appendChild(D);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";x.appendChild(q)}7168>f.length&&(q=mxUtils.button("",function(){try{var n="https://twitter.com/intent/tweet?text="+encodeURIComponent(B)+"&url="+encodeURIComponent(e.value);b.openLink(n)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}}),
D=document.createElement("img"),D.setAttribute("src",Editor.tweetImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",q.appendChild(D),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",x.appendChild(q))}!b.isOffline()&&5E5>f.length&&(q=mxUtils.button("",function(){try{var n="mailto:?subject="+encodeURIComponent(K||
-b.defaultFilename)+"&body="+encodeURIComponent(e.value);b.openLink(n)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",q.appendChild(D),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",x.appendChild(q));
+b.defaultFilename)+"&body="+encodeURIComponent(e.value);b.openLink(n)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",q.appendChild(D),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",x.appendChild(q));
D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.appendChild(D);q=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(x.appendChild(q),q.className="geBtn gePrimaryBtn",D.className="geBtn"):(x.appendChild(g),
D.className="geBtn",g.className="geBtn gePrimaryBtn");d.appendChild(x);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function k(){var F=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;if(N.checked&&""!=q.value){var J="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(J+="&title="+encodeURIComponent(F));0<t.length&&(J+="&s="+t);""!=n.value&&"0"!=n.value&&(J+="&border="+n.value);""!=g.value&&(J+="&height="+g.value);J+="&pan="+(p.checked?"1":"0");J+="&zoom="+(z.checked?"1":"0");J+="&fit="+(I.checked?"1":"0");
-J+="&resize="+(y.checked?"1":"0");J+="&x0="+Number(e.value);J+="&y0="+K;v.mathEnabled&&(J+="&math=1");u.checked?J+="&edit=_blank":C.checked&&(J+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=J}else m.constructor==DriveFile||m.constructor==DropboxFile?(J="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?J+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(J+=m.getHash().substring(1),J=m.constructor==DropboxFile?J+"&type=2":J+"&type=1"),null!=
+var GoogleSitesDialog=function(b,f){function k(){var F=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;if(N.checked&&""!=q.value){var J="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(J+="&title="+encodeURIComponent(F));0<t.length&&(J+="&s="+t);""!=n.value&&"0"!=n.value&&(J+="&border="+n.value);""!=g.value&&(J+="&height="+g.value);J+="&pan="+(m.checked?"1":"0");J+="&zoom="+(z.checked?"1":"0");J+="&fit="+(I.checked?"1":"0");
+J+="&resize="+(y.checked?"1":"0");J+="&x0="+Number(e.value);J+="&y0="+K;v.mathEnabled&&(J+="&math=1");u.checked?J+="&edit=_blank":C.checked&&(J+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=J}else p.constructor==DriveFile||p.constructor==DropboxFile?(J="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?J+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(J+=p.getHash().substring(1),J=p.constructor==DropboxFile?J+"&type=2":J+"&type=1"),null!=
F&&(J+="&title="+encodeURIComponent(F)),""!=g.value&&(F=parseInt(g.value)+parseInt(e.value),J+="&height="+F),c.value=J):c.value=""}var d=document.createElement("div"),v=b.editor.graph,x=v.getGraphBounds(),B=v.view.scale,D=Math.floor(x.x/B-v.view.translate.x),K=Math.floor(x.y/B-v.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";
d.appendChild(c);mxUtils.br(d);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=D;d.appendChild(e);mxUtils.write(d,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text");
g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(x.height/B);d.appendChild(g);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=f||"";d.appendChild(q);
-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","3");n.style.marginBottom="8px";n.style.marginLeft="4px";n.value="0";d.appendChild(n);mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";d.appendChild(p);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","3");n.style.marginBottom="8px";n.style.marginLeft="4px";n.value="0";d.appendChild(n);mxUtils.br(d);var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;m.style.marginLeft="16px";d.appendChild(m);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";C.setAttribute("title",window.location.href);d.appendChild(C);mxUtils.write(d,mxResources.get("edit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";d.appendChild(u);mxUtils.write(d,
mxResources.get("asNew")+" ");mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";d.appendChild(I);mxUtils.write(d,mxResources.get("fit")+" ");var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginLeft=
-"8px";d.appendChild(N);mxUtils.write(d,mxResources.get("embed")+" ");var t=b.getBasenames().join(";"),m=b.getCurrentFile();mxEvent.addListener(p,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(C,"change",k);mxEvent.addListener(u,"change",k);mxEvent.addListener(N,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(n,"change",k);mxEvent.addListener(q,"change",k);k();
+"8px";d.appendChild(N);mxUtils.write(d,mxResources.get("embed")+" ");var t=b.getBasenames().join(";"),p=b.getCurrentFile();mxEvent.addListener(m,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(C,"change",k);mxEvent.addListener(u,"change",k);mxEvent.addListener(N,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(n,"change",k);mxEvent.addListener(q,"change",k);k();
mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";f.appendChild(x);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,k){var d=document.createElement("div");d.style.textAlign="right";this.init=
function(){var v=document.createElement("div");v.style.position="relative";v.style.border="1px solid gray";v.style.width="100%";v.style.height="360px";v.style.overflow="hidden";v.style.marginBottom="16px";mxEvent.disableContextMenu(v);d.appendChild(v);var x=new Graph(v);x.setCellsCloneable(!0);x.setPanning(!0);x.setAllowDanglingEdges(!1);x.connectionHandler.select=!1;x.view.setTranslate(20,20);x.border=20;x.panningHandler.useLeftButtonForPanning=!0;var B="curved=1;";x.cellRenderer.installCellOverlayListeners=
function(z,C,u){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(u.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(u.node,"touchstart",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop=
@@ -11106,36 +11106,36 @@ function(z,C,u){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,
x.insertEdge(D,null,"",z,N,B)},function(){x.scrollCellToVisible(N)})});C.addListener("pointerdown",function(u,y){u=y.getProperty("event");y=y.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var I=mxUtils.convertPoint(x.container,mxEvent.getClientX(u),mxEvent.getClientY(u));x.connectionHandler.start(y,I.x,I.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(u);mxEvent.consume(u)});x.addCellOverlay(z,C)});x.getModel().beginUpdate();try{var c=x.insertVertex(D,null,"Start",
0,0,80,30,"ellipse");K(c)}finally{x.getModel().endUpdate()}if("horizontalTree"==k){var e=new mxCompactTreeLayout(x);e.edgeRouting=!1;e.levelDistance=30;B="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(e=new mxCompactTreeLayout(x,!1),e.edgeRouting=!1,e.levelDistance=30,B="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(e=new mxRadialTreeLayout(x,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==k?e=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
k?e=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"organic"==k?(e=new mxFastOrganicLayout(x,!1),e.forceConstant=80):"circle"==k&&(e=new mxCircleLayout(x));if(null!=e){var g=function(z,C){x.getModel().beginUpdate();try{null!=z&&z(),e.execute(x.getDefaultParent(),c)}catch(u){throw u;}finally{z=new mxMorphing(x),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();null!=C&&C()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(z,C,u,y,I){q.apply(this,arguments);g()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var n=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=v.parentNode&&(x.destroy(),v.parentNode.removeChild(v));b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&d.appendChild(n);var p=mxUtils.button(mxResources.get("insert"),function(z){x.clearCellOverlays();
-var C=x.getModel().getChildren(x.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(C,!0));C=b.editor.graph.importCells(C,z.x,z.y);z=b.editor.graph.view;var u=z.getBounds(C);u.x-=z.translate.x;u.y-=z.translate.y;b.editor.graph.scrollRectToVisible(u);b.editor.graph.setSelectionCells(C);null!=v.parentNode&&(x.destroy(),v.parentNode.removeChild(v));b.hideDialog()});d.appendChild(p);p.className="geBtn gePrimaryBtn";
+function(z,C,u,y,I){q.apply(this,arguments);g()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var n=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=v.parentNode&&(x.destroy(),v.parentNode.removeChild(v));b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&d.appendChild(n);var m=mxUtils.button(mxResources.get("insert"),function(z){x.clearCellOverlays();
+var C=x.getModel().getChildren(x.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(C,!0));C=b.editor.graph.importCells(C,z.x,z.y);z=b.editor.graph.view;var u=z.getBounds(C);u.x-=z.translate.x;u.y-=z.translate.y;b.editor.graph.scrollRectToVisible(u);b.editor.graph.setSelectionCells(C);null!=v.parentNode&&(x.destroy(),v.parentNode.removeChild(v));b.hideDialog()});d.appendChild(m);m.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||d.appendChild(n)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var v=document.createElement("h2");mxUtils.write(v,mxResources.get("backgroundImage"));v.style.marginTop="0px";d.appendChild(v);var x=null!=k&&null!=k.originalSrc;v=!1;var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","url");B.setAttribute("type","radio");B.setAttribute("name","geBackgroundImageDialogOption");var D=document.createElement("input");
D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.width="360px";K.value=x||null==k?"":k.src;var c=document.createElement("select");c.style.width="360px";if(null!=b.pages)for(var e=0;e<b.pages.length;e++){var g=document.createElement("option");mxUtils.write(g,b.pages[e].getName()||
-mxResources.get("pageWithNumber",[e+1]));g.setAttribute("value","data:page/id,"+b.pages[e].getId());b.pages[e]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),v=!0);c.appendChild(g)}x||null!=b.pages&&1!=b.pages.length||(B.style.display="none",D.style.display="none",c.style.display="none");var q=document.createElement("option"),n=!1,p=!1,z=function(N,t){n||null!=N&&p||(D.checked?null!=t&&t(q.selected?null:
-c.value):""==K.value||b.isOffline()?(u.value="",y.value="",null!=t&&t("")):(K.value=mxUtils.trim(K.value),b.loadImage(K.value,function(m){u.value=m.width;y.value=m.height;null!=t&&t(K.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));u.value="";y.value="";null!=t&&t(null)})))},C=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(t,m,F,J,M,H){K.value=t;z();K.focus()},function(){},function(t){return"image/"==t.type.substring(0,
-6)},function(t){for(var m=0;m<t.length;m++)t[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){x?c.focus():K.focus();mxEvent.addListener(c,"focus",function(){B.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});mxEvent.addListener(K,"focus",function(){D.removeAttribute("checked");B.setAttribute("checked","checked");B.checked=!0});if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=d.parentNode,t=null;mxEvent.addListener(N,
-"dragleave",function(m){null!=t&&(t.parentNode.removeChild(t),t=null);m.stopPropagation();m.preventDefault()});mxEvent.addListener(N,"dragover",mxUtils.bind(this,function(m){null==t&&(!mxClient.IS_IE||10<document.documentMode)&&(t=b.highlightElement(N));m.stopPropagation();m.preventDefault()}));mxEvent.addListener(N,"drop",mxUtils.bind(this,function(m){null!=t&&(t.parentNode.removeChild(t),t=null);if(0<m.dataTransfer.files.length)C(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,
-"text/uri-list")){var F=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)&&(K.value=decodeURIComponent(F),z())}m.stopPropagation();m.preventDefault()}),!1)}};d.appendChild(B);d.appendChild(K);mxUtils.br(d);e=document.createElement("span");e.style.marginLeft="30px";mxUtils.write(e,mxResources.get("width")+":");d.appendChild(e);var u=document.createElement("input");u.setAttribute("type","text");u.style.width="60px";u.style.marginLeft="8px";u.style.marginRight="16px";
+mxResources.get("pageWithNumber",[e+1]));g.setAttribute("value","data:page/id,"+b.pages[e].getId());b.pages[e]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),v=!0);c.appendChild(g)}x||null!=b.pages&&1!=b.pages.length||(B.style.display="none",D.style.display="none",c.style.display="none");var q=document.createElement("option"),n=!1,m=!1,z=function(N,t){n||null!=N&&m||(D.checked?null!=t&&t(q.selected?null:
+c.value):""==K.value||b.isOffline()?(u.value="",y.value="",null!=t&&t("")):(K.value=mxUtils.trim(K.value),b.loadImage(K.value,function(p){u.value=p.width;y.value=p.height;null!=t&&t(K.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));u.value="";y.value="";null!=t&&t(null)})))},C=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(t,p,F,J,M,H){K.value=t;z();K.focus()},function(){},function(t){return"image/"==t.type.substring(0,
+6)},function(t){for(var p=0;p<t.length;p++)t[p]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){x?c.focus():K.focus();mxEvent.addListener(c,"focus",function(){B.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});mxEvent.addListener(K,"focus",function(){D.removeAttribute("checked");B.setAttribute("checked","checked");B.checked=!0});if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=d.parentNode,t=null;mxEvent.addListener(N,
+"dragleave",function(p){null!=t&&(t.parentNode.removeChild(t),t=null);p.stopPropagation();p.preventDefault()});mxEvent.addListener(N,"dragover",mxUtils.bind(this,function(p){null==t&&(!mxClient.IS_IE||10<document.documentMode)&&(t=b.highlightElement(N));p.stopPropagation();p.preventDefault()}));mxEvent.addListener(N,"drop",mxUtils.bind(this,function(p){null!=t&&(t.parentNode.removeChild(t),t=null);if(0<p.dataTransfer.files.length)C(p.dataTransfer.files);else if(0<=mxUtils.indexOf(p.dataTransfer.types,
+"text/uri-list")){var F=p.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)&&(K.value=decodeURIComponent(F),z())}p.stopPropagation();p.preventDefault()}),!1)}};d.appendChild(B);d.appendChild(K);mxUtils.br(d);e=document.createElement("span");e.style.marginLeft="30px";mxUtils.write(e,mxResources.get("width")+":");d.appendChild(e);var u=document.createElement("input");u.setAttribute("type","text");u.style.width="60px";u.style.marginLeft="8px";u.style.marginRight="16px";
u.value=null==k||x?"":k.width;d.appendChild(u);mxUtils.write(d,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||x?"":k.height;d.appendChild(y);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(K,"change",z);ImageDialog.filePicked=function(N){N.action==google.picker.Action.PICKED&&null!=N.docs[0].thumbnails&&(N=N.docs[0].thumbnails[N.docs[0].thumbnails.length-1],
null!=N&&(K.value=N.url,z()));K.focus()};d.appendChild(D);d.appendChild(c);mxUtils.br(d);x?(D.setAttribute("checked","checked"),D.checked=!0):(B.setAttribute("checked","checked"),B.checked=!0);!v&&D.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),c.appendChild(q),mxEvent.addListener(c,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));k=document.createElement("div");
k.style.marginTop="30px";k.style.textAlign="right";v=mxUtils.button(mxResources.get("cancel"),function(){n=!0;b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&k.appendChild(v);e=mxUtils.button(mxResources.get("reset"),function(){K.value="";u.value="";y.value="";B.checked=!0;n=!1});mxEvent.addGestureListeners(e,function(){n=!0});e.className="geBtn";e.width="100";k.appendChild(e);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
-"file");mxEvent.addListener(I,"change",function(N){null!=I.files&&(C(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";d.appendChild(I);e=mxUtils.button(mxResources.get("open"),function(){I.click()});e.className="geBtn";k.appendChild(e)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(N){f(""!=N&&null!=N?new mxImage(N,u.value,y.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn";
-k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(v);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(n,p,z){var C=n.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var u=function(T,W,U,V,l){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(new mxRectangle(0,0,V,l));var A=null;y.getModel().beginUpdate();try{A="txt"==W?b.insertAsPreText(U,x.x,x.y):y.insertVertex(null,null,null,x.x,x.y,
-V,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),y.setAttributeForCell(A,"plantUmlData",JSON.stringify({data:T,format:W},null,2))}finally{y.getModel().endUpdate()}null!=A&&(y.setSelectionCell(A),y.scrollCellToVisible(A))},y=b.editor.graph,I="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+"file");mxEvent.addListener(I,"change",function(N){null!=I.files&&(C(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";d.appendChild(I);e=mxUtils.button(mxResources.get("open"),function(){I.click()});e.className="geBtn";k.appendChild(e)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(N){f(""!=N&&null!=N?new mxImage(N,u.value,y.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){m=!0});applyBtn.className="geBtn gePrimaryBtn";
+k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(v);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(n,m,z){var C=n.split("\n");if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var u=function(T,W,U,V,l){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(new mxRectangle(0,0,V,l));var A=null;y.getModel().beginUpdate();try{A="txt"==W?b.insertAsPreText(U,x.x,x.y):y.insertVertex(null,null,null,x.x,x.y,
+V,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),y.setAttributeForCell(A,"plantUmlData",JSON.stringify({data:T,format:W},null,2))}finally{y.getModel().endUpdate()}null!=A&&(y.setSelectionCell(A),y.scrollCellToVisible(A))},y=b.editor.graph,I="plantUmlTxt"==m?"txt":"plantUmlPng"==m?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
n&&"svg"==I?window.setTimeout(function(){b.spinner.stop();u(n,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(n,I,function(T,W,U){b.spinner.stop();u(n,I,T,W,U)},function(T){b.handleError(T)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(n,I,function(T,W,U){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(new mxRectangle(0,0,W,U));b.spinner.stop();var V=null;y.getModel().beginUpdate();try{V=y.insertVertex(null,null,null,x.x,x.y,W,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-T+";"),y.setAttributeForCell(V,"mermaidData",JSON.stringify({data:n,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=V&&(y.setSelectionCell(V),y.scrollCellToVisible(V))},function(T){b.handleError(T)}));else if("table"==p){p=null;for(var N=[],t=0,m={},F=0;F<C.length;F++){var J=mxUtils.trim(C[F]);if("primary key"==J.substring(0,11).toLowerCase()){var M=J.match(/\((.+)\)/);M&&M[1]&&(m[M[1]]=!0);C.splice(F,1)}else 0<J.toLowerCase().indexOf("primary key")&&(m[J.split(" ")[0]]=
-!0,C[F]=mxUtils.trim(J.replace(/primary key/i,"")))}for(F=0;F<C.length;F++)if(J=mxUtils.trim(C[F]),"create table"==J.substring(0,12).toLowerCase())J=mxUtils.trim(J.substring(12)),"("==J.charAt(J.length-1)&&(J=mxUtils.trim(J.substring(0,J.length-1))),p=new mxCell(J,new mxGeometry(t,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,N.push(p),J=b.editor.graph.getPreferredSizeForCell(H),null!=
-J&&(p.geometry.width=J.width+10);else if(null!=p&&")"==J.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=J&&null!=p){J=J.substring(0,","==J.charAt(J.length-1)?J.length-1:J.length);M=m[J.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var G=new mxCell(M?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));G.vertex=!0;H.insert(G);J=new mxCell(J,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));J.vertex=!0;H.insert(J);J=b.editor.graph.getPreferredSizeForCell(J);null!=J&&p.geometry.width<J.width+30&&(p.geometry.width=Math.min(320,
-Math.max(p.geometry.width,J.width+30)));p.insert(H,M?0:null);p.geometry.height+=30}0<N.length&&(y=b.editor.graph,x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),y.setSelectionCells(y.importCells(N,x.x,x.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==p){if(0<C.length){y=b.editor.graph;H=null;N=[];for(F=p=0;F<C.length;F++)";"!=C[F].charAt(0)&&(0==C[F].length?H=null:null==H?(H=new mxCell(C[F],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-H.vertex=!0,N.push(H),J=y.getPreferredSizeForCell(H),null!=J&&H.geometry.width<J.width+10&&(H.geometry.width=J.width+10),p+=H.geometry.width+40):"--"==C[F]?(J=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),J.vertex=!0,H.geometry.height+=J.geometry.height,H.insert(J)):0<C[F].length&&(t=new mxCell(C[F],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+295,212)},200):b.generatePlantUmlImage(n,I,function(T,W,U){b.spinner.stop();u(n,I,T,W,U)},function(T){b.handleError(T)})}}else if("mermaid"==m)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(n,I,function(T,W,U){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(new mxRectangle(0,0,W,U));b.spinner.stop();var V=null;y.getModel().beginUpdate();try{V=y.insertVertex(null,null,null,x.x,x.y,W,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+T+";"),y.setAttributeForCell(V,"mermaidData",JSON.stringify({data:n,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=V&&(y.setSelectionCell(V),y.scrollCellToVisible(V))},function(T){b.handleError(T)}));else if("table"==m){m=null;for(var N=[],t=0,p={},F=0;F<C.length;F++){var J=mxUtils.trim(C[F]);if("primary key"==J.substring(0,11).toLowerCase()){var M=J.match(/\((.+)\)/);M&&M[1]&&(p[M[1]]=!0);C.splice(F,1)}else 0<J.toLowerCase().indexOf("primary key")&&(p[J.split(" ")[0]]=
+!0,C[F]=mxUtils.trim(J.replace(/primary key/i,"")))}for(F=0;F<C.length;F++)if(J=mxUtils.trim(C[F]),"create table"==J.substring(0,12).toLowerCase())J=mxUtils.trim(J.substring(12)),"("==J.charAt(J.length-1)&&(J=mxUtils.trim(J.substring(0,J.length-1))),m=new mxCell(J,new mxGeometry(t,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,N.push(m),J=b.editor.graph.getPreferredSizeForCell(H),null!=
+J&&(m.geometry.width=J.width+10);else if(null!=m&&")"==J.charAt(0))t+=m.geometry.width+40,m=null;else if("("!=J&&null!=m){J=J.substring(0,","==J.charAt(J.length-1)?J.length-1:J.length);M=p[J.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var G=new mxCell(M?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));G.vertex=!0;H.insert(G);J=new mxCell(J,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));J.vertex=!0;H.insert(J);J=b.editor.graph.getPreferredSizeForCell(J);null!=J&&m.geometry.width<J.width+30&&(m.geometry.width=Math.min(320,
+Math.max(m.geometry.width,J.width+30)));m.insert(H,M?0:null);m.geometry.height+=30}0<N.length&&(y=b.editor.graph,x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),y.setSelectionCells(y.importCells(N,x.x,x.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==m){if(0<C.length){y=b.editor.graph;H=null;N=[];for(F=m=0;F<C.length;F++)";"!=C[F].charAt(0)&&(0==C[F].length?H=null:null==H?(H=new mxCell(C[F],new mxGeometry(m,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+H.vertex=!0,N.push(H),J=y.getPreferredSizeForCell(H),null!=J&&H.geometry.width<J.width+10&&(H.geometry.width=J.width+10),m+=H.geometry.width+40):"--"==C[F]?(J=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),J.vertex=!0,H.geometry.height+=J.geometry.height,H.insert(J)):0<C[F].length&&(t=new mxCell(C[F],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
t.vertex=!0,J=y.getPreferredSizeForCell(t),null!=J&&t.geometry.width<J.width&&(t.geometry.width=J.width),H.geometry.width=Math.max(H.geometry.width,t.geometry.width),H.geometry.height+=t.geometry.height,H.insert(t)));if(0<N.length){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0));y.getModel().beginUpdate();try{N=y.importCells(N,x.x,x.y);J=[];for(F=0;F<N.length;F++)J.push(N[F]),J=J.concat(N[F].children);y.fireEvent(new mxEventObject("cellsInserted","cells",J))}finally{y.getModel().endUpdate()}y.setSelectionCells(N);
y.scrollCellToVisible(y.getSelectionCell())}}}else{H=function(T){var W=E[T];null==W&&(W=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),W.vertex=!0,E[T]=W,N.push(W));return W};var E={};N=[];for(F=0;F<C.length;F++)if(";"!=C[F].charAt(0)){var P=C[F].split("->");2<=P.length&&(M=H(P[0]),G=H(P[P.length-1]),P=new mxCell(2<P.length?P[1]:"",new mxGeometry),P.edge=!0,M.insertEdge(P,!0),G.insertEdge(P,!1),N.push(P))}if(0<N.length){C=document.createElement("div");C.style.visibility="hidden";
-document.body.appendChild(C);y=new Graph(C);y.getModel().beginUpdate();try{N=y.importCells(N);for(F=0;F<N.length;F++)y.getModel().isVertex(N[F])&&(J=y.getPreferredSizeForCell(N[F]),N[F].geometry.width=Math.max(N[F].geometry.width,J.width),N[F].geometry.height=Math.max(N[F].geometry.height,J.height));F=!0;"horizontalFlow"==p||"verticalFlow"==p?((new mxHierarchicalLayout(y,"horizontalFlow"==p?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),N),F=!1):"circle"==p?
-(new mxCircleLayout(y)).execute(y.getDefaultParent()):(t=new mxFastOrganicLayout(y),t.disableEdgeStyle=!1,t.forceConstant=180,t.execute(y.getDefaultParent()));F&&(m=new mxParallelEdgeLayout(y),m.spacing=30,m.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();J=[];b.editor.graph.getModel().beginUpdate();try{N=y.getModel().getChildren(y.getDefaultParent()),x=mxEvent.isAltDown(z)?x:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),J=b.editor.graph.importCells(N,
+document.body.appendChild(C);y=new Graph(C);y.getModel().beginUpdate();try{N=y.importCells(N);for(F=0;F<N.length;F++)y.getModel().isVertex(N[F])&&(J=y.getPreferredSizeForCell(N[F]),N[F].geometry.width=Math.max(N[F].geometry.width,J.width),N[F].geometry.height=Math.max(N[F].geometry.height,J.height));F=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(y,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),N),F=!1):"circle"==m?
+(new mxCircleLayout(y)).execute(y.getDefaultParent()):(t=new mxFastOrganicLayout(y),t.disableEdgeStyle=!1,t.forceConstant=180,t.execute(y.getDefaultParent()));F&&(p=new mxParallelEdgeLayout(y),p.spacing=30,p.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();J=[];b.editor.graph.getModel().beginUpdate();try{N=y.getModel().getChildren(y.getDefaultParent()),x=mxEvent.isAltDown(z)?x:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),J=b.editor.graph.importCells(N,
x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",J))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(J);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();C.parentNode.removeChild(C)}}}function v(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==D.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==D.value||"plantUmlTxt"==D.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var x=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var B=document.createElement("textarea");B.style.boxSizing="border-box";B.style.resize=
@@ -11143,9 +11143,9 @@ x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",J))}
k&&(D.appendChild(K),K.setAttribute("selected","selected"));K=document.createElement("option");K.setAttribute("value","mermaid");mxUtils.write(K,mxResources.get("formatSql"));"mermaid"==k&&(D.appendChild(K),K.setAttribute("selected","selected"));K=document.createElement("option");K.setAttribute("value","diagram");mxUtils.write(K,mxResources.get("diagram"));var c=document.createElement("option");c.setAttribute("value","circle");mxUtils.write(c,mxResources.get("circle"));var e=document.createElement("option");
e.setAttribute("value","horizontalFlow");mxUtils.write(e,mxResources.get("horizontalFlow"));var g=document.createElement("option");g.setAttribute("value","verticalFlow");mxUtils.write(g,mxResources.get("verticalFlow"));"plantUml"!=k&&(D.appendChild(K),D.appendChild(c),D.appendChild(e),D.appendChild(g));K=document.createElement("option");K.setAttribute("value","plantUmlSvg");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&K.setAttribute("selected",
"selected");c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(D.appendChild(K),D.appendChild(c),D.appendChild(e));var q=v();B.value=q;f.appendChild(B);this.init=function(){B.focus()};
-Graph.fileSupport&&(B.addEventListener("dragover",function(n){n.stopPropagation();n.preventDefault()},!1),B.addEventListener("drop",function(n){n.stopPropagation();n.preventDefault();if(0<n.dataTransfer.files.length){n=n.dataTransfer.files[0];var p=new FileReader;p.onload=function(z){B.value=z.target.result};p.readAsText(n)}},!1));f.appendChild(D);mxEvent.addListener(D,"change",function(){var n=v();if(0==B.value.length||B.value==q)q=n,B.value=q});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(K=mxUtils.button(mxResources.get("help"),
+Graph.fileSupport&&(B.addEventListener("dragover",function(n){n.stopPropagation();n.preventDefault()},!1),B.addEventListener("drop",function(n){n.stopPropagation();n.preventDefault();if(0<n.dataTransfer.files.length){n=n.dataTransfer.files[0];var m=new FileReader;m.onload=function(z){B.value=z.target.result};m.readAsText(n)}},!1));f.appendChild(D);mxEvent.addListener(D,"change",function(){var n=v();if(0==B.value.length||B.value==q)q=n,B.value=q});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(K=mxUtils.button(mxResources.get("help"),
function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),K.className="geBtn",f.appendChild(K));K=mxUtils.button(mxResources.get("close"),function(){B.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});K.className="geBtn";b.editor.cancelFirst&&f.appendChild(K);c=mxUtils.button(mxResources.get("insert"),function(n){b.hideDialog();d(B.value,D.value,n)});f.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(K);this.container=f},NewDialog=function(b,f,k,d,v,x,B,D,K,c,e,g,q,n,p,z,C,u){function y(ja){null!=ja&&(Da=Ea=ja?135:140);ja=!0;if(null!=Ba)for(;E<Ba.length&&(ja||0!=mxUtils.mod(E,30));){var xa=Ba[E++];xa=t(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs);ja&&xa.click();ja=!1}}function I(){if(aa&&null!=n)k||b.hideDialog(),n(aa,Z,G.value);else if(d)k||b.hideDialog(),d(S,G.value,Y,O);else{var ja=G.value;null!=ja&&
+f.appendChild(K);this.container=f},NewDialog=function(b,f,k,d,v,x,B,D,K,c,e,g,q,n,m,z,C,u){function y(ja){null!=ja&&(Da=Ea=ja?135:140);ja=!0;if(null!=Ba)for(;E<Ba.length&&(ja||0!=mxUtils.mod(E,30));){var xa=Ba[E++];xa=t(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs);ja&&xa.click();ja=!1}}function I(){if(aa&&null!=n)k||b.hideDialog(),n(aa,Z,G.value);else if(d)k||b.hideDialog(),d(S,G.value,Y,O);else{var ja=G.value;null!=ja&&
0<ja.length&&b.pickFolder(b.mode,function(xa){b.createFile(ja,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,xa,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ja,xa,sa,da,ba,na,ea){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");T.removeAttribute("disabled");S=xa;O=sa;R=na;X=ja;aa=da;Y=ea;Z=ba;X.style.backgroundColor=D;X.style.border=K}function t(ja,xa,sa,da,ba,na,ea,ha,
oa,ma,va){function Ca(Ka,Ta){null==Ha?(Ma=Ka,Ma=/^https?:\/\//.test(Ma)&&!b.editor.isCorsEnabledForUrl(Ma)?PROXY_URL+"?url="+encodeURIComponent(Ma):TEMPLATE_PATH+"/"+Ma,mxUtils.get(Ma,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,Ma)}))):Ta(Ha,Ma)}function ya(Ka,Ta,Va){if(null!=Ka&&mxUtils.isAncestorNode(document.body,pa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Wa=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel;
Wa.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(pa,Ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=sa?mxResources.get(sa,null,sa):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;N(pa,null,null,ja,ea,va)},!0,!1)}}function ta(Ka,Ta){null==ja||Ra||
@@ -11157,7 +11157,7 @@ da.setAttribute("width","100%");da.setAttribute("height","100%");da.style.backgr
"3px";Na.style.background="rgba(255,255,255,0.85)";Na.style.overflow="hidden";Na.style.textOverflow="ellipsis";Na.style.maxWidth=Da-34+"px";mxUtils.write(Na,mxResources.get(sa,null,sa));ma.appendChild(Na);oa.appendChild(ma);na.appendChild(oa);da.appendChild(na);pa.appendChild(da)}mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else da=document.createElement("table"),da.setAttribute("width",
"100%"),da.setAttribute("height","100%"),da.style.lineHeight="1.3em",na=document.createElement("tbody"),oa=document.createElement("tr"),ma=document.createElement("td"),ma.setAttribute("align","center"),ma.setAttribute("valign","middle"),Na=document.createElement("span"),Na.style.display="inline-block",Na.style.padding="4px 8px 4px 8px",Na.style.userSelect="none",Na.style.borderRadius="3px",Na.style.background="#ffffff",Na.style.overflow="hidden",Na.style.textOverflow="ellipsis",Na.style.maxWidth=
Da-34+"px",mxUtils.write(Na,mxResources.get(sa,null,sa)),ma.appendChild(Na),oa.appendChild(ma),na.appendChild(oa),da.appendChild(na),pa.appendChild(da),ba&&N(pa),mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ja,ea)}),null,null),null!=ha?mxEvent.addListener(pa,"click",ha):(mxEvent.addListener(pa,"click",function(Ka){N(pa,null,null,ja,ea)}),mxEvent.addListener(pa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ja){var Sa=document.createElement("img");Sa.setAttribute("src",
-Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";pa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==pa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ta(Ka,Sa);mxEvent.consume(Ka)}))}ca.appendChild(pa);return pa}function m(){function ja(ta,
+Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";pa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==pa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ta(Ka,Sa);mxEvent.consume(Ka)}))}ca.appendChild(pa);return pa}function p(){function ja(ta,
pa){var Ha=mxResources.get(ta);null==Ha&&(Ha=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+pa.length+")"}function xa(ta,pa,Ha){mxEvent.addListener(pa,"click",function(){ra!=pa&&(ra.style.backgroundColor="",ra=pa,ra.style.backgroundColor=B,ca.scrollTop=0,ca.innerText="",E=0,Ba=Ha?Oa[ta][Ha]:za[ta],U=null,y(!1))})}Ia&&(Ia=!1,mxEvent.addListener(ca,"scroll",function(ta){ca.scrollTop+ca.clientHeight>=ca.scrollHeight&&(y(),mxEvent.consume(ta))}));
if(0<Ga){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));ka.appendChild(sa);for(var da in Aa){var ba=document.createElement("div"),na=da;sa=Aa[da];18<na.length&&(na=na.substring(0,18)+"&hellip;");ba.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ba.setAttribute("title",
na+" ("+sa.length+")");mxUtils.write(ba,ba.getAttribute("title"));null!=c&&(ba.style.padding=c);ka.appendChild(ba);(function(ta,pa){mxEvent.addListener(ba,"click",function(){ra!=pa&&(ra.style.backgroundColor="",ra=pa,ra.style.backgroundColor=B,ca.scrollTop=0,ca.innerText="",E=0,Ba=Aa[ta],U=null,y(!1))})})(da,ba)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");ka.appendChild(sa)}for(da in za){na=
@@ -11169,9 +11169,9 @@ IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo
b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var G=document.createElement("input");G.setAttribute("value",b.defaultFilename+H);G.style.marginLeft="10px";G.style.width=f||
F?"144px":"244px";this.init=function(){k&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null));null!=ca.parentNode&&null!=ca.parentNode.parentNode&&mxEvent.addGestureListeners(ca.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};k&&(M.appendChild(G),u?G.style.width=f||F?"350px":"450px":(null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),u.style.marginLeft=
"6px",u.style.width=f||F?"80px":"180px",M.appendChild(u)),null!=b.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(b,G,b.editor.fileExtensions),F.style.marginTop="12px",M.appendChild(F))));M=!1;var E=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),T=mxUtils.button(z||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");I();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn";
-if(g||q){var W=[],U=null,V=null,l=null,A=function(ja){T.setAttribute("disabled","disabled");for(var xa=0;xa<W.length;xa++)W[xa].className=xa==ja?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";J.appendChild(z);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ka.style.display="";fa.style.display="";ca.style.left="160px";A(0);ca.scrollTop=0;ca.innerText="";E=0;U!=Ba&&(Ba=U,za=V,Ga=l,ka.innerText="",m(),U=null)});
+if(g||q){var W=[],U=null,V=null,l=null,A=function(ja){T.setAttribute("disabled","disabled");for(var xa=0;xa<W.length;xa++)W[xa].className=xa==ja?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";J.appendChild(z);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ka.style.display="";fa.style.display="";ca.style.left="160px";A(0);ca.scrollTop=0;ca.innerText="";E=0;U!=Ba&&(Ba=U,za=V,Ga=l,ka.innerText="",p(),U=null)});
W.push(F);z.appendChild(F);var L=function(ja){ka.style.display="none";fa.style.display="none";ca.style.left="30px";A(ja?-1:1);null==U&&(U=Ba);ca.scrollTop=0;ca.innerText="";P.spin(ca);var xa=function(sa,da,ba){E=0;P.stop();Ba=sa;ba=ba||{};var na=0,ea;for(ea in ba)na+=ba[ea].length;if(da)ca.innerText=da;else if(0==sa.length&&0==na)ca.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ca.innerText="",0<na){ka.style.display="";ca.style.left="160px";ka.innerText="";Ga=0;za={"draw.io":sa};
-for(ea in ba)za[ea]=ba[ea];m()}else y(!0)};ja?q(Q.value,xa):g(xa)};g&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),z.appendChild(F),W.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+":";z.appendChild(F);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ja){13==ja.keyCode&&L(!0)});z.appendChild(Q);F=mxUtils.button(mxResources.get("search"),
+for(ea in ba)za[ea]=ba[ea];p()}else y(!0)};ja?q(Q.value,xa):g(xa)};g&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),z.appendChild(F),W.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+":";z.appendChild(F);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ja){13==ja.keyCode&&L(!0)});z.appendChild(Q);F=mxUtils.button(mxResources.get("search"),
function(){L(!0)});F.className="geBtn";z.appendChild(F)}A(0)}var O=null,R=null,S=null,X=null,aa=null,Y=null,Z=null,ca=document.createElement("div");ca.style.border="1px solid #d3d3d3";ca.style.position="absolute";ca.style.left="160px";ca.style.right="34px";z=(k?72:40)+(M?30:0);ca.style.top=z+"px";ca.style.bottom="68px";ca.style.margin="6px 0 0 -1px";ca.style.padding="6px";ca.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+
z+"px;height:22px;margin-top: 6px;white-space: nowrap";var la=document.createElement("input");la.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";la.setAttribute("placeholder",mxResources.get("search"));la.setAttribute("type","text");fa.appendChild(la);var ia=document.createElement("img"),qa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ia.setAttribute("src",qa);ia.setAttribute("title",mxResources.get("search"));
ia.style.position="relative";ia.style.left="-18px";ia.style.top="1px";ia.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(ia);mxEvent.addListener(ia,"click",function(){ia.getAttribute("src")==Dialog.prototype.closeImage&&(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search")),la.value="",null!=ua&&(ua.click(),ua=null));la.focus()});mxEvent.addListener(la,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var xa=la.value;if(""==xa)null!=ua&&(ua.click(),
@@ -11180,19 +11180,19 @@ ea[ha].toLowerCase();null==sa[ma]&&(sa[ma]=[]);sa[ma].push(na)}sa.__tagsList__=!
"resultsFor",[xa]));ca.appendChild(sa);null!=ra&&null==ua&&(ra.style.backgroundColor="",ua=ra,ra=sa);Ba=va;U=null;y(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(la,"keyup",mxUtils.bind(this,function(ja){""==la.value?(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search"))):(ia.setAttribute("src",Dialog.prototype.closeImage),ia.setAttribute("title",mxResources.get("reset")))}));z+=23;var ka=document.createElement("div");ka.style.cssText="position:absolute;left:30px;width:128px;top:"+
z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ca,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,Ea=140,za={},Oa={},Aa={},Ga=0,Ia=!0,ra=null,ua=null;za.basic=[{title:"blankDiagram",select:!0}];var Ba=za.basic;if(!f){var Fa=function(){mxUtils.get(La,function(ja){if(!wa){wa=!0;ja=ja.getXml().documentElement.firstChild;for(var xa={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var sa=ja.getAttribute("name"),da=
ja.getElementsByTagName("add"),ba=[],na=0;na<da.length;na++)ba.push(encodeURIComponent(mxUtils.getTextContent(da[na])));null!=sa&&0<ba.length&&(xa[sa]=ba.join(";"))}else if(ba=ja.getAttribute("url"),null!=ba){da=ja.getAttribute("section");sa=ja.getAttribute("subsection");if(null==da&&(na=ba.indexOf("/"),da=ba.substring(0,na),null==sa)){var ea=ba.indexOf("/",na+1);-1<ea&&(sa=ba.substring(na+1,ea))}na=za[da];null==na&&(na=[],za[da]=na);ba=ja.getAttribute("clibs");null!=xa[ba]&&(ba=xa[ba]);ba={url:ja.getAttribute("url"),
-libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:ba,tags:ja.getAttribute("tags")};na.push(ba);null!=sa&&(na=Oa[da],null==na&&(na={},Oa[da]=na),da=na[sa],null==da&&(da=[],na[sa]=da),da.push(ba))}ja=ja.nextSibling}P.stop();m()}})};J.appendChild(fa);J.appendChild(ka);J.appendChild(ca);var wa=!1,La=e;/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)&&(La=PROXY_URL+"?url="+encodeURIComponent(La));
+libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:ba,tags:ja.getAttribute("tags")};na.push(ba);null!=sa&&(na=Oa[da],null==na&&(na={},Oa[da]=na),da=na[sa],null==da&&(da=[],na[sa]=da),da.push(ba))}ja=ja.nextSibling}P.stop();p()}})};J.appendChild(fa);J.appendChild(ka);J.appendChild(ca);var wa=!1,La=e;/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)&&(La=PROXY_URL+"?url="+encodeURIComponent(La));
P.spin(ca);null!=C?C(function(ja,xa){Aa=ja;l=Ga=xa;Fa()},Fa):Fa();V=za}mxEvent.addListener(G,"keypress",function(ja){b.dialog.container.firstChild==J&&13==ja.keyCode&&I()});C=document.createElement("div");C.style.marginTop=f?"4px":"16px";C.style.textAlign="right";C.style.position="absolute";C.style.left="40px";C.style.bottom="24px";C.style.right="40px";f||b.isOffline()||!k||null!=d||v||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
z.className="geBtn",C.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=x&&x();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||v&&null==x||C.appendChild(z);f||"1"==urlParams.embed||v||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(xa,function(sa){S=sa;O=null;templateRealURl=
-xa;b.hideDialog();I()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),f.className="geBtn",C.appendChild(f));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(xa){b.openFiles(ja.files,!0);ja.value=""});ja.style.display=
-"none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),p.className="geBtn",C.appendChild(p));C.appendChild(T);b.editor.cancelFirst||null!=d||v&&null==x||C.appendChild(z);J.appendChild(C);this.container=J};NewDialog.tagsList={};
-var CreateDialog=function(b,f,k,d,v,x,B,D,K,c,e,g,q,n,p,z,C){function u(M,H,G,E){function P(){mxEvent.addListener(T,"click",function(){var A=G;if(B){var L=N.value,Q=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){A=null!=A?A:J.value;var O="";A==App.MODE_GOOGLE?O=b.drive.extension:A==App.MODE_GITHUB?O=b.gitHub.extension:A==App.MODE_GITLAB?O=b.gitLab.extension:A==App.MODE_TRELLO?O=b.trello.extension:A==App.MODE_DROPBOX?O=b.dropbox.extension:A==App.MODE_ONEDRIVE?O=b.oneDrive.extension:A==App.MODE_DEVICE&&
+xa;b.hideDialog();I()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),f.className="geBtn",C.appendChild(f));Graph.fileSupport&&m&&(m=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(xa){b.openFiles(ja.files,!0);ja.value=""});ja.style.display=
+"none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),m.className="geBtn",C.appendChild(m));C.appendChild(T);b.editor.cancelFirst||null!=d||v&&null==x||C.appendChild(z);J.appendChild(C);this.container=J};NewDialog.tagsList={};
+var CreateDialog=function(b,f,k,d,v,x,B,D,K,c,e,g,q,n,m,z,C){function u(M,H,G,E){function P(){mxEvent.addListener(T,"click",function(){var A=G;if(B){var L=N.value,Q=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){A=null!=A?A:J.value;var O="";A==App.MODE_GOOGLE?O=b.drive.extension:A==App.MODE_GITHUB?O=b.gitHub.extension:A==App.MODE_GITLAB?O=b.gitLab.extension:A==App.MODE_TRELLO?O=b.trello.extension:A==App.MODE_DROPBOX?O=b.dropbox.extension:A==App.MODE_ONEDRIVE?O=b.oneDrive.extension:A==App.MODE_DEVICE&&
(O=".drawio");0<=Q&&(L=L.substring(0,Q));N.value=L+O}}y(G)})}var T=document.createElement("a");T.style.overflow="hidden";var W=document.createElement("img");W.src=M;W.setAttribute("border","0");W.setAttribute("align","absmiddle");W.style.width="60px";W.style.height="60px";W.style.paddingBottom="6px";T.style.display="inline-block";T.className="geBaseButton";T.style.position="relative";T.style.margin="4px";T.style.padding="8px 8px 10px 8px";T.style.whiteSpace="nowrap";T.appendChild(W);T.style.color=
"gray";T.style.fontSize="11px";var U=document.createElement("div");T.appendChild(U);mxUtils.write(U,H);if(null!=E&&null==b[E]){W.style.visibility="hidden";mxUtils.setOpacity(U,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(T);var l=window.setTimeout(function(){null==b[E]&&(V.stop(),T.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[E]&&(window.clearTimeout(l),
-mxUtils.setOpacity(U,100),W.style.visibility="",V.stop(),P())}))}else P();m.appendChild(T);++F==g&&(mxUtils.br(m),F=0)}function y(M){var H=N.value;if(null==M||null!=H&&0<H.length)C&&b.hideDialog(),k(H,M,N)}e="1"==urlParams.noDevice?!1:e;B=null!=B?B:!0;D=null!=D?D:!0;g=null!=g?g:4;C=null!=C?C:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var I=document.createElement("h2");mxUtils.write(I,v||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
+mxUtils.setOpacity(U,100),W.style.visibility="",V.stop(),P())}))}else P();p.appendChild(T);++F==g&&(mxUtils.br(p),F=0)}function y(M){var H=N.value;if(null==M||null!=H&&0<H.length)C&&b.hideDialog(),k(H,M,N)}e="1"==urlParams.noDevice?!1:e;B=null!=B?B:!0;D=null!=D?D:!0;g=null!=g?g:4;C=null!=C?C:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var I=document.createElement("h2");mxUtils.write(I,v||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
"24px";x.appendChild(I);mxUtils.write(x,mxResources.get("filename")+":");var N=document.createElement("input");N.setAttribute("value",f);N.style.width="200px";N.style.marginLeft="10px";N.style.marginBottom="20px";N.style.maxWidth="70%";this.init=function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};x.appendChild(N);null!=z&&(null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),
-v.style.marginLeft="6px",v.style.width="90px",x.appendChild(v)),x.appendChild(FilenameDialog.createTypeHint(b,N,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";v=document.createElement("img");var t=p?q:btoa(unescape(encodeURIComponent(q)));v.setAttribute("src","data:"+n+";base64,"+t);v.style.position="absolute";v.style.top="70px";v.style.right="100px";v.style.maxWidth="120px";v.style.maxHeight=
+v.style.marginLeft="6px",v.style.width="90px",x.appendChild(v)),x.appendChild(FilenameDialog.createTypeHint(b,N,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";v=document.createElement("img");var t=m?q:btoa(unescape(encodeURIComponent(q)));v.setAttribute("src","data:"+n+";base64,"+t);v.style.position="absolute";v.style.top="70px";v.style.right="100px";v.style.maxWidth="120px";v.style.maxHeight=
"80px";mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)");x.appendChild(v);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=n||(z=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(t,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+n+";base64,"+t+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
-z.style.marginTop="6px",z.className="geBtn");K&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(M){mxEvent.isPopupTrigger(M)||y("_blank")}))}mxUtils.br(x);var m=document.createElement("div");m.style.textAlign="center";var F=0;m.style.marginTop="6px";x.appendChild(m);var J=document.createElement("select");J.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
+z.style.marginTop="6px",z.className="geBtn");K&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(M){mxEvent.isPopupTrigger(M)||y("_blank")}))}mxUtils.br(x);var p=document.createElement("div");p.style.textAlign="center";var F=0;p.style.marginTop="6px";x.appendChild(p);var J=document.createElement("select");J.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),J.appendChild(q),u(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),J.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),u(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),J.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),u(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),J.appendChild(q),u(IMAGE_PATH+
"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),J.appendChild(q),u(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),J.appendChild(q),u(IMAGE_PATH+"/trello-logo.svg",
@@ -11204,28 +11204,28 @@ var PopupDialog=function(b,f,k,d,v){v=null!=v?v:!0;var x=document.createElement(
null!=k&&k();b.openLink(f,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=B.style.width;x.appendChild(D);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,f,k,d,v,x,B,D){function K(){0<g.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}x=null!=x?x:!0;var c=b.editor.graph,e=document.createElement("div");mxUtils.write(e,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",k);g.setAttribute("type","text");g.setAttribute("spellcheck","false");g.setAttribute("autocorrect","off");g.setAttribute("autocomplete","off");g.setAttribute("autocapitalize","off");g.style.marginTop="6px";g.style.width=(Graph.fileSupport?460:340)-20+"px";g.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});
-f.appendChild(g);f.appendChild(k);e.appendChild(f);var q=D,n,p,z=function(I,N,t,m){var F="data:"==I.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(J){b.spinner.stop();b.hideDialog();var M=!1===m?1:null!=N&&null!=t?Math.max(N/J.width,t/J.height):Math.min(1,Math.min(520/J.width,520/J.height));x&&(I=b.convertDataUri(I));d(I,Math.round(Number(J.width)*M),Math.round(Number(J.height)*M),q,n,p)},
-function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(I,null,null,q,n,p)):(I=b.convertDataUri(I),N=null==N?120:N,t=null==t?100:t,b.hideDialog(),d(I,N,t,q,n,p))},C=function(I,N){if(null!=I){var t=v?null:c.getModel().getGeometry(c.getSelectionCell());null!=t?z(I,t.width,t.height,N):z(I,null,null,N)}else b.hideDialog(),d(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",
+f.appendChild(g);f.appendChild(k);e.appendChild(f);var q=D,n,m,z=function(I,N,t,p){var F="data:"==I.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(J){b.spinner.stop();b.hideDialog();var M=!1===p?1:null!=N&&null!=t?Math.max(N/J.width,t/J.height):Math.min(1,Math.min(520/J.width,520/J.height));x&&(I=b.convertDataUri(I));d(I,Math.round(Number(J.width)*M),Math.round(Number(J.height)*M),q,n,m)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(I,null,null,q,n,m)):(I=b.convertDataUri(I),N=null==N?120:N,t=null==t?100:t,b.hideDialog(),d(I,N,t,q,n,m))},C=function(I,N){if(null!=I){var t=v?null:c.getModel().getGeometry(c.getSelectionCell());null!=t?z(I,t.width,t.height,N):z(I,null,null,N)}else b.hideDialog(),d(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",
mxResources.get("dragImagesHere"));var I=e.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<t.dataTransfer.files.length)b.importFiles(t.dataTransfer.files,
-0,0,b.maxImageSize,function(F,J,M,H,G,E,P,T){C(F,T)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var J=0;J<F.length;J++)F[J]()},!mxEvent.isControlDown(t),null,null,!0);else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")){var m=t.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(m)&&C(decodeURIComponent(m))}t.stopPropagation();t.preventDefault()}),!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign=
+0,0,b.maxImageSize,function(F,J,M,H,G,E,P,T){C(F,T)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var J=0;J<F.length;J++)F[J]()},!mxEvent.isControlDown(t),null,null,!0);else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")){var p=t.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(p)&&C(decodeURIComponent(p))}t.stopPropagation();t.preventDefault()}),!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign=
"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&D.appendChild(k);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(g.value=I.url));g.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type",
-"file");mxEvent.addListener(u,"change",function(I){null!=u.files&&(b.importFiles(u.files,0,0,b.maxImageSize,function(N,t,m,F,J,M){C(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var t=0;t<N.length;t++)N[t]()},!0),u.type="",u.type="file",u.value="")});u.style.display="none";document.body.appendChild(u);b.imgDlgFileInputElt=u}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";D.appendChild(f)}mxEvent.addListener(g,
-"keypress",function(I){13==I.keyCode&&C(g.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,q,function(N,t,m){q=N;n=t;p=m});b.showDialog(I.container,300,390,!0,!0)});B&&(y.className="geBtn",D.appendChild(y));mxEvent.addListener(g,"change",function(I){q=null;K()});K();B=mxUtils.button(mxResources.get("apply"),function(){C(g.value)});B.className="geBtn gePrimaryBtn";D.appendChild(B);b.editor.cancelFirst||D.appendChild(k);Graph.fileSupport&&(D.style.marginTop=
+"file");mxEvent.addListener(u,"change",function(I){null!=u.files&&(b.importFiles(u.files,0,0,b.maxImageSize,function(N,t,p,F,J,M){C(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var t=0;t<N.length;t++)N[t]()},!0),u.type="",u.type="file",u.value="")});u.style.display="none";document.body.appendChild(u);b.imgDlgFileInputElt=u}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";D.appendChild(f)}mxEvent.addListener(g,
+"keypress",function(I){13==I.keyCode&&C(g.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,q,function(N,t,p){q=N;n=t;m=p});b.showDialog(I.container,300,390,!0,!0)});B&&(y.className="geBtn",D.appendChild(y));mxEvent.addListener(g,"change",function(I){q=null;K()});K();B=mxUtils.button(mxResources.get("apply"),function(){C(g.value)});B.className="geBtn gePrimaryBtn";D.appendChild(B);b.editor.cancelFirst||D.appendChild(k);Graph.fileSupport&&(D.style.marginTop=
"120px",e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",e.style.backgroundPosition="center 65%",e.style.backgroundRepeat="no-repeat",B=document.createElement("div"),B.style.position="absolute",B.style.width="420px",B.style.top="58%",B.style.textAlign="center",B.style.fontSize="18px",B.style.color="#a0c3ff",mxUtils.write(B,mxResources.get("dragImagesHere")),e.appendChild(B));e.appendChild(D);this.container=e},LinkDialog=function(b,f,k,d,v,x,B){function D(I,N,t){t=mxUtils.button("",t);
t.className="geBtn";t.setAttribute("title",N);N=document.createElement("img");N.style.height="26px";N.style.width="26px";N.setAttribute("src",I);t.style.minWidth="42px";t.style.verticalAlign="middle";t.appendChild(N);y.appendChild(t)}var K=document.createElement("div");K.style.height="100%";mxUtils.write(K,mxResources.get("editLink")+":");var c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow=
"clip";c.style.cursor="default";c.style.paddingRight="20px";var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="97%";e.style.boxSizing="border-box";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";e.style.marginBottom="4px";var g=document.createElement("div");g.setAttribute("title",
mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){e.value="";e.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");
-var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=B&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);B=null!=B?B:"_blank";z.setAttribute("title",B);x&&(e.style.width="340px");if(v&&
+var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=B&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);B=null!=B?B:"_blank";z.setAttribute("title",B);x&&(e.style.width="340px");if(v&&
null!=b.pages){null!=f&&Graph.isPageLink(f)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(e.setAttribute("value",f),q.setAttribute("checked","checked"),q.defaultChecked=!0);c.appendChild(q);c.appendChild(e);c.appendChild(g);x&&(c.appendChild(z),mxUtils.write(c,mxResources.get("openInNewWindow")));mxUtils.br(c);c.appendChild(n);v=!1;for(x=0;x<b.pages.length;x++)g=document.createElement("option"),mxUtils.write(g,b.pages[x].getName()||mxResources.get("pageWithNumber",[x+1])),g.setAttribute("value",
-"data:page/id,"+b.pages[x].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),v=!0),p.appendChild(g);if(!v&&n.checked){var C=document.createElement("option");mxUtils.write(C,mxResources.get("pageNotFound"));C.setAttribute("disabled","disabled");C.setAttribute("selected","selected");C.setAttribute("value","pageNotFound");p.appendChild(C);mxEvent.addListener(p,"change",function(){null==C.parentNode||C.selected||C.parentNode.removeChild(C)})}c.appendChild(p)}else e.setAttribute("value",
-f),c.appendChild(e),c.appendChild(g);K.appendChild(c);var u=mxUtils.button(k,function(){b.hideDialog();d(n.checked?"pageNotFound"!==p.value?p.value:f:e.value,LinkDialog.selectedDocs,z.checked?B:null)});u.style.verticalAlign="middle";u.className="geBtn gePrimaryBtn";this.init=function(){n.checked?p.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked",
+"data:page/id,"+b.pages[x].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),v=!0),m.appendChild(g);if(!v&&n.checked){var C=document.createElement("option");mxUtils.write(C,mxResources.get("pageNotFound"));C.setAttribute("disabled","disabled");C.setAttribute("selected","selected");C.setAttribute("value","pageNotFound");m.appendChild(C);mxEvent.addListener(m,"change",function(){null==C.parentNode||C.selected||C.parentNode.removeChild(C)})}c.appendChild(m)}else e.setAttribute("value",
+f),c.appendChild(e),c.appendChild(g);K.appendChild(c);var u=mxUtils.button(k,function(){b.hideDialog();d(n.checked?"pageNotFound"!==m.value?m.value:f:e.value,LinkDialog.selectedDocs,z.checked?B:null)});u.style.verticalAlign="middle";u.className="geBtn gePrimaryBtn";this.init=function(){n.checked?m.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(m,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked",
"checked");n.checked=!0});mxEvent.addListener(e,"focus",function(){n.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var I=K.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()}));
mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(t.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,u.click());t.stopPropagation();t.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
k.style.verticalAlign="middle";k.className="geBtn";y.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var N=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?N="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(N="https://drive.google.com/#folders/"+I.docs[0].id);e.value=N;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(N){LinkDialog.filePicked(N)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){e.value=I[0].link;e.focus()}})});null!=b.oneDrive&&D(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(I,N){e.value=N.value[0].webUrl;e.focus()},!0)});null!=b.gitHub&&D(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var N=I[0],t=I[1],m=I[2];I=I.slice(3,I.length).join("/");e.value="https://github.com/"+N+"/"+t+"/blob/"+m+"/"+I;e.focus()}})});null!=b.gitLab&&D(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var N=
-I[0],t=I[1],m=I[2];I=I.slice(3,I.length).join("/");e.value=DRAWIO_GITLAB_URL+"/"+N+"/"+t+"/blob/"+m+"/"+I;e.focus()}})});mxEvent.addListener(e,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),d(n.checked?p.value:e.value,LinkDialog.selectedDocs))});y.appendChild(u);b.editor.cancelFirst||y.appendChild(k);K.appendChild(y);this.container=K},FeedbackDialog=function(b,f,k,d){var v=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize=
+function(){b.oneDrive.pickFile(function(I,N){e.value=N.value[0].webUrl;e.focus()},!0)});null!=b.gitHub&&D(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var N=I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");e.value="https://github.com/"+N+"/"+t+"/blob/"+p+"/"+I;e.focus()}})});null!=b.gitLab&&D(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var N=
+I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");e.value=DRAWIO_GITLAB_URL+"/"+N+"/"+t+"/blob/"+p+"/"+I;e.focus()}})});mxEvent.addListener(e,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),d(n.checked?m.value:e.value,LinkDialog.selectedDocs))});y.appendChild(u);b.editor.cancelFirst||y.appendChild(k);K.appendChild(y);this.container=K},FeedbackDialog=function(b,f,k,d){var v=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize=
"18px";x.style.marginBottom="18px";v.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));v.appendChild(x);var B=document.createElement("input");B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var g=e.value+(c.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;g.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(B.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
":\n"+g),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className="geBtn gePrimaryBtn";if(!k){D.setAttribute("disabled","disabled");var K=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(B,
@@ -11235,46 +11235,46 @@ v.appendChild(e);k=document.createElement("div");k.style.marginTop="26px";k.styl
var RevisionDialog=function(b,f,k){var d=document.createElement("div"),v=document.createElement("h3");v.style.marginTop="0px";mxUtils.write(v,mxResources.get("revisionHistory"));d.appendChild(v);v=document.createElement("div");v.style.position="absolute";v.style.overflow="auto";v.style.width="170px";v.style.height="378px";d.appendChild(v);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.left="199px";x.style.width="470px";x.style.height="376px";
x.style.overflow="hidden";var B=document.createElement("div");B.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";x.appendChild(B);mxEvent.disableContextMenu(x);d.appendChild(x);var D=new Graph(x);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var K=0,c=null,e=0,g=D.getGlobalVariable;
D.getGlobalVariable=function(X){return"page"==X&&null!=c&&null!=c[e]?c[e].getAttribute("name"):"pagenumber"==X?e+1:"pagecount"==X?null!=c?c.length:1:g.apply(this,arguments)};D.getLinkForCell=function(){return null};Editor.MathJaxRender&&D.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(D.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},n=new Spinner(q),p=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),C={};for(q=0;q<z.length;q++)C[z[q].getAttribute("id")]=z[q];var u=null,y=null,I=null,N=null,t=mxUtils.button("",function(){null!=I&&D.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");
-mxUtils.setOpacity(t,20);var m=mxUtils.button("",function(){null!=I&&D.zoomOut()});m.className="geSprite geSprite-zoomout";m.setAttribute("title",mxResources.get("zoomOut"));m.style.outline="none";m.style.border="none";m.style.margin="2px";m.setAttribute("disabled","disabled");mxUtils.setOpacity(m,20);var F=mxUtils.button("",function(){null!=I&&(D.maxFitScale=8,D.fit(8),D.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border=
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},n=new Spinner(q),m=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),C={};for(q=0;q<z.length;q++)C[z[q].getAttribute("id")]=z[q];var u=null,y=null,I=null,N=null,t=mxUtils.button("",function(){null!=I&&D.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");
+mxUtils.setOpacity(t,20);var p=mxUtils.button("",function(){null!=I&&D.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border="none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var F=mxUtils.button("",function(){null!=I&&(D.maxFitScale=8,D.fit(8),D.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border=
"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var J=mxUtils.button("",function(){null!=I&&(D.zoomActual(),D.center())});J.className="geSprite geSprite-actualsize";J.setAttribute("title",mxResources.get("actualSize"));J.style.outline="none";J.style.border="none";J.style.margin="2px";J.setAttribute("disabled","disabled");mxUtils.setOpacity(J,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare"));
M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var H=x.cloneNode(!1);H.style.pointerEvent="none";x.parentNode.appendChild(H);var G=new Graph(H);G.setTooltips(!1);G.setEnabled(!1);G.setPanning(!0);G.panningHandler.ignoreCell=!0;G.panningHandler.useLeftButtonForPanning=!0;G.minFitScale=null;G.maxFitScale=null;G.centerZoom=!0;mxEvent.addGestureListeners(M,function(X){X=C[c[K].getAttribute("id")];mxUtils.setOpacity(M,20);B.innerText="";null==X?mxUtils.write(B,
mxResources.get("pageNotFound")):(E.style.display="none",x.style.display="none",H.style.display="",H.style.backgroundColor=x.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,G.getModel()),G.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);B.innerText="";"none"==x.style.display&&(E.style.display="",x.style.display="",H.style.display="none")});var E=document.createElement("div");E.style.position=
"absolute";E.style.textAlign="right";E.style.color="gray";E.style.marginTop="10px";E.style.backgroundColor="transparent";E.style.top="440px";E.style.right="32px";E.style.maxWidth="380px";E.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var X=mxUtils.getXml(I.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(X){null!=I&&null!=N&&(mxEvent.isShiftDown(X)?null!=I&&(X=b.getPagesForNode(I.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(aa)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(N):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(aa){b.spinner.stop();b.replaceFileData(N);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(X){null!=I&&null!=N&&(mxEvent.isShiftDown(X)?null!=I&&(X=b.getPagesForNode(I.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){m.patch([JSON.parse(aa)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(N):b.spinner.spin(document.body,mxResources.get("restoring"))&&m.save(!0,function(aa){b.spinner.stop();b.replaceFileData(N);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
T.className="geBtn";T.setAttribute("disabled","disabled");T.setAttribute("title","Shift+Click for Diff");var W=document.createElement("select");W.setAttribute("disabled","disabled");W.style.maxWidth="80px";W.style.position="relative";W.style.top="-2px";W.style.verticalAlign="bottom";W.style.marginRight="6px";W.style.display="none";var U=null;mxEvent.addListener(W,"change",function(X){null!=U&&(U(X),mxEvent.consume(X))});var V=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});V.className="geBtn";V.setAttribute("disabled","disabled");null!=k&&(V.style.display="none");var l=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(W.selectedIndex))});l.className="geBtn gePrimaryBtn";l.setAttribute("disabled","disabled");null!=k&&(l.style.display="none",T.className="geBtn gePrimaryBtn");z=document.createElement("div");
z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var A=document.createElement("div");A.className="geToolbarContainer";A.style.backgroundColor="transparent";A.style.padding="2px";A.style.border="none";A.style.left="199px";A.style.top="442px";var L=null;if(null!=f&&0<f.length){x.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";
var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(K=mxUtils.indexOf(b.pages,b.currentPage));for(q=f.length-1;0<=q;q--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){n.stop();B.innerText="";var la=mxUtils.parseXml(fa),ia=b.editor.extractGraphModel(la.documentElement,!0);if(null!=ia){var qa=function(Da){null!=Da&&(Da=ka(Editor.parseDiagramNode(Da)));return Da},ka=function(Da){var Ea=Da.getAttribute("background");
if(null==Ea||""==Ea||Ea==mxConstants.NONE)Ea=D.defaultPageBackgroundColor;x.style.backgroundColor=Ea;(new mxCodec(Da.ownerDocument)).decode(Da,D.getModel());D.maxFitScale=1;D.fit(8);D.center();return Da};W.style.display="none";W.innerText="";I=la;N=fa;c=parseSelectFunction=null;e=0;if("mxfile"==ia.nodeName){la=ia.getElementsByTagName("diagram");c=[];for(fa=0;fa<la.length;fa++)c.push(la[fa]);e=Math.min(K,c.length-1);0<c.length&&qa(c[e]);if(1<c.length)for(W.removeAttribute("disabled"),W.style.display=
"",fa=0;fa<c.length;fa++)la=document.createElement("option"),mxUtils.write(la,c[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),la.setAttribute("value",fa),fa==e&&la.setAttribute("selected","selected"),W.appendChild(la);U=function(){try{var Da=parseInt(W.value);e=K=Da;qa(c[Da])}catch(Ea){W.value=K,b.handleError(Ea)}}}else ka(ia);fa=X.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");E.innerText="";mxUtils.write(E,(null!=fa?fa+" ":"")+aa.toLocaleDateString()+
-" "+aa.toLocaleTimeString());E.setAttribute("title",Y.getAttribute("title"));t.removeAttribute("disabled");m.removeAttribute("disabled");F.removeAttribute("disabled");J.removeAttribute("disabled");M.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),P.removeAttribute("disabled"),l.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(m,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(J,60);
+" "+aa.toLocaleTimeString());E.setAttribute("title",Y.getAttribute("title"));t.removeAttribute("disabled");p.removeAttribute("disabled");F.removeAttribute("disabled");J.removeAttribute("disabled");M.removeAttribute("disabled");null!=m&&m.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),P.removeAttribute("disabled"),l.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(J,60);
mxUtils.setOpacity(M,60)}else W.style.display="none",W.innerText="",E.innerText="",mxUtils.write(E,mxResources.get("errorLoadingFile")),mxUtils.write(B,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ca=document.createElement("td");ca.style.padding="6px";ca.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ca,mxResources.get("current")):aa.toDateString()===R?mxUtils.write(ca,
aa.toLocaleTimeString()):mxUtils.write(ca,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ca);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){y!=X&&(n.stop(),null!=u&&(u.style.backgroundColor=""),y=X,u=Y,u.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=I=null,E.removeAttribute("title"),
-E.innerText=mxResources.get("loading")+"...",x.style.backgroundColor=D.defaultPageBackgroundColor,B.innerText="",D.getModel().clear(),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),W.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(m,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(J,20),mxUtils.setOpacity(M,20),n.spin(x),X.getXml(function(la){if(y==X)try{Z(la)}catch(ia){E.innerText=mxResources.get("error")+": "+ia.message}},function(la){n.stop();W.style.display="none";W.innerText="";E.innerText="";mxUtils.write(E,mxResources.get("errorLoadingFile"));mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){l.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(f[q]);null!=S&&q==f.length-1&&(L=S)}Q.appendChild(O);v.appendChild(Q)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(x.style.display="none",A.style.display="none",mxUtils.write(v,mxResources.get("notAvailable"))):(x.style.display="none",A.style.display="none",mxUtils.write(v,
-mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};v=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.className="geBtn";A.appendChild(W);A.appendChild(t);A.appendChild(m);A.appendChild(J);A.appendChild(F);A.appendChild(M);b.editor.cancelFirst?(z.appendChild(v),z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l)):(z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l),z.appendChild(v));d.appendChild(z);d.appendChild(A);d.appendChild(E);
+E.innerText=mxResources.get("loading")+"...",x.style.backgroundColor=D.defaultPageBackgroundColor,B.innerText="",D.getModel().clear(),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),W.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(J,20),mxUtils.setOpacity(M,20),n.spin(x),X.getXml(function(la){if(y==X)try{Z(la)}catch(ia){E.innerText=mxResources.get("error")+": "+ia.message}},function(la){n.stop();W.style.display="none";W.innerText="";E.innerText="";mxUtils.write(E,mxResources.get("errorLoadingFile"));mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){l.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(f[q]);null!=S&&q==f.length-1&&(L=S)}Q.appendChild(O);v.appendChild(Q)}else null==m||null==b.drive&&m.constructor==window.DriveFile||null==b.dropbox&&m.constructor==window.DropboxFile?(x.style.display="none",A.style.display="none",mxUtils.write(v,mxResources.get("notAvailable"))):(x.style.display="none",A.style.display="none",mxUtils.write(v,
+mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};v=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.className="geBtn";A.appendChild(W);A.appendChild(t);A.appendChild(p);A.appendChild(J);A.appendChild(F);A.appendChild(M);b.editor.cancelFirst?(z.appendChild(v),z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l)):(z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l),z.appendChild(v));d.appendChild(z);d.appendChild(A);d.appendChild(E);
this.container=d},DraftDialog=function(b,f,k,d,v,x,B,D,K){var c=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight="normal";mxUtils.write(e,f);c.appendChild(e);var g=document.createElement("select"),q=mxUtils.bind(this,function(){y=mxUtils.parseXml(K[g.value].data);I=b.editor.extractGraphModel(y.documentElement,!0);N=0;this.init()});if(null!=K){g.style.marginLeft="4px";for(f=0;f<K.length;f++){var n=
-document.createElement("option");n.setAttribute("value",f);var p=new Date(K[f].created),z=new Date(K[f].modified);mxUtils.write(n,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(n)}e.appendChild(g);mxEvent.addListener(g,"change",q)}null==k&&(k=K[0].data);var C=document.createElement("div");C.style.position="absolute";C.style.border="1px solid lightGray";C.style.marginTop="10px";C.style.left=
-"40px";C.style.right="40px";C.style.top="46px";C.style.bottom="74px";C.style.overflow="hidden";mxEvent.disableContextMenu(C);c.appendChild(C);var u=new Graph(C);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var y=mxUtils.parseXml(k),I=b.editor.extractGraphModel(y.documentElement,!0),N=0,t=null,m=u.getGlobalVariable;u.getGlobalVariable=function(J){return"page"==J&&null!=t&&null!=t[N]?
-t[N].getAttribute("name"):"pagenumber"==J?N+1:"pagecount"==J?null!=t?t.length:1:m.apply(this,arguments)};u.getLinkForCell=function(){return null};k=mxUtils.button("",function(){u.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);e=mxUtils.button("",function(){u.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));
+document.createElement("option");n.setAttribute("value",f);var m=new Date(K[f].created),z=new Date(K[f].modified);mxUtils.write(n,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(n)}e.appendChild(g);mxEvent.addListener(g,"change",q)}null==k&&(k=K[0].data);var C=document.createElement("div");C.style.position="absolute";C.style.border="1px solid lightGray";C.style.marginTop="10px";C.style.left=
+"40px";C.style.right="40px";C.style.top="46px";C.style.bottom="74px";C.style.overflow="hidden";mxEvent.disableContextMenu(C);c.appendChild(C);var u=new Graph(C);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var y=mxUtils.parseXml(k),I=b.editor.extractGraphModel(y.documentElement,!0),N=0,t=null,p=u.getGlobalVariable;u.getGlobalVariable=function(J){return"page"==J&&null!=t&&null!=t[N]?
+t[N].getAttribute("name"):"pagenumber"==J?N+1:"pagecount"==J?null!=t?t.length:1:p.apply(this,arguments)};u.getLinkForCell=function(){return null};k=mxUtils.button("",function(){u.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);e=mxUtils.button("",function(){u.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));
e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);f=mxUtils.button("",function(){u.maxFitScale=8;u.fit(8);u.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);n=mxUtils.button("",function(){u.zoomActual();u.center()});n.className="geSprite geSprite-actualsize";n.setAttribute("title",mxResources.get("actualSize"));n.style.outline=
"none";n.style.border="none";n.style.margin="2px";mxUtils.setOpacity(n,60);B=mxUtils.button(B||mxResources.get("discard"),function(){v.apply(this,[g.value,mxUtils.bind(this,function(){null!=g.parentNode&&(g.options[g.selectedIndex].parentNode.removeChild(g.options[g.selectedIndex]),0<g.options.length?(g.value=g.options[0].value,q()):b.hideDialog(!0))})])});B.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign=
-"bottom";F.style.marginRight="6px";F.style.display="none";x=mxUtils.button(x||mxResources.get("edit"),function(){d.apply(this,[g.value])});x.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.position="absolute";p.style.bottom="30px";p.style.right="40px";p.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
+"bottom";F.style.marginRight="6px";F.style.display="none";x=mxUtils.button(x||mxResources.get("edit"),function(){d.apply(this,[g.value])});x.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.right="40px";m.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
function(){function J(E){if(null!=E){var P=E.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";C.style.backgroundColor=P;(new mxCodec(E.ownerDocument)).decode(E,u.getModel());u.maxFitScale=1;u.fit(8);u.center()}return E}function M(E){null!=E&&(E=J(Editor.parseDiagramNode(E)));return E}mxEvent.addListener(F,"change",function(E){N=parseInt(F.value);M(t[N]);mxEvent.consume(E)});if("mxfile"==I.nodeName){var H=I.getElementsByTagName("diagram");
t=[];for(var G=0;G<H.length;G++)t.push(H[G]);0<t.length&&M(t[N]);F.innerText="";if(1<t.length)for(F.style.display="",G=0;G<t.length;G++)H=document.createElement("option"),mxUtils.write(H,t[G].getAttribute("name")||mxResources.get("pageWithNumber",[G+1])),H.setAttribute("value",G),G==N&&H.setAttribute("selected","selected"),F.appendChild(H);else F.style.display="none"}else J(I)};z.appendChild(F);z.appendChild(k);z.appendChild(e);z.appendChild(n);z.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});k.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(p.appendChild(k),null!=D&&p.appendChild(D),p.appendChild(B),p.appendChild(x)):(p.appendChild(x),p.appendChild(B),null!=D&&p.appendChild(D),p.appendChild(k));c.appendChild(p);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,d,v,x){function B(U,V,l,A){if("object"===typeof V.value&&null!=V.value.attributes){V=V.value.attributes;
+function(){b.hideDialog(!0)});k.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(m.appendChild(k),null!=D&&m.appendChild(D),m.appendChild(B),m.appendChild(x)):(m.appendChild(x),m.appendChild(B),null!=D&&m.appendChild(D),m.appendChild(k));c.appendChild(m);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,d,v,x){function B(U,V,l,A){if("object"===typeof V.value&&null!=V.value.attributes){V=V.value.attributes;
for(var L=0;L<V.length;L++)if("label"!=V[L].nodeName){var Q=mxUtils.trim(V[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(A&&0<=Q.indexOf(l)||!A&&Q.substring(0,l.length)===l)||null!=U&&U.test(Q))return!0}}return!1}function D(){n&&t.value?(P.removeAttribute("disabled"),T.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));t.value&&N.value?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}function K(U,
-V,l){G.innerText="";var A=e.model.getDescendants(e.model.getRoot()),L=N.value.toLowerCase(),Q=m.checked?new RegExp(L):null,O=null;z=null;g!=L&&(g=L,q=null,p=!1);var R=null==q;if(0<L.length){if(p){p=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}U=(S+1)%b.pages.length;q=null;do p=!1,A=b.pages[U],e=b.createTemporaryGraph(e.getStylesheet()),b.updatePageRoot(A),e.model.setRoot(A.root),U=(U+1)%b.pages.length;while(!K(!0,V,l)&&U!=S);q&&(q=null,l?b.editor.graph.model.execute(new SelectPage(b,
-A)):b.selectPage(A));p=!1;e=b.editor.graph;return K(!0,V,l)}for(X=0;X<A.length;X++){S=e.view.getState(A[X]);V&&null!=Q&&(R=R||S==q);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(e.model.isVertex(S.cell)||e.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(J.innerHTML=e.sanitizeHtml(e.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([J])):label=e.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;V&&x&&null!=Q&&S==q&&(label=label.substr(C),
-aa=C);var Y=""==t.value,Z=Y;if(null==Q&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&B(Q,S.cell,L,Z))||null!=Q&&(Q.test(label)||Y&&B(Q,S.cell,L,Z)))if(x&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),C=aa+Y.index+z.length)):(z=L,C=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==q}}if(null!=O){if(X==A.length&&F.checked)return q=null,p=!0,K(!0,V,l);q=O;e.scrollCellToVisible(q.cell);e.isEnabled()&&!e.isCellLocked(q.cell)?l||e.getSelectionCell()==q.cell&&
-1==e.getSelectionCount()||e.setSelectionCell(q.cell):e.highlightCell(q.cell)}else{if(!U&&F.checked)return p=!0,K(!0,V,l);e.isEnabled()&&!l&&e.clearSelection()}n=null!=O;x&&!U&&D();return 0==L.length||null!=O}var c=b.actions.get("findReplace"),e=b.editor.graph,g=null,q=null,n=!1,p=!1,z=null,C=0,u=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var I=x?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder",
+V,l){G.innerText="";var A=e.model.getDescendants(e.model.getRoot()),L=N.value.toLowerCase(),Q=p.checked?new RegExp(L):null,O=null;z=null;g!=L&&(g=L,q=null,m=!1);var R=null==q;if(0<L.length){if(m){m=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}U=(S+1)%b.pages.length;q=null;do m=!1,A=b.pages[U],e=b.createTemporaryGraph(e.getStylesheet()),b.updatePageRoot(A),e.model.setRoot(A.root),U=(U+1)%b.pages.length;while(!K(!0,V,l)&&U!=S);q&&(q=null,l?b.editor.graph.model.execute(new SelectPage(b,
+A)):b.selectPage(A));m=!1;e=b.editor.graph;return K(!0,V,l)}for(X=0;X<A.length;X++){S=e.view.getState(A[X]);V&&null!=Q&&(R=R||S==q);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(e.model.isVertex(S.cell)||e.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(J.innerHTML=e.sanitizeHtml(e.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([J])):label=e.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;V&&x&&null!=Q&&S==q&&(label=label.substr(C),
+aa=C);var Y=""==t.value,Z=Y;if(null==Q&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&B(Q,S.cell,L,Z))||null!=Q&&(Q.test(label)||Y&&B(Q,S.cell,L,Z)))if(x&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),C=aa+Y.index+z.length)):(z=L,C=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==q}}if(null!=O){if(X==A.length&&F.checked)return q=null,m=!0,K(!0,V,l);q=O;e.scrollCellToVisible(q.cell);e.isEnabled()&&!e.isCellLocked(q.cell)?l||e.getSelectionCell()==q.cell&&
+1==e.getSelectionCount()||e.setSelectionCell(q.cell):e.highlightCell(q.cell)}else{if(!U&&F.checked)return m=!0,K(!0,V,l);e.isEnabled()&&!l&&e.clearSelection()}n=null!=O;x&&!U&&D();return 0==L.length||null!=O}var c=b.actions.get("findReplace"),e=b.editor.graph,g=null,q=null,n=!1,m=!1,z=null,C=0,u=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var I=x?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder",
mxResources.get("find"));N.setAttribute("type","text");N.style.marginTop="4px";N.style.marginBottom="6px";N.style.width=I;N.style.fontSize="12px";N.style.borderRadius="4px";N.style.padding="6px";y.appendChild(N);mxUtils.br(y);if(x){var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("replaceWith"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width=I;t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";
-y.appendChild(t);mxUtils.br(y);mxEvent.addListener(t,"input",D)}var m=document.createElement("input");m.setAttribute("id","geFindWinRegExChck");m.setAttribute("type","checkbox");m.style.marginRight="4px";y.appendChild(m);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");y.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));y.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
+y.appendChild(t);mxUtils.br(y);mxEvent.addListener(t,"input",D)}var p=document.createElement("input");p.setAttribute("id","geFindWinRegExChck");p.setAttribute("type","checkbox");p.style.marginRight="4px";y.appendChild(p);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");y.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));y.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
"6px";I.style.top="-1px";y.appendChild(I);mxUtils.br(y);var F=document.createElement("input");F.setAttribute("id","geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";y.appendChild(F);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");y.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));y.appendChild(I);var J=document.createElement("div");mxUtils.br(y);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
-"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";y.appendChild(I);var M=mxUtils.button(mxResources.get("reset"),function(){G.innerText="";N.value="";N.style.backgroundColor="";x&&(t.value="",D());g=q=null;p=!1;N.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";x||I.appendChild(M);var H=mxUtils.button(mxResources.get("find"),
+"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";y.appendChild(I);var M=mxUtils.button(mxResources.get("reset"),function(){G.innerText="";N.value="";N.style.backgroundColor="";x&&(t.value="",D());g=q=null;m=!1;N.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";x||I.appendChild(M);var H=mxUtils.button(mxResources.get("find"),
function(){try{N.style.backgroundColor=K()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";I.appendChild(H);var G=document.createElement("div");G.style.marginTop="10px";if(x){var E=function(U,V,l,A,L){if(null==L||"1"!=L.html)return A=U.toLowerCase().indexOf(V,
A),0>A?U:U.substr(0,A)+l+U.substr(A+V.length);var Q=U;V=mxUtils.htmlEntities(V);L=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)L.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");A=U.toLowerCase().indexOf(V,A);if(0>A)return Q;Q=A+V.length;l=mxUtils.htmlEntities(l);U=U.substr(0,A)+l+U.substr(Q);for(var R=0,S=0;S<L.length;S++){if(L[S]-R<A)U=U.substr(0,L[S])+O[S]+U.substr(L[S]);else{var X=L[S]-R<Q?A+R:L[S]+(l.length-V.length);U=U.substr(0,X)+O[S]+U.substr(X)}R+=O[S].length}return U.replace(/\n/g,
"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=e.getLabel(U);e.isCellEditable(U)&&e.model.setValue(U,E(V,z,t.value,C-z.length,e.getCurrentCellStyle(U)));N.style.backgroundColor=K(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(l){b.handleError(l)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
@@ -11289,54 +11289,54 @@ document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?F.remo
e.style.width="90%";e.style.visibility="hidden";D.appendChild(e);mxUtils.br(D);c=function(){B.freehand.setPerfectFreehandMode(K.checked);e.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",c);c();mxEvent.addListener(e,"change",function(){B.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){B.freehand.isDrawing()?B.freehand.stopDrawing():B.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing"));
g.style.marginTop=x?"5px":"10px";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";D.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),D,f,k,d,v,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);B.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,
mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.setAttribute("title",mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.className="geBtn"+(B.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){B.freehand.isDrawing()&&B.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,d,v){var x=b.editor.graph,
-B=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(K,c){if(x.isEnabled()){var e=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var q=[],n=0;n<g.length;n++){var p=mxUtils.trim(g[n]);""!=p&&0>mxUtils.indexOf(K,p)&&q.push(p)}0<q.length&&(x.isSelectionEmpty()?c(K.concat(q)):x.addTagsForCells(x.getSelectionCells(),q))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
+B=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(K,c){if(x.isEnabled()){var e=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var q=[],n=0;n<g.length;n++){var m=mxUtils.trim(g[n]);""!=m&&0>mxUtils.indexOf(K,m)&&q.push(m)}0<q.length&&(x.isSelectionEmpty()?c(K.concat(q)):x.addTagsForCells(x.getSelectionCells(),q))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
")");b.showDialog(e.container,300,80,!0,!0);e.init()}}),D=B.div;this.window=new mxWindow(mxResources.get("tags"),D,f,k,d,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){B.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,d){var v=document.createElement("div");v.style.textAlign=
"center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var B="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(B=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
f==b.oneDrive?(B=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):f==b.trello&&(B=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[B]));var K=document.createElement("input");K.setAttribute("type",
"checkbox");B=mxUtils.button(mxResources.get("authorize"),function(){d(K.checked)});B.insertBefore(D,B.firstChild);B.style.marginTop="6px";B.className="geBigButton";B.style.fontSize="18px";B.style.padding="14px";v.appendChild(x);v.appendChild(b);v.appendChild(B);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(K),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),k.appendChild(x),v.appendChild(k),K.checked=!0,K.defaultChecked=!0,mxEvent.addListener(x,
"click",function(c){K.checked=!K.checked;mxEvent.consume(c)}));this.container=v},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),v=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var B=b.sidebar.customEntries[x],D={title:b.getResource(B.title),entries:[]},K=0;K<B.entries.length;K++){var c=B.entries[K];D.entries.push({id:c.id,title:b.getResource(c.title),desc:b.getResource(c.desc),image:c.preview})}v.push(D)}for(x=
-0;x<k.length;x++)if(null==b.sidebar.enabledLibraries)v.push(k[x]);else{D={title:k[x].title,entries:[]};for(K=0;K<k[x].entries.length;K++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[x].entries[K].id)&&D.entries.push(k[x].entries[K]);0<D.entries.length&&v.push(D)}k=v;if(f){x=mxUtils.bind(this,function(m){for(var F=0;F<m.length;F++)(function(J){var M=p.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,
-J.title);e.appendChild(M);for(var H=0;H<J.entries.length;H++)(function(G){var E=p.cloneNode(!1);E.style.cursor="pointer";E.style.padding="4px 0px 4px 20px";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.setAttribute("title",G.title+" ("+G.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(G.id);P.defaultChecked=P.checked;E.appendChild(P);mxUtils.write(E," "+G.title);e.appendChild(E);var T=function(W){if(null==
+0;x<k.length;x++)if(null==b.sidebar.enabledLibraries)v.push(k[x]);else{D={title:k[x].title,entries:[]};for(K=0;K<k[x].entries.length;K++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[x].entries[K].id)&&D.entries.push(k[x].entries[K]);0<D.entries.length&&v.push(D)}k=v;if(f){x=mxUtils.bind(this,function(p){for(var F=0;F<p.length;F++)(function(J){var M=m.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,
+J.title);e.appendChild(M);for(var H=0;H<J.entries.length;H++)(function(G){var E=m.cloneNode(!1);E.style.cursor="pointer";E.style.padding="4px 0px 4px 20px";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.setAttribute("title",G.title+" ("+G.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(G.id);P.defaultChecked=P.checked;E.appendChild(P);mxUtils.write(E," "+G.title);e.appendChild(E);var T=function(W){if(null==
W||"INPUT"!=mxEvent.getSource(W).nodeName){g.style.textAlign="center";g.style.padding="0px";g.style.color="";g.innerText="";if(null!=G.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,G.desc);g.appendChild(U)}null!=G.imageCallback?G.imageCallback(g):null!=G.image?g.innerHTML+='<img border="0" src="'+G.image+'"/>':null==G.desc&&(g.style.padding="20px",g.style.color=
-"rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=E;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=W&&mxEvent.consume(W)}};mxEvent.addListener(E,"click",T);mxEvent.addListener(E,"dblclick",function(W){P.checked=!P.checked;mxEvent.consume(W)});n.push(function(){return P.checked?G.id:null});0==F&&0==H&&T()})(J.entries[H])})(m[F])});K=document.createElement("div");K.className="geDialogTitle";mxUtils.write(K,mxResources.get("shapes"));
+"rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=E;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=W&&mxEvent.consume(W)}};mxEvent.addListener(E,"click",T);mxEvent.addListener(E,"dblclick",function(W){P.checked=!P.checked;mxEvent.consume(W)});n.push(function(){return P.checked?G.id:null});0==F&&0==H&&T()})(J.entries[H])})(p[F])});K=document.createElement("div");K.className="geDialogTitle";mxUtils.write(K,mxResources.get("shapes"));
K.style.position="absolute";K.style.top="0px";K.style.left="0px";K.style.lineHeight="40px";K.style.height="40px";K.style.right="0px";var e=document.createElement("div"),g=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";g.style.position="absolute";g.style.left="202px";g.style.right="0px";g.style.top="40px";g.style.bottom="60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)";
-g.style.textAlign="center";var q=null,n=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";x(k);d.style.padding="30px";d.appendChild(K);d.appendChild(e);d.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";k.appendChild(x);mxEvent.addListener(x,"click",function(m){z.checked=!z.checked;mxEvent.consume(m)});var C=document.createElement("input");C.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"),
-x.style.paddingRight="20px",x.appendChild(C),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),C.style.position="relative",C.style.top="1px",C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(x,"click",function(m){mxEvent.getSource(m)!=C&&(C.checked=!C.checked,mxEvent.consume(m))}),k.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var m=[],F=0;F<n.length;F++){var J=
-n[F].apply(this,arguments);null!=J&&m.push(J)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(F=mxUtils.indexOf(m,".scratchpad"),null!=b.scratchpad!=(0<=F&&0<m.splice(F,1).length)&&b.toggleScratchpad(),F=mxUtils.indexOf(m,"search"),mxSettings.settings.search=0<=F&&0<m.splice(F,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),C.checked&&mxSettings.save());b.sidebar.showEntries(m.join(";"),C.checked,!0);b.setSidebarTitles(z.checked,C.checked)});K.className="geBtn gePrimaryBtn"}else{var u=
-document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";K=document.createElement("tr");u.style.width="100%";f=document.createElement("td");v=document.createElement("td");B=document.createElement("td");var y=mxUtils.bind(this,function(m,F,J){var M=document.createElement("input");M.type="checkbox";u.appendChild(M);M.checked=b.sidebar.isEntryVisible(J);var H=document.createElement("span");mxUtils.write(H,F);F=document.createElement("div");F.style.display=
-"block";F.appendChild(M);F.appendChild(H);mxEvent.addListener(H,"click",function(G){M.checked=!M.checked;mxEvent.consume(G)});m.appendChild(F);return function(){return M.checked?J:null}});K.appendChild(f);K.appendChild(v);K.appendChild(B);x.appendChild(K);u.appendChild(x);n=[];var I=0;for(x=0;x<k.length;x++)for(K=0;K<k[x].entries.length;K++)I++;var N=[f,v,B],t=0;for(x=0;x<k.length;x++)(function(m){for(var F=0;F<m.entries.length;F++){var J=m.entries[F];n.push(y(N[Math.floor(t/(I/3))],J.title,J.id));
-t++}})(k[x]);d.appendChild(u);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";C=document.createElement("input");isLocalStorage&&(C.setAttribute("type","checkbox"),C.checked=!0,C.defaultChecked=!0,k.appendChild(C),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),k.appendChild(x),mxEvent.addListener(x,"click",function(m){C.checked=!C.checked;mxEvent.consume(m)}));d.appendChild(k);x=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});x.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){for(var m=["search"],F=0;F<n.length;F++){var J=n[F].apply(this,arguments);null!=J&&m.push(J)}b.sidebar.showEntries(0<m.length?m.join(";"):"",C.checked);b.hideDialog()});K.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(x),k.appendChild(K)):(k.appendChild(K),k.appendChild(x));d.appendChild(k);this.container=
-d},PluginsDialog=function(b,f,k,d){function v(){K=!0;if(0==D.length)B.innerText=mxResources.get("noPlugins");else{B.innerText="";for(var p=0;p<D.length;p++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var C=document.createElement("span");C.className="geSprite geSprite-delete";C.style.position="relative";C.style.cursor="pointer";C.style.top="5px";C.style.marginRight="4px";C.style.display="inline-block";z.appendChild(C);mxUtils.write(z,D[p]);B.appendChild(z);mxUtils.br(B);mxEvent.addListener(C,
-"click",function(u){return function(){b.confirm(mxResources.get("delete")+' "'+D[u]+'"?',function(){null!=k&&k(D[u]);D.splice(u,1);v()})}}(p))}}}var x=document.createElement("div"),B=document.createElement("div");B.style.height="180px";B.style.overflow="auto";var D=mxSettings.getPlugins().slice(),K=!1;x.appendChild(B);v();K=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(p){p&&0>mxUtils.indexOf(D,p)&&D.push(p);v()})}:function(){var p=document.createElement("div"),z=document.createElement("span");
-z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");p.appendChild(z);var C=document.createElement("select");C.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var u=document.createElement("option");mxUtils.write(u,App.publicPlugin[z]);u.value=App.publicPlugin[z];C.appendChild(u)}p.appendChild(C);mxUtils.br(p);mxUtils.br(p);z=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();
-if(null!=I&&0<I.length){I=I.split(";");for(var N=0;N<I.length;N++){var t=I[N],m=App.pluginRegistry[t];null!=m&&(t=m);0<t.length&&0>mxUtils.indexOf(D,t)&&D.push(t)}v()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});z.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var y=App.pluginRegistry[C.value];0>mxUtils.indexOf(D,y)&&(D.push(y),v())}),null,null,null,z);b.showDialog(p.container,300,100,!0,!0)});c.className=
+g.style.textAlign="center";var q=null,n=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";x(k);d.style.padding="30px";d.appendChild(K);d.appendChild(e);d.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";k.appendChild(x);mxEvent.addListener(x,"click",function(p){z.checked=!z.checked;mxEvent.consume(p)});var C=document.createElement("input");C.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"),
+x.style.paddingRight="20px",x.appendChild(C),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),C.style.position="relative",C.style.top="1px",C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(x,"click",function(p){mxEvent.getSource(p)!=C&&(C.checked=!C.checked,mxEvent.consume(p))}),k.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var p=[],F=0;F<n.length;F++){var J=
+n[F].apply(this,arguments);null!=J&&p.push(J)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(F=mxUtils.indexOf(p,".scratchpad"),null!=b.scratchpad!=(0<=F&&0<p.splice(F,1).length)&&b.toggleScratchpad(),F=mxUtils.indexOf(p,"search"),mxSettings.settings.search=0<=F&&0<p.splice(F,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),C.checked&&mxSettings.save());b.sidebar.showEntries(p.join(";"),C.checked,!0);b.setSidebarTitles(z.checked,C.checked)});K.className="geBtn gePrimaryBtn"}else{var u=
+document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";K=document.createElement("tr");u.style.width="100%";f=document.createElement("td");v=document.createElement("td");B=document.createElement("td");var y=mxUtils.bind(this,function(p,F,J){var M=document.createElement("input");M.type="checkbox";u.appendChild(M);M.checked=b.sidebar.isEntryVisible(J);var H=document.createElement("span");mxUtils.write(H,F);F=document.createElement("div");F.style.display=
+"block";F.appendChild(M);F.appendChild(H);mxEvent.addListener(H,"click",function(G){M.checked=!M.checked;mxEvent.consume(G)});p.appendChild(F);return function(){return M.checked?J:null}});K.appendChild(f);K.appendChild(v);K.appendChild(B);x.appendChild(K);u.appendChild(x);n=[];var I=0;for(x=0;x<k.length;x++)for(K=0;K<k[x].entries.length;K++)I++;var N=[f,v,B],t=0;for(x=0;x<k.length;x++)(function(p){for(var F=0;F<p.entries.length;F++){var J=p.entries[F];n.push(y(N[Math.floor(t/(I/3))],J.title,J.id));
+t++}})(k[x]);d.appendChild(u);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";C=document.createElement("input");isLocalStorage&&(C.setAttribute("type","checkbox"),C.checked=!0,C.defaultChecked=!0,k.appendChild(C),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),k.appendChild(x),mxEvent.addListener(x,"click",function(p){C.checked=!C.checked;mxEvent.consume(p)}));d.appendChild(k);x=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});x.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){for(var p=["search"],F=0;F<n.length;F++){var J=n[F].apply(this,arguments);null!=J&&p.push(J)}b.sidebar.showEntries(0<p.length?p.join(";"):"",C.checked);b.hideDialog()});K.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(x),k.appendChild(K)):(k.appendChild(K),k.appendChild(x));d.appendChild(k);this.container=
+d},PluginsDialog=function(b,f,k,d){function v(){K=!0;if(0==D.length)B.innerText=mxResources.get("noPlugins");else{B.innerText="";for(var m=0;m<D.length;m++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var C=document.createElement("span");C.className="geSprite geSprite-delete";C.style.position="relative";C.style.cursor="pointer";C.style.top="5px";C.style.marginRight="4px";C.style.display="inline-block";z.appendChild(C);mxUtils.write(z,D[m]);B.appendChild(z);mxUtils.br(B);mxEvent.addListener(C,
+"click",function(u){return function(){b.confirm(mxResources.get("delete")+' "'+D[u]+'"?',function(){null!=k&&k(D[u]);D.splice(u,1);v()})}}(m))}}}var x=document.createElement("div"),B=document.createElement("div");B.style.height="180px";B.style.overflow="auto";var D=mxSettings.getPlugins().slice(),K=!1;x.appendChild(B);v();K=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(m){m&&0>mxUtils.indexOf(D,m)&&D.push(m);v()})}:function(){var m=document.createElement("div"),z=document.createElement("span");
+z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");m.appendChild(z);var C=document.createElement("select");C.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var u=document.createElement("option");mxUtils.write(u,App.publicPlugin[z]);u.value=App.publicPlugin[z];C.appendChild(u)}m.appendChild(C);mxUtils.br(m);mxUtils.br(m);z=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();
+if(null!=I&&0<I.length){I=I.split(";");for(var N=0;N<I.length;N++){var t=I[N],p=App.pluginRegistry[t];null!=p&&(t=p);0<t.length&&0>mxUtils.indexOf(D,t)&&D.push(t)}v()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});z.className="geBtn";m=new CustomDialog(b,m,mxUtils.bind(this,function(){var y=App.pluginRegistry[C.value];0>mxUtils.indexOf(D,y)&&(D.push(y),v())}),null,null,null,z);b.showDialog(m.container,300,100,!0,!0)});c.className=
"geBtn";var e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var g=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){K?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});g.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var n=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
-n.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(n.style.display="none");q.appendChild(n);b.editor.cancelFirst?(d||q.appendChild(e),q.appendChild(c),q.appendChild(g)):(q.appendChild(c),q.appendChild(g),d||q.appendChild(e));x.appendChild(q);this.container=x},CropImageDialog=function(b,f,k,d){function v(){var m=C.checked,F=u.checked,J=n.geometry,M=K.width,H=K.height,G=(300-M)/2,E=(300-H)/2;J.x<G?(J.width-=G-J.x,J.x=G):J.x+J.width>G+M&&(J.width=G+M-J.x,J.x=Math.min(J.x,G+M));J.y<E?(J.height-=
-E-J.y,J.y=E):J.y+J.height>E+H&&(J.height=E+H-J.y,J.y=Math.min(J.y,E+H));var P=(J.x-G)/M*100;M=100-(J.x+J.width-G)/M*100;G=(J.y-E)/H*100;J=100-(J.y+J.height-E)/H*100;return"inset("+mxUtils.format(G)+"% "+mxUtils.format(M)+"% "+mxUtils.format(J)+"% "+mxUtils.format(P)+"%"+(m?" round "+q+"%":F?" round 50%":"")+")"}function x(m){null!=e&&(!0!==m&&(e.model.setGeometry(n,g.clone()),q=5,I.value=q),e.model.setStyle(n,p+v()),e.selectAll(),y.style.visibility=C.checked?"visible":"hidden")}var B=document.createElement("div"),
-D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var K=document.createElement("img");K.onload=function(){function m(){e.model.setStyle(n,p+v())}e=new Graph(c);e.autoExtend=!1;e.autoScroll=!1;e.setGridEnabled(!1);e.setEnabled(!0);e.setPanning(!1);e.setConnectable(!1);e.getRubberband().setEnabled(!1);e.graphHandler.allowLivePreview=!1;var F=e.createVertexHandler;
+n.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(n.style.display="none");q.appendChild(n);b.editor.cancelFirst?(d||q.appendChild(e),q.appendChild(c),q.appendChild(g)):(q.appendChild(c),q.appendChild(g),d||q.appendChild(e));x.appendChild(q);this.container=x},CropImageDialog=function(b,f,k,d){function v(){var p=C.checked,F=u.checked,J=n.geometry,M=K.width,H=K.height,G=(300-M)/2,E=(300-H)/2;J.x<G?(J.width-=G-J.x,J.x=G):J.x+J.width>G+M&&(J.width=G+M-J.x,J.x=Math.min(J.x,G+M));J.y<E?(J.height-=
+E-J.y,J.y=E):J.y+J.height>E+H&&(J.height=E+H-J.y,J.y=Math.min(J.y,E+H));var P=(J.x-G)/M*100;M=100-(J.x+J.width-G)/M*100;G=(J.y-E)/H*100;J=100-(J.y+J.height-E)/H*100;return"inset("+mxUtils.format(G)+"% "+mxUtils.format(M)+"% "+mxUtils.format(J)+"% "+mxUtils.format(P)+"%"+(p?" round "+q+"%":F?" round 50%":"")+")"}function x(p){null!=e&&(!0!==p&&(e.model.setGeometry(n,g.clone()),q=5,I.value=q),e.model.setStyle(n,m+v()),e.selectAll(),y.style.visibility=C.checked?"visible":"hidden")}var B=document.createElement("div"),
+D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var K=document.createElement("img");K.onload=function(){function p(){e.model.setStyle(n,m+v())}e=new Graph(c);e.autoExtend=!1;e.autoScroll=!1;e.setGridEnabled(!1);e.setEnabled(!0);e.setPanning(!1);e.setConnectable(!1);e.getRubberband().setEnabled(!1);e.graphHandler.allowLivePreview=!1;var F=e.createVertexHandler;
e.createVertexHandler=function(){var Q=F.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var J=n.geometry,M=K.width,H=K.height,G=(300-M)/2,E=(300-H)/2,P=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),T=parseFloat(P[0]),W=parseFloat(P[1]),U=parseFloat(P[2]),V=parseFloat(P[3]);isFinite(T)&&isFinite(W)&&isFinite(U)&&isFinite(V)?(J.x=V/100*M+G,J.y=T/100*H+E,J.width=(100-W)/100*M+G-J.x,J.height=(100-U)/100*H+E-J.y,"round"==P[4]?"50%"==P[5]?u.setAttribute("checked",
-"checked"):(q=parseInt(P[5]),I.value=q,C.setAttribute("checked","checked"),y.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}n.style=p+(k?k:v());n.vertex=!0;e.addCell(n,null,null,null,null);e.selectAll();e.addListener(mxEvent.CELLS_MOVED,m);e.addListener(mxEvent.CELLS_RESIZED,m);var l=e.graphHandler.mouseUp,A=e.graphHandler.mouseDown;e.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};e.graphHandler.mouseDown=function(){A.apply(this,
+"checked"):(q=parseInt(P[5]),I.value=q,C.setAttribute("checked","checked"),y.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}n.style=m+(k?k:v());n.vertex=!0;e.addCell(n,null,null,null,null);e.selectAll();e.addListener(mxEvent.CELLS_MOVED,p);e.addListener(mxEvent.CELLS_RESIZED,p);var l=e.graphHandler.mouseUp,A=e.graphHandler.mouseDown;e.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};e.graphHandler.mouseDown=function(){A.apply(this,
arguments);c.style.backgroundColor=""};e.dblClick=function(){};var L=e.getSelectionModel().changeSelection;e.getSelectionModel().changeSelection=function(){L.call(this,[n],[n])}};K.onerror=function(){K.onload=null;K.src=Editor.errorImage};K.setAttribute("src",f);K.style.maxWidth="300px";K.style.maxHeight="300px";D.appendChild(K);B.appendChild(D);var c=document.createElement("div");c.style.width="300px";c.style.height="300px";c.style.overflow="hidden";c.style.backgroundColor="#fff9";B.appendChild(c);
-var e=null,g=new mxGeometry(100,100,100,100),q=5,n=new mxCell("",g.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";B.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));
+var e=null,g=new mxGeometry(100,100,100,100),q=5,n=new mxCell("",g.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";B.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));
B.appendChild(f);var C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("id","croppingRounded");C.setAttribute("name","croppingShape");C.style.margin="5px";B.appendChild(C);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));B.appendChild(f);var u=document.createElement("input");u.setAttribute("type","radio");u.setAttribute("id","croppingEllipse");u.setAttribute("name","croppingShape");u.style.margin="5px";
B.appendChild(u);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));B.appendChild(f);mxEvent.addListener(z,"change",x);mxEvent.addListener(C,"change",x);mxEvent.addListener(u,"change",x);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",q);I.setAttribute("title",
mxResources.get("arcSize"));y.appendChild(I);B.appendChild(y);mxEvent.addListener(I,"change",function(){q=this.value;x(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(v(),n.geometry.width,n.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){d(null,K.width,K.height);b.hideDialog()});N.className="geBtn";var t=document.createElement("div");
t.style.marginTop="10px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(f),t.appendChild(N),t.appendChild(D)):(t.appendChild(N),t.appendChild(D),t.appendChild(f));B.appendChild(t);this.container=B},EditGeometryDialog=function(b,f){var k=b.editor.graph,d=1==f.length?k.getCellGeometry(f[0]):null,v=document.createElement("div"),x=document.createElement("table"),B=document.createElement("tbody"),D=document.createElement("tr"),K=document.createElement("td"),c=document.createElement("td");
x.style.paddingLeft="6px";mxUtils.write(K,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=d&&d.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};c.appendChild(e);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("left")+":");var g=document.createElement("input");
g.setAttribute("type","text");g.style.width="100px";g.value=null!=d?d.x:"";c.appendChild(g);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.y:"";c.appendChild(q);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");
-c=document.createElement("td");mxUtils.write(K,mxResources.get("dx")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d&&null!=d.offset?d.offset.x:"";c.appendChild(n);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
-p.value=null!=d&&null!=d.offset?d.offset.y:"";c.appendChild(p);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.width:"";c.appendChild(z);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=
+c=document.createElement("td");mxUtils.write(K,mxResources.get("dx")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d&&null!=d.offset?d.offset.x:"";c.appendChild(n);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("dy")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";
+m.value=null!=d&&null!=d.offset?d.offset.y:"";c.appendChild(m);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.width:"";c.appendChild(z);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=
document.createElement("td");mxUtils.write(K,mxResources.get("height")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.width="100px";C.value=null!=d?d.height:"";c.appendChild(C);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=
1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(u);D.appendChild(K);D.appendChild(c);B.appendChild(D);x.appendChild(B);v.appendChild(x);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var I=0;I<f.length;I++){var N=k.getCellGeometry(f[I]);null!=N&&(N=N.clone(),k.isCellMovable(f[I])&&(N.relative=e.checked,
-0<mxUtils.trim(g.value).length&&(N.x=Number(g.value)),0<mxUtils.trim(q.value).length&&(N.y=Number(q.value)),0<mxUtils.trim(n.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(n.value)),0<mxUtils.trim(p.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(p.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(N.width=Number(z.value)),0<mxUtils.trim(C.value).length&&(N.height=Number(C.value))),k.getModel().setGeometry(f[I],N));0<mxUtils.trim(u.value).length&&
+0<mxUtils.trim(g.value).length&&(N.x=Number(g.value)),0<mxUtils.trim(q.value).length&&(N.y=Number(q.value)),0<mxUtils.trim(n.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(n.value)),0<mxUtils.trim(m.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(m.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(N.width=Number(z.value)),0<mxUtils.trim(C.value).length&&(N.height=Number(C.value))),k.getModel().setGeometry(f[I],N));0<mxUtils.trim(u.value).length&&
k.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[f[I]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(v,"keypress",function(I){13==I.keyCode&&y.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(y)):(x.appendChild(y),x.appendChild(d));v.appendChild(x);this.container=v},LibraryDialog=function(b,f,k,d,v,x){function B(F){for(F=document.elementFromPoint(F.clientX,
F.clientY);null!=F&&F.parentNode!=n;)F=F.parentNode;var J=null;if(null!=F){var M=n.firstChild;for(J=0;null!=M&&M!=F;)M=M.nextSibling,J++}return J}function D(F,J,M,H,G,E,P,T,W){try{if(b.spinner.stop(),null==J||"image/"==J.substring(0,6))if(null==F&&null!=P||null==z[F]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
-X.title.length?"#d0d0d0":""};n.style.backgroundImage="";p.style.display="none";var V=G,l=E;if(G>b.maxImageSize||E>b.maxImageSize){var A=Math.min(1,Math.min(b.maxImageSize/Math.max(1,G)),b.maxImageSize/Math.max(1,E));G*=A;E*=A}V>l?(l=Math.round(100*l/V),V=100):(V=Math.round(100*V/l),l=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
+X.title.length?"#d0d0d0":""};n.style.backgroundImage="";m.style.display="none";var V=G,l=E;if(G>b.maxImageSize||E>b.maxImageSize){var A=Math.min(1,Math.min(b.maxImageSize/Math.max(1,G)),b.maxImageSize/Math.max(1,E));G*=A;E*=A}V>l?(l=Math.round(100*l/V),V=100):(V=Math.round(100*V/l),l=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
"transform .1s ease-in-out");if(null!=F){var Q=document.createElement("img");Q.setAttribute("src",I.convert(F));Q.style.width=V+"px";Q.style.height=l+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-l)/2)+"px";Q.style.paddingLeft=Math.floor((100-V)/2)+"px";L.appendChild(Q)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var R=document.createElement("img");
R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(ca){mxEvent.consume(ca)});(function(ca,fa,la){mxEvent.addListener(R,"click",function(ia){z[fa]=null;for(var qa=0;qa<e.length;qa++)if(null!=e[qa].data&&e[qa].data==fa||null!=e[qa].xml&&
-null!=la&&e[qa].xml==la.xml){e.splice(qa,1);break}L.parentNode.removeChild(ca);0==e.length&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ia)});mxEvent.addListener(R,"dblclick",function(ia){mxEvent.consume(ia)})})(L,F,P);L.appendChild(R);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
+null!=la&&e[qa].xml==la.xml){e.splice(qa,1);break}L.parentNode.removeChild(ca);0==e.length&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.display="");mxEvent.consume(ia)});mxEvent.addListener(R,"dblclick",function(ia){mxEvent.consume(ia)})})(L,F,P);L.appendChild(R);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=F?(X={data:F,w:G,h:E,title:W},null!=T&&(X.aspect=T),z[F]=Q,e.push(X)):null!=P&&(P.aspect="fixed",e.push(P),X=P);mxEvent.addListener(S,"keydown",function(ca){13==ca.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(ca))});U();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(ca){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ca)});O=function(ca){if(mxClient.IS_IOS||
mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(la){null!=la&&(X.title=la,U())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ca)}else if("true"!=S.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);y=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;U()};mxEvent.consume(ca)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);n.appendChild(L);mxEvent.addListener(L,"dragstart",function(ca){null==F&&null!=P&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ca.dataTransfer.setData("Text",
@@ -11345,43 +11345,43 @@ P.xml);C=B(ca);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(functio
D(null,null,0,0,0,0,{xml:l,w:Z.width,h:Z.height})}G=!0}}catch(ca){}G||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ca){}return null}function K(F){F.dataTransfer.dropEffect=null!=C?"move":"copy";F.stopPropagation();F.preventDefault()}function c(F){F.stopPropagation();F.preventDefault();N=!1;u=B(F);if(null!=C)null!=u&&u<n.children.length?(e.splice(u>C?u-1:u,0,e.splice(C,1)[0]),n.insertBefore(n.children[C],n.children[u])):(e.push(e.splice(C,1)[0]),n.appendChild(n.children[C]));
else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,t(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var J=decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(J)||/(\.png)($|\?)/i.test(J)||/(\.gif)($|\?)/i.test(J)||/(\.svg)($|\?)/i.test(J))&&b.loadImage(J,function(M){D(J,null,0,0,M.width,M.height);n.scrollTop=n.scrollHeight})}F.stopPropagation();F.preventDefault()}var e=[];k=document.createElement("div");
k.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";k.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",f);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==v||v.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==v||v.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};g.appendChild(q);var n=document.createElement("div");n.style.borderWidth="1px 0px 1px 0px";n.style.borderColor="#d3d3d3";n.style.borderStyle="solid";n.style.marginTop="6px";n.style.overflow="auto";n.style.height="340px";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");
-p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));k.appendChild(p);var z={},C=null,u=null,y=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(F))};mxEvent.addListener(n,"mousedown",f);mxEvent.addListener(n,"pointerdown",f);mxEvent.addListener(n,"touchstart",f);var I=new mxUrlConverter,N=
-!1;if(null!=d)for(f=0;f<d.length;f++)g=d[f],D(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(n,"dragleave",function(F){p.style.cursor="";for(var J=mxEvent.getSource(F);null!=J;){if(J==n||J==p){F.stopPropagation();F.preventDefault();break}J=J.parentNode}});var t=function(F){return function(J,M,H,G,E,P,T,W,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(V){D(V,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?
+5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};g.appendChild(q);var n=document.createElement("div");n.style.borderWidth="1px 0px 1px 0px";n.style.borderColor="#d3d3d3";n.style.borderStyle="solid";n.style.marginTop="6px";n.style.overflow="auto";n.style.height="340px";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var m=document.createElement("div");
+m.style.position="absolute";m.style.width="640px";m.style.top="260px";m.style.textAlign="center";m.style.fontSize="22px";m.style.color="#a0c3ff";mxUtils.write(m,mxResources.get("dragImagesHere"));k.appendChild(m);var z={},C=null,u=null,y=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(F))};mxEvent.addListener(n,"mousedown",f);mxEvent.addListener(n,"pointerdown",f);mxEvent.addListener(n,"touchstart",f);var I=new mxUrlConverter,N=
+!1;if(null!=d)for(f=0;f<d.length;f++)g=d[f],D(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(n,"dragleave",function(F){m.style.cursor="";for(var J=mxEvent.getSource(F);null!=J;){if(J==n||J==m){F.stopPropagation();F.preventDefault();break}J=J.parentNode}});var t=function(F){return function(J,M,H,G,E,P,T,W,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(V){D(V,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?
null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(J,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(D(V.responseText,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(D(J,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight)}};mxEvent.addListener(n,"dragover",K);mxEvent.addListener(n,"drop",c);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",c);k.appendChild(n);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
+(D(J,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight)}};mxEvent.addListener(n,"dragover",K);mxEvent.addListener(n,"drop",c);mxEvent.addListener(m,"dragover",K);mxEvent.addListener(m,"drop",c);k.appendChild(n);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
d.appendChild(f);"draw.io"!=b.getServiceName()||null==v||v.constructor!=DriveLibrary&&v.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&v.getPublicUrl(function(F){b.spinner.stop();if(null!=F){var J=b.getSearch("create title mode url drive splash state clibs ui".split(" "));J+=(0==J.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(F);F=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
"/"+J,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(F.container,450,240,!0);F.init()}else v.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(v.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),
-function(){var F=b.createLibraryDataFromImages(e),J=q.value;/(\.xml)$/i.test(J)||(J+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,J,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(J)+"&format=xml&xml="+encodeURIComponent(F))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var m=document.createElement("input");m.setAttribute("multiple","multiple");
-m.setAttribute("type","file");mxEvent.addListener(m,"change",function(F){N=!1;b.importFiles(m.files,0,0,b.maxImageSize,function(J,M,H,G,E,P,T,W,U){null!=m.files&&(t(F)(J,M,H,G,E,P,T,W,U),m.type="",m.type="file",m.value="")});n.scrollTop=n.scrollHeight});m.style.display="none";document.body.appendChild(m);b.libDlgFileInputElt=m}g=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=
+function(){var F=b.createLibraryDataFromImages(e),J=q.value;/(\.xml)$/i.test(J)||(J+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,J,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(J)+"&format=xml&xml="+encodeURIComponent(F))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");
+p.setAttribute("type","file");mxEvent.addListener(p,"change",function(F){N=!1;b.importFiles(p.files,0,0,b.maxImageSize,function(J,M,H,G,E,P,T,W,U){null!=p.files&&(t(F)(J,M,H,G,E,P,T,W,U),p.type="",p.type="file",p.value="")});n.scrollTop=n.scrollHeight});p.style.display="none";document.body.appendChild(p);b.libDlgFileInputElt=p}g=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=
mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(F,J,M){N=!1;if(null!=F){if("data:image/"==F.substring(0,11)){var H=F.indexOf(",");0<H&&(F=F.substring(0,H)+";base64,"+F.substring(H+1))}D(F,null,0,0,J,M);n.scrollTop=n.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(F,J,M,H){b.saveLibrary(F,J,M,H)};g=mxUtils.button(mxResources.get("save"),
mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(q.value,e,v,x)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(f);k.appendChild(d);this.container=k},EditShapeDialog=function(b,f,k,d,v){d=null!=d?d:300;v=null!=v?v:120;var x=document.createElement("table"),B=document.createElement("tbody");x.style.cellPadding="4px";var D=document.createElement("tr");var K=document.createElement("td");K.setAttribute("colspan",
"2");K.style.fontSize="10pt";mxUtils.write(K,k);D.appendChild(K);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=d-200+"px";c.style.height=v+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};K.appendChild(c);D.appendChild(K);K=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top=
"6px";k.style.width="200px";k.style.height=v+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);K.appendChild(k);var e=new Graph(k);e.setEnabled(!1);var g=b.editor.graph.cloneCell(f);e.addCells([g]);k=e.view.getState(g);var q="";null!=k.shape&&null!=k.shape.stencil&&(q=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(c,q||"");k=e.getGraphBounds();v=Math.min(160/k.width,(v-40)/k.height);e.view.scaleAndTranslate(v,20/v-k.x,20/v-k.y);D.appendChild(K);
B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");K.setAttribute("colspan","2");K.style.paddingTop="2px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),v.className="geBtn",K.appendChild(v));v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&K.appendChild(v);
-var n=function(p,z,C){var u=c.value,y=mxUtils.parseXml(u);u=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(C&&b.hideDialog(),y=!p.model.contains(z),!C||y||u!=q){u=Graph.compress(u);p.getModel().beginUpdate();try{if(y){var I=b.editor.graph.getFreeInsertPoint();z.geometry.x=I.x;z.geometry.y=I.y;p.addCell(z)}p.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+u+")",[z])}catch(N){throw N;}finally{p.getModel().endUpdate()}y&&(p.setSelectionCell(z),p.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){n(e,g,!1)});k.className="geBtn";K.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){n(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";K.appendChild(k);b.editor.cancelFirst||K.appendChild(v);D.appendChild(K);B.appendChild(D);x.appendChild(B);this.container=x},CustomDialog=function(b,f,k,d,v,x,
+var n=function(m,z,C){var u=c.value,y=mxUtils.parseXml(u);u=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(C&&b.hideDialog(),y=!m.model.contains(z),!C||y||u!=q){u=Graph.compress(u);m.getModel().beginUpdate();try{if(y){var I=b.editor.graph.getFreeInsertPoint();z.geometry.x=I.x;z.geometry.y=I.y;m.addCell(z)}m.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+u+")",[z])}catch(N){throw N;}finally{m.getModel().endUpdate()}y&&(m.setSelectionCell(z),m.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){n(e,g,!1)});k.className="geBtn";K.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){n(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";K.appendChild(k);b.editor.cancelFirst||K.appendChild(v);D.appendChild(K);B.appendChild(D);x.appendChild(B);this.container=x},CustomDialog=function(b,f,k,d,v,x,
B,D,K,c,e){var g=document.createElement("div");g.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=B&&q.appendChild(B);b.isOffline()||null==x||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(x)}),f.className="geBtn",q.appendChild(f));K=mxUtils.button(K||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});K.className="geBtn";D&&(K.style.display="none");b.editor.cancelFirst&&q.appendChild(K);v=mxUtils.button(v||
-mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var n=k();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}c&&b.hideDialog(null,null,this.container)}));q.appendChild(v);v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(K);if(null!=e)for(D=0;D<e.length;D++)(function(n,p,z){n=mxUtils.button(n,function(C){p(C)});null!=z&&n.setAttribute("title",z);n.className="geBtn";q.appendChild(n)})(e[D][0],e[D][1],e[D][2]);
-g.appendChild(q);this.cancelBtn=K;this.okButton=v;this.container=g},TemplatesDialog=function(b,f,k,d,v,x,B,D,K,c,e,g,q,n,p){function z(ea){Ia.innerText=ea;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function C(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",A=l,l=null)}function u(ea,ha,oa,ma,va,Ca,ya){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";W.querySelector(".geTempDlgRadioBtn[data-id="+
+mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var n=k();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}c&&b.hideDialog(null,null,this.container)}));q.appendChild(v);v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(K);if(null!=e)for(D=0;D<e.length;D++)(function(n,m,z){n=mxUtils.button(n,function(C){m(C)});null!=z&&n.setAttribute("title",z);n.className="geBtn";q.appendChild(n)})(e[D][0],e[D][1],e[D][2]);
+g.appendChild(q);this.cancelBtn=K;this.okButton=v;this.container=g},TemplatesDialog=function(b,f,k,d,v,x,B,D,K,c,e,g,q,n,m){function z(ea){Ia.innerText=ea;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function C(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",A=l,l=null)}function u(ea,ha,oa,ma,va,Ca,ya){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";W.querySelector(".geTempDlgRadioBtn[data-id="+
ma+"]").className="geTempDlgRadioBtn "+(ya?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");W.querySelector("."+ha).src="/images/"+oa+"-sel.svg";W.querySelector("."+va).src="/images/"+Ca+".svg";return!0}function y(ea,ha,oa,ma){function va(pa,Ha){null==ya?(pa=/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)?PROXY_URL+"?url="+encodeURIComponent(pa):TEMPLATE_PATH+"/"+pa,mxUtils.get(pa,mxUtils.bind(this,function(Ma){200<=Ma.getStatus()&&299>=Ma.getStatus()&&(ya=Ma.getText());Ha(ya)}))):Ha(ya)}
function Ca(pa,Ha,Ma){if(null!=pa&&mxUtils.isAncestorNode(document.body,ha)&&(pa=mxUtils.parseXml(pa),pa=Editor.extractGraphModel(pa.documentElement,!0),null!=pa)){"mxfile"==pa.nodeName&&(pa=Editor.parseDiagramNode(pa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(pa.ownerDocument),Ja=new mxGraphModel;Ra.decode(pa,Ja);pa=Ja.root.getChildAt(0).children||[];b.sidebar.createTooltip(ha,pa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(Ha,Ma),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";W.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(W.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}var ya=null;if(ua||b.sidebar.currentElt==
ha)b.sidebar.hideTooltip();else{var ta=function(pa){ua&&b.sidebar.currentElt==ha&&Ca(pa,mxEvent.getClientX(ma),mxEvent.getClientY(ma));ua=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ha;ua=!0;oa.src="/images/aui-wait.gif";ea.isExt?K(ea,ta,function(){z(mxResources.get("cantLoadPrev"));ua=!1;oa.src="/images/icon-search.svg"}):va(ea.url,ta)}}function I(ea,ha,oa){if(null!=L){for(var ma=L.className.split(" "),va=0;va<ma.length;va++)if(-1<ma[va].indexOf("Active")){ma.splice(va,
-1);break}L.className=ma.join(" ")}null!=ea?(L=ea,L.className+=" "+ha,Q=oa,Oa.className="geTempDlgCreateBtn"):(Q=L=null,Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(ea,ha){if(null!=Q){var oa=function(ta){ya.isExternal?K(ya,function(pa){ma(pa,ta)},va):ya.url?mxUtils.get(TEMPLATE_PATH+"/"+ya.url,mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?ma(pa.getText(),ta):va()})):ma(b.emptyDiagramXml,ta)},ma=function(ta,pa){p||b.hideDialog(!0);f(ta,pa,ya,ha)},va=function(){z(mxResources.get("cannotLoad"));
+1);break}L.className=ma.join(" ")}null!=ea?(L=ea,L.className+=" "+ha,Q=oa,Oa.className="geTempDlgCreateBtn"):(Q=L=null,Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(ea,ha){if(null!=Q){var oa=function(ta){ya.isExternal?K(ya,function(pa){ma(pa,ta)},va):ya.url?mxUtils.get(TEMPLATE_PATH+"/"+ya.url,mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?ma(pa.getText(),ta):va()})):ma(b.emptyDiagramXml,ta)},ma=function(ta,pa){m||b.hideDialog(!0);f(ta,pa,ya,ha)},va=function(){z(mxResources.get("cannotLoad"));
Ca()},Ca=function(){Q=ya;Oa.className="geTempDlgCreateBtn";ha&&(Aa.className="geTempDlgOpenBtn")},ya=Q;Q=null;"boolean"!==typeof ha&&(ha=ya.isExternal&&g);1==ea?c(ya.url,ya):ha?(Aa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),oa,ea,function(ta){var pa=null!=ta&&0<ta.length;return pa&&p?(oa(ta),!1):pa},null,null,null,Ca,n?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function t(ea){Oa.innerText=mxResources.get(ca||ea?"create":"copy");ea=ea?"none":"";g&&(Aa.style.display=ea);for(var ha=W.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ha.length;oa++)ha[oa].style.display=ea}function m(ea,ha,oa,ma,va){va||(la.innerText="",I(),X=ea,aa=ma);var Ca=null;if(oa){Ca=document.createElement("table");
+mxResources.get("ok"),oa,ea,function(ta){var pa=null!=ta&&0<ta.length;return pa&&m?(oa(ta),!1):pa},null,null,null,Ca,n?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function t(ea){Oa.innerText=mxResources.get(ca||ea?"create":"copy");ea=ea?"none":"";g&&(Aa.style.display=ea);for(var ha=W.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ha.length;oa++)ha[oa].style.display=ea}function p(ea,ha,oa,ma,va){va||(la.innerText="",I(),X=ea,aa=ma);var Ca=null;if(oa){Ca=document.createElement("table");
Ca.className="geTempDlgDiagramsListGrid";var ya=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerText=mxResources.get("diagram");ya.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("changedBy");ya.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("lastModifiedOn");ya.appendChild(ta);Ca.appendChild(ya);la.appendChild(Ca)}for(ya=0;ya<ea.length;ya++){ea[ya].isExternal=
!ha;var pa=ea[ya].url,Ha=(ta=mxUtils.htmlEntities(ha?mxResources.get(ea[ya].title,null,ea[ya].title):ea[ya].title))||ea[ya].url,Ma=ea[ya].imgUrl,Ra=ea[ya].changedBy||"",Ja="";ea[ya].lastModifiedOn&&(Ja=b.timeSince(new Date(ea[ya].lastModifiedOn)),null==Ja&&(Ja=mxResources.get("lessThanAMinute")),Ja=mxResources.get("timeAgo",[Ja],"{1} ago"));Ma||(Ma=TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png");pa=oa?50:15;null!=ta&&ta.length>pa&&(ta=ta.substring(0,pa)+"&hellip;");if(oa){var Pa=document.createElement("tr");
Ma=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));va||Ma.appendChild(Qa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ta;Ma.appendChild(Ha);Pa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ra;Pa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ja;Pa.appendChild(Ma);Ca.appendChild(Pa);
null==L&&(t(ha),I(Pa,"geTempDlgDiagramsListGridActive",ea[ya]));(function(Ka,Ta,Va){mxEvent.addListener(Pa,"click",function(){L!=Ta&&(t(ha),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Pa,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(ea[ya],Pa,Qa)}else{var Na=document.createElement("div");Na.className="geTempDlgDiagramTile";Na.setAttribute("title",Ha);null==L&&(t(ha),I(Na,"geTempDlgDiagramTileActive",ea[ya]));Ra=document.createElement("div");Ra.className=
"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ka,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Ma?Ma.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=Ma;Ra.appendChild(Sa);Na.appendChild(Ra);Ra=document.createElement("div");
Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ta?ta:"";Na.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));va||Na.appendChild(Qa);(function(Ka,Ta,Va){mxEvent.addListener(Na,"click",function(){L!=Ta&&(t(ha),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Na,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(ea[ya],Na,Qa);la.appendChild(Na)}}for(var Ua in ma)ea=
-ma[Ua],0<ea.length&&(va=document.createElement("div"),va.className="geTempDlgImportCat",va.innerText=mxResources.get(Ua,null,Ua),la.appendChild(va),m(ea,ha,oa,null,!0))}function F(ea,ha){za.innerText="";I();var oa=Math.floor(za.offsetWidth/150)-1;ha=!ha&&ea.length>oa?oa:ea.length;for(var ma=0;ma<ha;ma++){var va=ea[ma];va.isCategory=!0;var Ca=document.createElement("div"),ya=mxResources.get(va.title);null==ya&&(ya=va.title.substring(0,1).toUpperCase()+va.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem";
+ma[Ua],0<ea.length&&(va=document.createElement("div"),va.className="geTempDlgImportCat",va.innerText=mxResources.get(Ua,null,Ua),la.appendChild(va),p(ea,ha,oa,null,!0))}function F(ea,ha){za.innerText="";I();var oa=Math.floor(za.offsetWidth/150)-1;ha=!ha&&ea.length>oa?oa:ea.length;for(var ma=0;ma<ha;ma++){var va=ea[ma];va.isCategory=!0;var Ca=document.createElement("div"),ya=mxResources.get(va.title);null==ya&&(ya=va.title.substring(0,1).toUpperCase()+va.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem";
Ca.setAttribute("title",ya);ya=mxUtils.htmlEntities(ya);15<ya.length&&(ya=ya.substring(0,15)+"&hellip;");null==L&&(t(!0),I(Ca,"geTempDlgNewDiagramCatItemActive",va));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var pa=document.createElement("img");pa.src=NEW_DIAGRAM_CATS_PATH+"/"+va.img;ta.appendChild(pa);Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=ya;Ca.appendChild(ta);za.appendChild(Ca);(function(Ha,
Ma){mxEvent.addListener(Ca,"click",function(){L!=Ma&&(t(!0),I(Ma,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Ca,"dblclick",N)})(va,Ca)}Ca=document.createElement("div");Ca.className="geTempDlgNewDiagramCatItem";ya=mxResources.get("showAllTemps");Ca.setAttribute("title",ya);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";ta.innerText="...";ta.style.fontSize="32px";Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";
ta.innerText=ya;Ca.appendChild(ta);za.appendChild(Ca);mxEvent.addListener(Ca,"click",function(){function Ha(){var Ra=Ma.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}ca=!0;var Ma=W.querySelector(".geTemplatesList");Ma.style.display="block";ka.style.width="";Ga.style.display="";Ga.value="";Y=null;Ha()});fa.style.display=ea.length<=oa?"none":""}function J(ea,ha,oa){function ma(Sa,Ua){var Ka=mxResources.get(Sa);null==Ka&&(Ka=Sa.substring(0,1).toUpperCase()+Sa.substring(1));
-Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function va(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){l!=Ka&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Ea.style.display="none",Da.style.minHeight="100%"),l=Ka,l.style.fontWeight="bold",l.style.textDecoration="underline",ka.scrollTop=0,U&&(V=!0),ia.innerHTML=Ua,qa.style.display="none",m(Va?ha[Sa]:
+Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function va(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){l!=Ka&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Ea.style.display="none",Da.style.minHeight="100%"),l=Ka,l.style.fontWeight="bold",l.style.textDecoration="underline",ka.scrollTop=0,U&&(V=!0),ia.innerHTML=Ua,qa.style.display="none",p(Va?ha[Sa]:
Ta?La[Sa][Ta]:ea[Sa],Va?!1:!0))})}var Ca=W.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Ca.appendChild(oa);for(var ya in ha){oa=document.createElement("div");var ta=ha[ya];ta=ma(ya,ta);oa.className="geTemplateCatLink";oa.setAttribute("title",ta.fullLbl);oa.innerHTML=ta.lbl;Ca.appendChild(oa);va(ya,ta.lblOnly,oa,
null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Ca.appendChild(oa)}for(ya in ea){var pa=La[ya],Ha=oa=document.createElement(pa?"ul":"div");ta=ea[ya];ta=ma(ya,ta);if(null!=pa){var Ma=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ta.fullLbl);
Ra.innerHTML=ta.lbl;Ha=Ra;Ma.appendChild(Ra);var Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Pa in pa){var Qa=document.createElement("li"),Na=ma(Pa,pa[Pa]);Qa.setAttribute("title",Na.fullLbl);Qa.innerHTML=Na.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";va(ya,Na.lblOnly,Qa,Pa);Ja.appendChild(Qa)}Ma.appendChild(Ja);oa.className="geTempTree";oa.appendChild(Ma);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ka=
@@ -11390,7 +11390,7 @@ Ha)}}function M(){mxUtils.get(d,function(ea){if(!Ba){Ba=!0;ea=ea.getXml().docume
if(null==ma&&(Ca=va.indexOf("/"),ma=va.substring(0,Ca),null==oa)){var ya=va.indexOf("/",Ca+1);-1<ya&&(oa=va.substring(Ca+1,ya))}Ca=wa[ma];null==Ca&&(sa++,Ca=[],wa[ma]=Ca);va=ea.getAttribute("clibs");null!=ha[va]&&(va=ha[va]);va={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),clibs:va,tags:ea.getAttribute("tags")};Ca.push(va);null!=oa&&(Ca=La[ma],null==Ca&&(Ca={},La[ma]=Ca),ma=Ca[oa],null==ma&&(ma=[],
Ca[oa]=ma),ma.push(va))}ea=ea.nextSibling}J(wa,ja,da)}})}function H(ea){B&&(ka.scrollTop=0,la.innerText="",ra.spin(la),V=!1,U=!0,ia.innerText=mxResources.get("recentDiag"),Y=null,B(ba,function(){z(mxResources.get("cannotLoad"));ba([])},ea?null:x))}function G(ea){if(""==ea)null!=A&&(A.click(),A=null);else{if(null==TemplatesDialog.tagsList[d]){var ha={};for(Ha in wa)for(var oa=wa[Ha],ma=0;ma<oa.length;ma++){var va=oa[ma];if(null!=va.tags)for(var Ca=va.tags.toLowerCase().split(";"),ya=0;ya<Ca.length;ya++)null==
ha[Ca[ya]]&&(ha[Ca[ya]]=[]),ha[Ca[ya]].push(va)}TemplatesDialog.tagsList[d]=ha}var ta=ea.toLowerCase().split(" ");ha=TemplatesDialog.tagsList[d];if(0<da&&null==ha.__tagsList__){for(Ha in ja)for(oa=ja[Ha],ma=0;ma<oa.length;ma++)for(va=oa[ma],Ca=va.title.split(" "),Ca.push(Ha),ya=0;ya<Ca.length;ya++){var pa=Ca[ya].toLowerCase();null==ha[pa]&&(ha[pa]=[]);ha[pa].push(va)}ha.__tagsList__=!0}var Ha=[];oa={};for(ma=Ca=0;ma<ta.length;ma++)if(0<ta[ma].length){pa=ha[ta[ma]];var Ma={};Ha=[];if(null!=pa)for(ya=
-0;ya<pa.length;ya++)va=pa[ya],0==Ca==(null==oa[va.url])&&(Ma[va.url]=!0,Ha.push(va));oa=Ma;Ca++}0==Ha.length?ia.innerText=mxResources.get("noResultsFor",[ea]):m(Ha,!0)}}function E(ea){if(Y!=ea||R!=Z)C(),ka.scrollTop=0,la.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+ea+'"',na=null,ca?G(ea):D&&(ea?(ra.spin(la),V=!1,U=!0,D(ea,ba,function(){z(mxResources.get("searchFailed"));ba([])},R?null:x)):H(R)),Y=ea,Z=R}function P(ea){null!=na&&clearTimeout(na);13==ea.keyCode?E(Ga.value):na=setTimeout(function(){E(Ga.value)},
+0;ya<pa.length;ya++)va=pa[ya],0==Ca==(null==oa[va.url])&&(Ma[va.url]=!0,Ha.push(va));oa=Ma;Ca++}0==Ha.length?ia.innerText=mxResources.get("noResultsFor",[ea]):p(Ha,!0)}}function E(ea){if(Y!=ea||R!=Z)C(),ka.scrollTop=0,la.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+ea+'"',na=null,ca?G(ea):D&&(ea?(ra.spin(la),V=!1,U=!0,D(ea,ba,function(){z(mxResources.get("searchFailed"));ba([])},R?null:x)):H(R)),Y=ea,Z=R}function P(ea){null!=na&&clearTimeout(na);13==ea.keyCode?E(Ga.value):na=setTimeout(function(){E(Ga.value)},
1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(D?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
@@ -11398,10 +11398,10 @@ mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTemp
"geTemplateDlg";this.container=W;d=null!=d?d:TEMPLATE_PATH+"/index.xml";v=null!=v?v:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,V=!1,l=null,A=null,L=null,Q=null,O=!1,R=!0,S=!1,X=[],aa=null,Y,Z,ca=!1,fa=W.querySelector(".geTempDlgShowAllBtn"),la=W.querySelector(".geTempDlgDiagramsTiles"),ia=W.querySelector(".geTempDlgDiagramsListTitle"),qa=W.querySelector(".geTempDlgDiagramsListBtns"),ka=W.querySelector(".geTempDlgContent"),Da=W.querySelector(".geTempDlgDiagramsList"),Ea=W.querySelector(".geTempDlgNewDiagramCat"),
za=W.querySelector(".geTempDlgNewDiagramCatList"),Oa=W.querySelector(".geTempDlgCreateBtn"),Aa=W.querySelector(".geTempDlgOpenBtn"),Ga=W.querySelector(".geTempDlgSearchBox"),Ia=W.querySelector(".geTempDlgErrMsg"),ra=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(W.querySelector(".geTempDlgBack"),"click",function(){C();ca=!1;W.querySelector(".geTemplatesList").style.display="none";ka.style.width=
"100%";Ea.style.display="";Da.style.minHeight="calc(100% - 280px)";Ga.style.display=D?"":"none";Ga.value="";Y=null;H(R)});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){u(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==Y?H(R):E(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){u(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
-"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):E(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){u(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,m(X,!1,S,aa))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){u(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,m(X,!1,S,aa))});var ua=!1;
+"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):E(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){u(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,p(X,!1,S,aa))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){u(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,p(X,!1,S,aa))});var ua=!1;
mxEvent.addListener(fa,"click",function(){O?(Ea.style.height="280px",za.style.height="190px",fa.innerText=mxResources.get("showMore"),F(xa)):(Ea.style.height="440px",za.style.height="355px",fa.innerText=mxResources.get("showLess"),F(xa,!0));O=!O});var Ba=!1,Fa=!1,wa={},La={},ja={},xa=[],sa=1,da=0;null!=e?e(function(ea,ha){ja=ea;da=ha;M()},M):M();mxUtils.get(v,function(ea){if(!Fa){Fa=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==typeof ea.getAttribute&&null!=ea.getAttribute("title")&&
-xa.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;F(xa)}});var ba=function(ea,ha,oa){qa.style.display="";ra.stop();U=!1;if(V)V=!1;else if(ha)la.innerText=ha;else{oa=oa||{};ha=0;for(var ma in oa)ha+=oa[ma].length;0==ea.length&&0==ha?la.innerText=mxResources.get("noDiagrams"):m(ea,!1,S,0==ha?null:oa)}};H(R);var na=null;mxEvent.addListener(Ga,"keyup",P);mxEvent.addListener(Ga,"search",P);mxEvent.addListener(Ga,
-"input",P);mxEvent.addListener(Oa,"click",function(ea){N(!1,!1)});g&&mxEvent.addListener(Aa,"click",function(ea){N(!1,!0)});q&&mxEvent.addListener(W.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){N(!0)});mxEvent.addListener(W.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+xa.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;F(xa)}});var ba=function(ea,ha,oa){qa.style.display="";ra.stop();U=!1;if(V)V=!1;else if(ha)la.innerText=ha;else{oa=oa||{};ha=0;for(var ma in oa)ha+=oa[ma].length;0==ea.length&&0==ha?la.innerText=mxResources.get("noDiagrams"):p(ea,!1,S,0==ha?null:oa)}};H(R);var na=null;mxEvent.addListener(Ga,"keyup",P);mxEvent.addListener(Ga,"search",P);mxEvent.addListener(Ga,
+"input",P);mxEvent.addListener(Oa,"click",function(ea){N(!1,!1)});g&&mxEvent.addListener(Aa,"click",function(ea){N(!1,!0)});q&&mxEvent.addListener(W.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){N(!0)});mxEvent.addListener(W.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();m||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,f,k,d){var v=document.createElement("div");v.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("done"));var B="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
(B=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(B=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(B=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[B],"You are now authorized in {1}"));
k=mxUtils.button(k,d);k.insertBefore(D,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";v.appendChild(x);v.appendChild(b);v.appendChild(k);this.container=v},FontDialog=function(b,f,k,d,v){function x(I){this.style.border="";13==I.keyCode&&y.click()}var B=document.createElement("table"),D=document.createElement("tbody");B.style.marginTop="8px";var K=document.createElement("tr");var c=document.createElement("td");c.colSpan=2;c.style.whiteSpace=
@@ -11409,13 +11409,13 @@ k=mxUtils.button(k,d);k.insertBefore(D,k.firstChild);k.style.marginTop="6px";k.c
D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(c);var q=document.createElement("input");"s"==d&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";c=document.createElement("td");c.appendChild(q);K.appendChild(c);D.appendChild(K);K=document.createElement("tr");
c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","googlefonts");n.setAttribute("type","radio");n.setAttribute("name","current-fontdialog");n.setAttribute("id","fontdialog-googlefonts");c.appendChild(n);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
null,"Google Fonts"));c.appendChild(g);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(g=b.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),c.appendChild(g));K.appendChild(c);D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");
-K.appendChild(c);var p=document.createElement("input");"g"==d&&p.setAttribute("value",f);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(p);K.appendChild(c);D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
+K.appendChild(c);var m=document.createElement("input");"g"==d&&m.setAttribute("value",f);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(m);K.appendChild(c);D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");c.appendChild(z);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));c.appendChild(g);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft=
"15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(c);var C=document.createElement("input");"w"==d&&(Editor.enableWebFonts?C.setAttribute("value",f):q.setAttribute("value",f));C.style.marginLeft="4px";C.style.width="250px";C.className="dlg_fontName_w";c=document.createElement("td");c.appendChild(C);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";
-c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");K.appendChild(c);var u=document.createElement("input");u.setAttribute("value",k||"");u.style.marginLeft="4px";u.style.width="250px";u.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(u);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);this.init=function(){var I=q;"g"==d?I=p:"w"==d&&Editor.enableWebFonts&&(I=C);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");K.appendChild(c);var u=document.createElement("input");u.setAttribute("value",k||"");u.style.marginLeft="4px";u.style.width="250px";u.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(u);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);this.init=function(){var I=q;"g"==d?I=m:"w"==d&&Editor.enableWebFonts&&(I=C);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
I.select():document.execCommand("selectAll",!1,null)};K=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();v()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f);
-var y=mxUtils.button(mxResources.get("apply"),function(){if(e.checked){var I=q.value;var N="s"}else if(n.checked){I=p.value;var t=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");N="g"}else z.checked&&(I=C.value,t=u.value,N="w");var m=t;var F=N,J=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(B.querySelector(".dlg_fontName_"+F).style.border="1px solid red",m=!1):"w"!=F||J.test(m)?m=!0:(B.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",m=!1);m&&(v(I,t,N),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",x);mxEvent.addListener(p,"keypress",x);mxEvent.addListener(C,"keypress",x);mxEvent.addListener(u,"keypress",x);mxEvent.addListener(q,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(p,"focus",function(){n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(C,"focus",function(){z.setAttribute("checked","checked");z.checked=
+var y=mxUtils.button(mxResources.get("apply"),function(){if(e.checked){var I=q.value;var N="s"}else if(n.checked){I=m.value;var t=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");N="g"}else z.checked&&(I=C.value,t=u.value,N="w");var p=t;var F=N,J=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(B.querySelector(".dlg_fontName_"+F).style.border="1px solid red",p=!1):"w"!=F||J.test(p)?p=!0:(B.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",p=!1);p&&(v(I,t,N),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",x);mxEvent.addListener(m,"keypress",x);mxEvent.addListener(C,"keypress",x);mxEvent.addListener(u,"keypress",x);mxEvent.addListener(q,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(m,"focus",function(){n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(C,"focus",function(){z.setAttribute("checked","checked");z.checked=
!0});mxEvent.addListener(u,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});c.appendChild(y);b.editor.cancelFirst||c.appendChild(f);K.appendChild(c);D.appendChild(K);B.appendChild(D);this.container=B};
function AspectDialog(b,f,k,d,v){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("pages"));f.appendChild(x);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("layers"));f.appendChild(x);x=document.createElement("div");x.className="geAspectDlgList";
f.appendChild(x);this.pagesContainer=k;this.layersContainer=x;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=v&&v()});x.className="geBtn";b.editor.cancelFirst&&k.appendChild(x);var B=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(B);B.className="geBtn gePrimaryBtn";
@@ -11432,22 +11432,22 @@ mxUtils.write(D,mxResources.get("borderWidth")+":");v.appendChild(D);var c=docum
parseInt(K.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(c.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(v)&&!/(\.svg)$/i.test(v)){var e=null!=d?d.isCompressed():Editor.compressXml;v=document.createElement("tr");D=document.createElement("td");D.style.whiteSpace="nowrap";D.style.fontSize="10pt";D.style.width="120px";mxUtils.write(D,mxResources.get("compressed")+":");v.appendChild(D);var g=document.createElement("input");g.setAttribute("type","checkbox");
e&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(g);v.appendChild(D);k.appendChild(v);this.init=function(){g.focus()};x=function(){null!=b.fileNode&&e!=g.checked&&(b.fileNode.setAttribute("compressed",g.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){v=document.createElement("tr");D=document.createElement("td");D.style.whiteSpace="nowrap";D.style.fontSize="10pt";
D.style.width="120px";mxUtils.write(D,mxResources.get("realtimeCollaboration")+":");v.appendChild(D);var q=document.createElement("input");q.setAttribute("type","checkbox");var n=d.isRealtimeEnabled();if(n="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=x;x=function(){prevApply();b.hideDialog();q.checked!=n&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(q.checked,mxUtils.bind(this,
-function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(q);D.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));v.appendChild(D);k.appendChild(v)}this.init=null!=this.init?this.init:
+function(m){b.spinner.stop()}),mxUtils.bind(this,function(m){b.spinner.stop();b.showError(mxResources.get("error"),null!=m&&null!=m.error?m.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(q);D.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));v.appendChild(D);k.appendChild(v)}this.init=null!=this.init?this.init:
function(){};x=mxUtils.button(mxResources.get("apply"),x);x.className="geBtn gePrimaryBtn";v=document.createElement("tr");D=document.createElement("td");D.colSpan=2;D.style.paddingTop="20px";D.style.whiteSpace="nowrap";D.setAttribute("align","center");B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";b.editor.cancelFirst&&D.appendChild(B);D.appendChild(x);b.editor.cancelFirst||D.appendChild(B);v.appendChild(D);k.appendChild(v);f.appendChild(k);this.container=
f},ConnectionPointsDialog=function(b,f){function k(){null!=v&&v.destroy()}var d=document.createElement("div");d.style.userSelect="none";var v=null;this.init=function(){function x(G,E){G=new mxCell("",new mxGeometry(G,E,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");G.vertex=!0;G.cp=!0;return g.addCell(G)}function B(G){G=g.getSelectionCells();g.deleteCells(G)}function D(){var G=parseInt(F.value)||0;G=0>G?0:100<G?100:G;
-F.value=G;var E=parseInt(M.value)||0;E=0>E?0:100<E?100:E;M.value=E;var P=parseInt(J.value)||0,T=parseInt(H.value)||0;G=g.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(G/100,E/100),!1,null,P,T));E=g.getSelectionCell();if(null!=E){P=E.geometry.clone();T=g.view.scale;var W=g.view.translate;P.x=(G.x-3*T)/T-W.x;P.y=(G.y-3*T)/T-W.y;g.model.setGeometry(E,P)}}function K(G){var E=0,P=0,T=q.geometry,W=mxUtils.format((G.geometry.x+3-T.x)/T.width);G=mxUtils.format((G.geometry.y+3-T.y)/T.height);
-0>W?(E=W*T.width,W=0):1<W&&(E=(W-1)*T.width,W=1);0>G?(P=G*T.height,G=0):1<G&&(P=(G-1)*T.height,G=1);return{x:W,y:G,dx:parseInt(E),dy:parseInt(P)}}function c(){if(1==g.getSelectionCount()){var G=g.getSelectionCell();G=K(G);F.value=100*G.x;M.value=100*G.y;J.value=G.dx;H.value=G.dy;m.style.visibility=""}else m.style.visibility="hidden"}var e=document.createElement("div");e.style.width="350px";e.style.height="350px";e.style.overflow="hidden";e.style.border="1px solid lightGray";e.style.boxSizing="border-box";
+F.value=G;var E=parseInt(M.value)||0;E=0>E?0:100<E?100:E;M.value=E;var P=parseInt(J.value)||0,T=parseInt(H.value)||0;G=g.getConnectionPoint(m,new mxConnectionConstraint(new mxPoint(G/100,E/100),!1,null,P,T));E=g.getSelectionCell();if(null!=E){P=E.geometry.clone();T=g.view.scale;var W=g.view.translate;P.x=(G.x-3*T)/T-W.x;P.y=(G.y-3*T)/T-W.y;g.model.setGeometry(E,P)}}function K(G){var E=0,P=0,T=q.geometry,W=mxUtils.format((G.geometry.x+3-T.x)/T.width);G=mxUtils.format((G.geometry.y+3-T.y)/T.height);
+0>W?(E=W*T.width,W=0):1<W&&(E=(W-1)*T.width,W=1);0>G?(P=G*T.height,G=0):1<G&&(P=(G-1)*T.height,G=1);return{x:W,y:G,dx:parseInt(E),dy:parseInt(P)}}function c(){if(1==g.getSelectionCount()){var G=g.getSelectionCell();G=K(G);F.value=100*G.x;M.value=100*G.y;J.value=G.dx;H.value=G.dy;p.style.visibility=""}else p.style.visibility="hidden"}var e=document.createElement("div");e.style.width="350px";e.style.height="350px";e.style.overflow="hidden";e.style.border="1px solid lightGray";e.style.boxSizing="border-box";
mxEvent.disableContextMenu(e);d.appendChild(e);var g=new Graph(e);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!0);g.setConnectable(!1);g.setTooltips(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;g.maxFitScale=2;e=f.geometry;var q=new mxCell(f.value,new mxGeometry(0,0,e.width,e.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;g.addCell(q);g.dblClick=function(G,E){if(null!=E&&E!=q)g.setSelectionCell(E);else{E=
mxUtils.convertPoint(g.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=g.view.scale;var P=g.view.translate;g.setSelectionCell(x((E.x-3*G)/G-P.x,(E.y-3*G)/G-P.y))}};v=new mxKeyHandler(g);v.bindKey(46,B);v.bindKey(8,B);g.getRubberband().isForceRubberbandEvent=function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==q)};g.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var n=g.isCellSelectable;g.isCellSelectable=function(G){return G==q?!1:
-n.apply(this,arguments)};g.getLinkForCell=function(){return null};var p=g.view.getState(q);e=g.getAllConnectionConstraints(p);for(var z=0;null!=e&&z<e.length;z++){var C=g.getConnectionPoint(p,e[z]);x(C.x-3,C.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
+n.apply(this,arguments)};g.getLinkForCell=function(){return null};var m=g.view.getState(q);e=g.getAllConnectionConstraints(m);for(var z=0;null!=e&&z<e.length;z++){var C=g.getConnectionPoint(m,e[z]);x(C.x-3,C.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
"-6px":"0px";mxUtils.setOpacity(z,60);C=mxUtils.button("",function(){g.zoomOut()});C.className="geSprite geSprite-zoomout";C.setAttribute("title",mxResources.get("zoomOut"));C.style.position="relative";C.style.outline="none";C.style.border="none";C.style.margin="2px";C.style.cursor="pointer";C.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(C,60);var u=mxUtils.button("",function(){g.fit(8);g.center()});u.className="geSprite geSprite-fit";u.setAttribute("title",mxResources.get("fit"));u.style.position=
"relative";u.style.outline="none";u.style.border="none";u.style.margin="2px";u.style.cursor="pointer";u.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(u,60);var y=mxUtils.button("",function(){g.zoomActual();g.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,
60);var I=mxUtils.button("",B);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);e=document.createElement("div");e.appendChild(z);e.appendChild(C);e.appendChild(y);e.appendChild(u);e.appendChild(I);d.appendChild(e);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min",
"1");N.setAttribute("value","1");N.style.width="45px";N.style.position="relative";N.style.top=mxClient.IS_FF?"0px":"-4px";N.style.margin="0 4px 0 4px";e.appendChild(N);var t=document.createElement("select");t.style.position="relative";t.style.top=mxClient.IS_FF?"0px":"-4px";C=["left","right","top","bottom"];for(z=0;z<C.length;z++)u=C[z],y=document.createElement("option"),mxUtils.write(y,mxResources.get(u)),y.value=u,t.appendChild(y);e.appendChild(t);z=mxUtils.button(mxResources.get("add"),function(){var G=
-parseInt(N.value);G=1>G?1:100<G?100:G;N.value=G;for(var E=t.value,P=q.geometry,T=[],W=0;W<G;W++){switch(E){case "left":var U=P.x;var V=P.y+(W+1)*P.height/(G+1);break;case "right":U=P.x+P.width;V=P.y+(W+1)*P.height/(G+1);break;case "top":U=P.x+(W+1)*P.width/(G+1);V=P.y;break;case "bottom":U=P.x+(W+1)*P.width/(G+1),V=P.y+P.height}T.push(x(U-3,V-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";e.appendChild(z);var m=document.createElement("div");
-m.style.margin="4px 0px 8px 0px";m.style.whiteSpace="nowrap";m.style.height="24px";e=document.createElement("span");mxUtils.write(e,mxResources.get("dx"));m.appendChild(e);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";m.appendChild(F);mxUtils.write(m,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";
-m.appendChild(J);mxUtils.write(m,"pt");e=document.createElement("span");mxUtils.write(e,mxResources.get("dy"));e.style.marginLeft="12px";m.appendChild(e);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";m.appendChild(M);mxUtils.write(m,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";m.appendChild(H);
-mxUtils.write(m,"pt");d.appendChild(m);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(F,"change",D);mxEvent.addListener(M,"change",D);mxEvent.addListener(J,"change",D);mxEvent.addListener(H,"change",D);e=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});e.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var G=
+parseInt(N.value);G=1>G?1:100<G?100:G;N.value=G;for(var E=t.value,P=q.geometry,T=[],W=0;W<G;W++){switch(E){case "left":var U=P.x;var V=P.y+(W+1)*P.height/(G+1);break;case "right":U=P.x+P.width;V=P.y+(W+1)*P.height/(G+1);break;case "top":U=P.x+(W+1)*P.width/(G+1);V=P.y;break;case "bottom":U=P.x+(W+1)*P.width/(G+1),V=P.y+P.height}T.push(x(U-3,V-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";e.appendChild(z);var p=document.createElement("div");
+p.style.margin="4px 0px 8px 0px";p.style.whiteSpace="nowrap";p.style.height="24px";e=document.createElement("span");mxUtils.write(e,mxResources.get("dx"));p.appendChild(e);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";p.appendChild(F);mxUtils.write(p,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";
+p.appendChild(J);mxUtils.write(p,"pt");e=document.createElement("span");mxUtils.write(e,mxResources.get("dy"));e.style.marginLeft="12px";p.appendChild(e);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";p.appendChild(M);mxUtils.write(p,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";p.appendChild(H);
+mxUtils.write(p,"pt");d.appendChild(p);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(F,"change",D);mxEvent.addListener(M,"change",D);mxEvent.addListener(J,"change",D);mxEvent.addListener(H,"change",D);e=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});e.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var G=
g.model.cells,E=[],P=[],T;for(T in G){var W=G[T];W.cp&&P.push(K(W))}P.sort(function(U,V){return U.x!=V.x?U.x-V.x:U.y!=V.y?U.y-V.y:U.dx!=V.dx?U.dx-V.dx:U.dy-V.dy});for(G=0;G<P.length;G++)0<G&&P[G].x==P[G-1].x&&P[G].y==P[G-1].y&&P[G].dx==P[G-1].dx&&P[G].dy==P[G-1].dy||E.push("["+P[G].x+","+P[G].y+",0,"+P[G].dx+","+P[G].dy+"]");b.editor.graph.setCellStyles("points","["+E.join(",")+"]",[f]);k();b.hideDialog()});z.className="geBtn gePrimaryBtn";C=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
null,[f]);k();b.hideDialog()});C.className="geBtn";u=document.createElement("div");u.style.marginTop="10px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(e),u.appendChild(C),u.appendChild(z)):(u.appendChild(C),u.appendChild(z),u.appendChild(e));d.appendChild(u)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";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"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];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.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
@@ -11603,7 +11603,7 @@ font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
function(l,A,L){if(null!=A){var Q=function(R){if(null!=R)if(L)for(var S=0;S<R.length;S++)A[R[S].name]=R[S];else for(var X in A){var aa=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==A[X].type){aa=!0;break}aa||delete A[X]}},O=this.editorUi.editor.graph.view.getState(l);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),Q(O.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{Q(JSON.parse(l))}catch(R){}}};var n=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));n.apply(this,arguments);if(Editor.enableCustomProperties){for(var A=
-{},L=l.vertices,Q=l.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],A,0==O);for(O=0;O<Q.length;O++)this.findCommonProperties(Q[O],A,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,l))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+{},L=l.vertices,Q=l.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],A,0==O);for(O=0;O<Q.length;O++)this.findCommonProperties(Q[O],A,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,l))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
!0;StyleFormatPanel.prototype.addProperties=function(l,A,L){function Q(Ba,Fa,wa,La){ca.getModel().beginUpdate();try{var ja=[],xa=[];if(null!=wa.index){for(var sa=[],da=wa.parentRow.nextSibling;da&&da.getAttribute("data-pName")==Ba;)sa.push(da.getAttribute("data-pValue")),da=da.nextSibling;wa.index<sa.length?null!=La?sa.splice(La,1):sa[wa.index]=Fa:sa.push(Fa);null!=wa.size&&sa.length>wa.size&&(sa=sa.slice(0,wa.size));Fa=sa.join(",");null!=wa.countProperty&&(ca.setCellStyles(wa.countProperty,sa.length,
ca.getSelectionCells()),ja.push(wa.countProperty),xa.push(sa.length))}ca.setCellStyles(Ba,Fa,ca.getSelectionCells());ja.push(Ba);xa.push(Fa);if(null!=wa.dependentProps)for(Ba=0;Ba<wa.dependentProps.length;Ba++){var ba=wa.dependentPropsDefVal[Ba],na=wa.dependentPropsVals[Ba];if(na.length>Fa)na=na.slice(0,Fa);else for(var ea=na.length;ea<Fa;ea++)na.push(ba);na=na.join(",");ca.setCellStyles(wa.dependentProps[Ba],na,ca.getSelectionCells());ja.push(wa.dependentProps[Ba]);xa.push(na)}if("function"==typeof wa.onChange)wa.onChange(ca,
Fa);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",xa,"cells",ca.getSelectionCells()))}finally{ca.getModel().endUpdate()}}function O(Ba,Fa,wa){var La=mxUtils.getOffset(l,!0),ja=mxUtils.getOffset(Ba,!0);Fa.style.position="absolute";Fa.style.left=ja.x-La.x+"px";Fa.style.top=ja.y-La.y+"px";Fa.style.width=Ba.offsetWidth+"px";Fa.style.height=Ba.offsetHeight-(wa?4:0)+"px";Fa.style.zIndex=5}function R(Ba,Fa,wa){var La=document.createElement("div");La.style.width="32px";La.style.height=
@@ -11658,7 +11658,7 @@ l&&L[Q].getAttribute("data-font-src")!=A&&L[Q].setAttribute("data-font-src",A)}}
l[A]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[l]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=
(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var t=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,A,L,Q,O,R,S,X,aa,Y,Z,ca,fa,la){var ia=null,qa=null,ka=null;ca||null==this.themes||"darkTheme"!=this.defaultThemeName||(ia=this.stylesheet,qa=this.shapeForegroundColor,ka=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Da=t.apply(this,arguments),Ea=this.getCustomFonts();if(Z&&0<Ea.length){var za=Da.ownerDocument,Oa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):za.createElement("style");null!=za.setAttributeNS?Oa.setAttributeNS("type","text/css"):Oa.setAttribute("type","text/css");for(var Aa="",Ga="",Ia=0;Ia<Ea.length;Ia++){var ra=Ea[Ia].name,ua=Ea[Ia].url;Graph.isCssFontUrl(ua)?
-Aa+="@import url("+ua+");\n":Ga+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+ua+'");\n}\n'}Oa.appendChild(za.createTextNode(Aa+Ga));Da.getElementsByTagName("defs")[0].appendChild(Oa)}this.mathEnabled&&(document.body.appendChild(Da),Editor.MathJaxRender(Da),Da.parentNode.removeChild(Da));null!=ia&&(this.shapeBackgroundColor=ka,this.shapeForegroundColor=qa,this.stylesheet=ia,this.refresh());return Da};var m=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){m.apply(this,
+Aa+="@import url("+ua+");\n":Ga+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+ua+'");\n}\n'}Oa.appendChild(za.createTextNode(Aa+Ga));Da.getElementsByTagName("defs")[0].appendChild(Oa)}this.mathEnabled&&(document.body.appendChild(Da),Editor.MathJaxRender(Da),Da.parentNode.removeChild(Da));null!=ia&&(this.shapeBackgroundColor=ka,this.shapeForegroundColor=qa,this.stylesheet=ia,this.refresh());return Da};var p=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){p.apply(this,
arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var F=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){F.apply(this,arguments);this.enumerationState=0};var J=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return J.apply(this,arguments)};
mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(l){var A="1"==mxUtils.getValue(l.style,"enumerate",0);A&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):A||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);A=l.secondLabel;if(null!=A){var L=l.view.scale,Q=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*L,l.y+4*L,0,0):mxRectangle.fromPoint(l.view.getPoint(l));A.bounds.equals(l)&&A.value==Q&&A.scale==L||(A.bounds=l,A.value=Q,A.scale=
@@ -11726,48 +11726,48 @@ A.appendChild(S);R.appendChild(A);this.container=R};var W=ChangePageSetup.protot
this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else W.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),V=new Image;V.onload=function(){try{U.getContext("2d").drawImage(V,0,0);var l=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(A){}};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(l){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.1";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,q,n,p,z){p=null!=p?p:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(c);(new Image).src=C+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=q?":colno:"+
-encodeURIComponent(q):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(u){}try{z||null==window.console||console.error(p,c,e,g,q,n)}catch(u){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,q,n,m,z){m=null!=m?m:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(c);(new Image).src=C+"/log?severity="+m+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=q?":colno:"+
+encodeURIComponent(q):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(u){}try{z||null==window.console||console.error(m,c,e,g,q,n)}catch(u){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var n=
-e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=n&&6<n.length}catch(p){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{e=document.createElement("canvas");e.width=e.height=1;var q=e.toDataURL("image/jpeg");
+e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=n&&6<n.length}catch(m){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{e=document.createElement("canvas");e.width=e.height=1;var q=e.toDataURL("image/jpeg");
EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,e,g){var q=null==c||null==e;g=null!=g?g:24;var n=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=n.spin;n.spin=function(C,u){var y=!1;this.active||(p.call(this,C),this.active=!0,null!=u&&(q&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(c,e,g){var q=null==c||null==e;g=null!=g?g:24;var n=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),m=n.spin;n.spin=function(C,u){var y=!1;this.active||(m.call(this,C),this.active=!0,null!=u&&(q&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=u.substring(u.length-3,u.length)&&"!"!=u.charAt(u.length-1)&&(u+="..."),y.innerHTML=u,C.appendChild(y),n.status=y),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(C,u)}));this.stop();return I}),y=!0);return y};var z=n.stop;n.stop=function(){z.call(this);this.active=!1;null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status);n.status=null};n.pause=function(){return function(){}};
return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,q=this.editor.graph,n=this;e.getFunction=function(p){if(q.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var z=n.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<z&&n.movePage(z,z-1)};if(38==p.keyCode)return function(){0<z&&n.movePage(z,0)};if(39==p.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,
-z+1)};if(40==p.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,n.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<z&&n.selectNextPage(!1)};if(38==p.keyCode)return function(){0<z&&n.selectPage(n.pages[0])};if(39==p.keyCode)return function(){z<n.pages.length-1&&n.selectNextPage(!0)};if(40==p.keyCode)return function(){z<n.pages.length-1&&n.selectPage(n.pages[n.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)||
-q.isSelectionEmpty()||mxEvent.isAltDown(p)||mxEvent.isShiftDown(p)||mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var q=c.lastIndexOf("&lt;/mxfile&gt;");q>g&&(e=c.substring(g,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var n=mxUtils.parseXml(c),p=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=p?mxUtils.getXml(p):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
-c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var n=q.length-1;0<=n;n--){var p=this.updatePageRoot(new DiagramPage(q[n]));null==p.getName()&&
-p.setName(mxResources.get("pageWithNumber",[n+1]));e.model.execute(new ChangePage(this,p,0==n?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(n=0;n<g.length;n++)e.model.execute(new ChangePage(this,g[n],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,q,n,p,z,C,u,y,I){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;u=null!=u?u:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var t="_blank";else N=t=q;if(null==c)return"";var m=c;if("mxfile"!=m.nodeName.toLowerCase()){if(I){var F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());
-F.appendChild(c)}else{F=Graph.zapGremlins(mxUtils.getXml(c));m=Graph.compress(F);if(Graph.decompress(m)!=F)return F;F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());mxUtils.setTextContent(F,m)}m=c.ownerDocument.createElement("mxfile");m.appendChild(F)}y?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):
-(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
-null!=c&&m.setAttribute("type",c),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!p&&!n&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(m),e,null!=g?g.getTitle():null,t,N);else if(p||!n&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(q=null),I=this.getEmbeddedSvg(I,e,q,null,C,u,N);return I};EditorUi.prototype.getXmlFileData=
+EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,q=this.editor.graph,n=this;e.getFunction=function(m){if(q.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var z=n.getSelectedPageIndex();if(mxEvent.isShiftDown(m)){if(37==m.keyCode)return function(){0<z&&n.movePage(z,z-1)};if(38==m.keyCode)return function(){0<z&&n.movePage(z,0)};if(39==m.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,
+z+1)};if(40==m.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,n.pages.length-1)}}else if(mxEvent.isControlDown(m)||mxClient.IS_MAC&&mxEvent.isMetaDown(m)){if(37==m.keyCode)return function(){0<z&&n.selectNextPage(!1)};if(38==m.keyCode)return function(){0<z&&n.selectPage(n.pages[0])};if(39==m.keyCode)return function(){z<n.pages.length-1&&n.selectNextPage(!0)};if(40==m.keyCode)return function(){z<n.pages.length-1&&n.selectPage(n.pages[n.pages.length-1])}}}return!(65<=m.keyCode&&90>=m.keyCode)||
+q.isSelectionEmpty()||mxEvent.isAltDown(m)||mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||mxClient.IS_MAC&&mxEvent.isMetaDown(m)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var q=c.lastIndexOf("&lt;/mxfile&gt;");q>g&&(e=c.substring(g,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var n=mxUtils.parseXml(c),m=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=m?mxUtils.getXml(m):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
+c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var n=q.length-1;0<=n;n--){var m=this.updatePageRoot(new DiagramPage(q[n]));null==m.getName()&&
+m.setName(mxResources.get("pageWithNumber",[n+1]));e.model.execute(new ChangePage(this,m,0==n?m:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(n=0;n<g.length;n++)e.model.execute(new ChangePage(this,g[n],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,q,n,m,z,C,u,y,I){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;u=null!=u?u:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var t="_blank";else N=t=q;if(null==c)return"";var p=c;if("mxfile"!=p.nodeName.toLowerCase()){if(I){var F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());
+F.appendChild(c)}else{F=Graph.zapGremlins(mxUtils.getXml(c));p=Graph.compress(F);if(Graph.decompress(p)!=F)return F;F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());mxUtils.setTextContent(F,p)}p=c.ownerDocument.createElement("mxfile");p.appendChild(F)}y?(p=p.cloneNode(!0),p.removeAttribute("modified"),p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):
+(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",window.location.hostname),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("agent",navigator.appVersion),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
+null!=c&&p.setAttribute("type",c),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!m&&!n&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(p),e,null!=g?g.getTitle():null,t,N);else if(m||!n&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(q=null),I=this.getEmbeddedSvg(I,e,q,null,C,u,N);return I};EditorUi.prototype.getXmlFileData=
function(c,e,g,q){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var n=this.editor.getGraphXml(c,q);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(u){var y=u.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(u)),u=u.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&u.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?u=u.cloneNode(!0):(u=u.cloneNode(!1),mxUtils.setTextContent(u,
-Graph.compressNode(y)));n.appendChild(u)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(n)),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var p=this.pages[e],z=p.node;if(p!=this.currentPage)if(p.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,C,null,q);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z,
-Graph.compressNode(C));delete p.needsUpdate}else q&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),
-C=C.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,C,null,q),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(C))));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],q=0;q<c.length;q++){var n=c.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?g.push(n):isNaN(parseInt(n))?n.toLowerCase()!=n?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):n.toUpperCase()!=n?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(n)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(p){c[EditorUi.DIFF_INSERT][e].data=
-p.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var q in c[EditorUi.DIFF_UPDATE]){var n=c[EditorUi.DIFF_UPDATE][q];null!=n.name&&(n.name=this.anonymizeString(n.name));null!=n.cells&&(e=mxUtils.bind(this,function(p){var z=n.cells[p];if(null!=z){for(var C in z)null!=z[C].value&&(z[C].value="["+z[C].value.length+"]"),null!=z[C].xmlValue&&(z[C].xmlValue="["+z[C].xmlValue.length+"]"),null!=z[C].style&&(z[C].style="["+z[C].style.length+"]"),mxUtils.isEmptyObject(z[C])&&delete z[C];mxUtils.isEmptyObject(z)&&
-delete n.cells[p]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(n.cells)&&delete n.cells);mxUtils.isEmptyObject(n)&&delete c[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
+Graph.compressNode(y)));n.appendChild(u)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(n)),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var m=this.pages[e],z=m.node;if(m!=this.currentPage)if(m.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(m.root));this.editor.graph.saveViewState(m.viewState,C,null,q);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z,
+Graph.compressNode(C));delete m.needsUpdate}else q&&(this.updatePageRoot(m),null!=m.viewState.backgroundImage&&(null!=m.viewState.backgroundImage.originalSrc?m.viewState.backgroundImage=this.createImageForPageLink(m.viewState.backgroundImage.originalSrc,m):Graph.isPageLink(m.viewState.backgroundImage.src)&&(m.viewState.backgroundImage=this.createImageForPageLink(m.viewState.backgroundImage.src,m))),null!=m.viewState.backgroundImage&&null!=m.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),
+C=C.encode(new mxGraphModel(m.root)),this.editor.graph.saveViewState(m.viewState,C,null,q),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(C))));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],q=0;q<c.length;q++){var n=c.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?g.push(n):isNaN(parseInt(n))?n.toLowerCase()!=n?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):n.toUpperCase()!=n?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(n)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(m){c[EditorUi.DIFF_INSERT][e].data=
+m.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var q in c[EditorUi.DIFF_UPDATE]){var n=c[EditorUi.DIFF_UPDATE][q];null!=n.name&&(n.name=this.anonymizeString(n.name));null!=n.cells&&(e=mxUtils.bind(this,function(m){var z=n.cells[m];if(null!=z){for(var C in z)null!=z[C].value&&(z[C].value="["+z[C].value.length+"]"),null!=z[C].xmlValue&&(z[C].xmlValue="["+z[C].xmlValue.length+"]"),null!=z[C].style&&(z[C].style="["+z[C].style.length+"]"),mxUtils.isEmptyObject(z[C])&&delete z[C];mxUtils.isEmptyObject(z)&&
+delete n.cells[m]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(n.cells)&&delete n.cells);mxUtils.isEmptyObject(n)&&delete c[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=
e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
-this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,q,n,p,z,C,u,y,I){n=null!=n?n:!0;p=null!=p?p:!1;var N=this.editor.graph;if(e||!c&&null!=u&&/(\.svg)$/i.test(u.getTitle())){var t=
-null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(t||null!=this.pages&&this.currentPage!=this.pages[0]){var m=N.getGlobalVariable;N=this.createTemporaryGraph(t?N.getDefaultStylesheet():N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var F=this.pages[0];this.currentPage==F?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=F.viewState&&null!=F.viewState&&N.setBackgroundImage(F.viewState.backgroundImage);N.getGlobalVariable=
-function(J){return"page"==J?F.getName():"pagenumber"==J?1:m.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(F.root)}}z=null!=z?z:this.getXmlFileData(n,p,y,I);u=null!=u?u:this.getCurrentFile();c=this.createFileData(z,N,u,window.location.href,c,e,g,q,n,C,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,q,n,p){p=null!=p?p:!0;var z=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=
-p?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var u=e.view.scale;p=Math.floor(z.x/u-e.view.translate.x);u=Math.floor(z.y/u-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(C=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",p);c.setAttribute("y0",u)}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!=q&&c.setAttribute("edit",
+this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,q,n,m,z,C,u,y,I){n=null!=n?n:!0;m=null!=m?m:!1;var N=this.editor.graph;if(e||!c&&null!=u&&/(\.svg)$/i.test(u.getTitle())){var t=
+null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(t||null!=this.pages&&this.currentPage!=this.pages[0]){var p=N.getGlobalVariable;N=this.createTemporaryGraph(t?N.getDefaultStylesheet():N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var F=this.pages[0];this.currentPage==F?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=F.viewState&&null!=F.viewState&&N.setBackgroundImage(F.viewState.backgroundImage);N.getGlobalVariable=
+function(J){return"page"==J?F.getName():"pagenumber"==J?1:p.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(F.root)}}z=null!=z?z:this.getXmlFileData(n,m,y,I);u=null!=u?u:this.getCurrentFile();c=this.createFileData(z,N,u,window.location.href,c,e,g,q,n,C,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,q,n,m){m=null!=m?m:!0;var z=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=
+m?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var u=e.view.scale;m=Math.floor(z.x/u-e.view.translate.x);u=Math.floor(z.y/u-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(C=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",m);c.setAttribute("y0",u)}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!=q&&c.setAttribute("edit",
q));null!=n&&(n=n.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";q=Graph.compress(c);Graph.decompress(q)!=c&&(q=encodeURIComponent(c));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+
n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+q+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,q,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
@@ -11775,82 +11775,82 @@ n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=z&&z!=mxConstants.NONE?' style=
e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var q=0;q<c.length;q++)null==c[q].getAttribute("id")&&c[q].setAttribute("id",q),e=new DiagramPage(c[q]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",
[q+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var n=urlParams["layer-ids"].split(" ");e={};for(q=0;q<n.length;q++)e[n[q]]=!0;var p=this.editor.graph.getModel(),z=p.getChildren(p.root);for(q=0;q<z.length;q++){var C=z[q];p.setVisible(C,e[C.id]||!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
-/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,q,n,p,z,C,u,y,I,N){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==c?
-!1:!n),m=t+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,n,null,null,null,e);this.saveData(m,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(m,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)m=t+".png";else if("jpeg"==c)m=t+".jpg";else if("remoteSvg"==c){m=t+".svg";c="svg";var J=parseInt(u);
-"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<J){var M=this.editor.graph,H=M.getGraphBounds();var G=Math.ceil(H.width*C/M.view.scale+2*J);var E=Math.ceil(H.height*C/M.view.scale+2*J)}}this.saveRequest(m,c,mxUtils.bind(this,function(V,l){try{var A=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var L=this.createDownloadRequest(V,c,q,l,z,n,C,u,y,I,N,G,E);this.editor.graph.pageVisible=A;return L}catch(Q){this.handleError(Q)}}))}else{var P=null,T=mxUtils.bind(this,
-function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});if("svg"==c){var W=this.editor.graph.background;if(z||W==mxConstants.NONE)W=null;var U=this.editor.graph.getSvg(W,null,null,null,null,q);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();T(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else m=t+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();T(V)}),q)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,q,n,p,z,C,u,y,I,N,t){var m=this.editor.graph,F=m.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==p?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var J="",M="";if(F.width*F.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-y=y?"1":"0";"pdf"==e&&(null!=I?M="&from="+I.from+"&to="+I.to:0==p&&(M="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){J="&from="+p;break}p=m.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;n={globalVars:m.getExportVariables()};u&&(n.grid={size:m.gridSize,steps:m.view.gridSteps,color:m.view.gridColor});Graph.translateDiagram&&
-(n.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+J+M+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+q+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=z?"&scale="+z:"")+(null!=C?"&border="+C:"")+(N&&isFinite(N)?"&w="+N:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var q=
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var n=urlParams["layer-ids"].split(" ");e={};for(q=0;q<n.length;q++)e[n[q]]=!0;var m=this.editor.graph.getModel(),z=m.getChildren(m.root);for(q=0;q<z.length;q++){var C=z[q];m.setVisible(C,e[C.id]||!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
+/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,q,n,m,z,C,u,y,I,N){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==c?
+!1:!n),p=t+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,n,null,null,null,e);this.saveData(p,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(p,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)p=t+".png";else if("jpeg"==c)p=t+".jpg";else if("remoteSvg"==c){p=t+".svg";c="svg";var J=parseInt(u);
+"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<J){var M=this.editor.graph,H=M.getGraphBounds();var G=Math.ceil(H.width*C/M.view.scale+2*J);var E=Math.ceil(H.height*C/M.view.scale+2*J)}}this.saveRequest(p,c,mxUtils.bind(this,function(V,l){try{var A=this.editor.graph.pageVisible;0==m&&(this.editor.graph.pageVisible=m);var L=this.createDownloadRequest(V,c,q,l,z,n,C,u,y,I,N,G,E);this.editor.graph.pageVisible=A;return L}catch(Q){this.handleError(Q)}}))}else{var P=null,T=mxUtils.bind(this,
+function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});if("svg"==c){var W=this.editor.graph.background;if(z||W==mxConstants.NONE)W=null;var U=this.editor.graph.getSvg(W,null,null,null,null,q);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();T(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else p=t+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();T(V)}),q)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,q,n,m,z,C,u,y,I,N,t){var p=this.editor.graph,F=p.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==m?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var J="",M="";if(F.width*F.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+y=y?"1":"0";"pdf"==e&&(null!=I?M="&from="+I.from+"&to="+I.to:0==m&&(M="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(m=0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){J="&from="+m;break}m=p.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=m&&m!=mxConstants.NONE||(m="#ffffff"):m=mxConstants.NONE;n={globalVars:p.getExportVariables()};u&&(n.grid={size:p.gridSize,steps:p.view.gridSteps,color:p.view.gridColor});Graph.translateDiagram&&
+(n.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+J+M+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+q+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=z?"&scale="+z:"")+(null!=C?"&border="+C:"")+(N&&isFinite(N)?"&w="+N:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var q=
window.location.hash,n=mxUtils.bind(this,function(z){var C=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<C.length&&(C+="\n"),C+=z);z=new LocalFile(this,"csv"!=c.format&&0<C.length?C:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return q};this.fileLoaded(z);"csv"==c.format&&this.importCsv(C,mxUtils.bind(this,function(t){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var u=
-null!=c.interval?parseInt(c.interval):6E4,y=null,I=mxUtils.bind(this,function(){var t=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(m){t===this.currentPage&&(200<=m.getStatus()&&300>=m.getStatus()?(this.updateDiagram(m.getText()),N()):this.handleError({message:mxResources.get("error")+" "+m.getStatus()}))}),mxUtils.bind(this,function(m){this.handleError(m)}))}),N=mxUtils.bind(this,function(){window.clearTimeout(y);
-y=window.setTimeout(I,u)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();I()}));N();I()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var p=c.url;if(/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))p=this.editor.getProxiedUrl(p);this.editor.loadUrl(p,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(E){var P=new mxCellOverlay(E.image||
-n.warningImage,E.tooltip,E.align,E.valign,E.offset);P.addListener(mxEvent.CLICK,function(T,W){q.alert(E.tooltip)});return P}var g=null,q=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,p=n.getModel();p.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var C=p.getCell(c.getAttribute("id"));if(null!=C){try{var u=c.getAttribute("value");if(null!=u){var y=mxUtils.parseXml(u).documentElement;
-if(null!=y)if("1"==y.getAttribute("replace-value"))p.setValue(C,y);else for(var I=y.attributes,N=0;N<I.length;N++)n.setAttributeForCell(C,I[N].nodeName,0<I[N].nodeValue.length?I[N].nodeValue:null)}}catch(E){null!=window.console&&console.log("Error in value for "+C.id+": "+E)}try{var t=c.getAttribute("style");null!=t&&n.model.setStyle(C,t)}catch(E){null!=window.console&&console.log("Error in style for "+C.id+": "+E)}try{var m=c.getAttribute("icon");if(null!=m){var F=0<m.length?JSON.parse(m):null;null!=
+null!=c.interval?parseInt(c.interval):6E4,y=null,I=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()),N()):this.handleError({message:mxResources.get("error")+" "+p.getStatus()}))}),mxUtils.bind(this,function(p){this.handleError(p)}))}),N=mxUtils.bind(this,function(){window.clearTimeout(y);
+y=window.setTimeout(I,u)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();I()}));N();I()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var m=c.url;if(/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))m=this.editor.getProxiedUrl(m);this.editor.loadUrl(m,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(E){var P=new mxCellOverlay(E.image||
+n.warningImage,E.tooltip,E.align,E.valign,E.offset);P.addListener(mxEvent.CLICK,function(T,W){q.alert(E.tooltip)});return P}var g=null,q=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,m=n.getModel();m.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var C=m.getCell(c.getAttribute("id"));if(null!=C){try{var u=c.getAttribute("value");if(null!=u){var y=mxUtils.parseXml(u).documentElement;
+if(null!=y)if("1"==y.getAttribute("replace-value"))m.setValue(C,y);else for(var I=y.attributes,N=0;N<I.length;N++)n.setAttributeForCell(C,I[N].nodeName,0<I[N].nodeValue.length?I[N].nodeValue:null)}}catch(E){null!=window.console&&console.log("Error in value for "+C.id+": "+E)}try{var t=c.getAttribute("style");null!=t&&n.model.setStyle(C,t)}catch(E){null!=window.console&&console.log("Error in style for "+C.id+": "+E)}try{var p=c.getAttribute("icon");if(null!=p){var F=0<p.length?JSON.parse(p):null;null!=
F&&F.append||n.removeCellOverlays(C);null!=F&&n.addCellOverlay(C,e(F))}}catch(E){null!=window.console&&console.log("Error in icon for "+C.id+": "+E)}try{var J=c.getAttribute("geometry");if(null!=J){J=JSON.parse(J);var M=n.getCellGeometry(C);if(null!=M){M=M.clone();for(key in J){var H=parseFloat(J[key]);"dx"==key?M.x+=H:"dy"==key?M.y+=H:"dw"==key?M.width+=H:"dh"==key?M.height+=H:M[key]=parseFloat(J[key])}n.model.setGeometry(C,M)}}}catch(E){null!=window.console&&console.log("Error in icon for "+C.id+
-": "+E)}}}else if("model"==c.nodeName){for(var G=c.firstChild;null!=G&&G.nodeType!=mxConstants.NODETYPE_ELEMENT;)G=G.nextSibling;null!=G&&(new mxCodec(c.firstChild)).decode(G,p)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
-1);c=c.nextSibling}}finally{p.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,z)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var q=g.lastIndexOf(".");0<=q&&(c=g.substring(q),g=g.substring(0,q));if(e){e=g;var n=new Date;g=n.getFullYear();q=n.getMonth()+1;var p=n.getDate(),z=n.getHours(),C=n.getMinutes();n=n.getSeconds();g=e+(" "+(g+"-"+q+"-"+p+"-"+z+"-"+C+"-"+n))}return g=mxResources.get("copyOf",
+": "+E)}}}else if("model"==c.nodeName){for(var G=c.firstChild;null!=G&&G.nodeType!=mxConstants.NODETYPE_ELEMENT;)G=G.nextSibling;null!=G&&(new mxCodec(c.firstChild)).decode(G,m)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
+1);c=c.nextSibling}}finally{m.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,z)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var q=g.lastIndexOf(".");0<=q&&(c=g.substring(q),g=g.substring(0,q));if(e){e=g;var n=new Date;g=n.getFullYear();q=n.getMonth()+1;var m=n.getDate(),z=n.getHours(),C=n.getMinutes();n=n.getSeconds();g=e+(" "+(g+"-"+q+"-"+m+"-"+z+"-"+C+"-"+n))}return g=mxResources.get("copyOf",
[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var n=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);
c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?(c.addUnsavedStatus(),null!=c.backupPatch&&c.patch([c.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");
-!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();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var p="1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=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_"+p})}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(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
+!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();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var m="1"==urlParams.sketch?"sketch":uiTheme;if(null==m)m="default";else if("sketch"==m||"min"==m)m+=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_"+m})}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(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=z;if(null!=c)try{c.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||n():n()});e?c():this.handleError(z,
-mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else n();return q};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,q=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var p=0;p<c.length;p++){this.updatePageRoot(c[p]);var z=c[p].node.cloneNode(!1);z.removeAttribute("name");q.root=c[p].root;var C=n.encode(q);this.editor.graph.saveViewState(c[p].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");z.appendChild(C);
+mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else n();return q};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,q=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var m=0;m<c.length;m++){this.updatePageRoot(c[m]);var z=c[m].node.cloneNode(!1);z.removeAttribute("name");q.root=c[m].root;var C=n.encode(q);this.editor.graph.saveViewState(c[m].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");z.appendChild(C);
null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(u,y,I,N){return!N||"mxGeometry"!=u.nodeName&&"mxPoint"!=u.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==u.nodeName&&"previous"==y?null:I:Math.round(I)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var q=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=
-c.nodeName&&(q^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var n=0;n<c.attributes.length;n++){var p=c.attributes[n].name,z=null!=e?e(c,p,c.attributes[n].value,!0):c.attributes[n].value;null!=z&&(q^=this.hashValue(p,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(n=0;n<c.childNodes.length;n++)q=(q<<5)-q+this.hashValue(c.childNodes[n],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(n=
-0;n<c.length;n++)e=(e<<5)-e+c.charCodeAt(n)<<0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,q,n,p,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);
+c.nodeName&&(q^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var n=0;n<c.attributes.length;n++){var m=c.attributes[n].name,z=null!=e?e(c,m,c.attributes[n].value,!0):c.attributes[n].value;null!=z&&(q^=this.hashValue(m,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(n=0;n<c.childNodes.length;n++)q=(q<<5)-q+this.hashValue(c.childNodes[n],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(n=
+0;n<c.length;n++)e=(e<<5)-e+c.charCodeAt(n)<<0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,q,n,m,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);
this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=
null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var 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:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var q=g.previousSibling;e.insertBefore(g,
c);e.insertBefore(q,g)};EditorUi.prototype.loadLibrary=function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var q=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,q,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,g,q){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());
-".scratchpad"==c.title&&(this.scratchpad=c);var n=this.sidebar.palettes[c.getHash()];n=null!=n?n[n.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var p=null,z=mxUtils.bind(this,function(G,E){0==G.length&&c.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),E.appendChild(p)):this.addLibraryEntries(G,E)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&
+".scratchpad"==c.title&&(this.scratchpad=c);var n=this.sidebar.palettes[c.getHash()];n=null!=n?n[n.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var m=null,z=mxUtils.bind(this,function(G,E){0==G.length&&c.isEditable()?(null==m&&(m=document.createElement("div"),m.className="geDropTarget",mxUtils.write(m,mxResources.get("dragElementsHere"))),E.appendChild(m)):this.addLibraryEntries(G,E)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&
(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),g,null!=q?q:!0,mxUtils.bind(this,function(G){z(e,G)}));this.repositionLibrary(n);var u=C.parentNode.previousSibling;q=u.getAttribute("title");null!=q&&0<q.length&&".scratchpad"!=c.title&&u.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+q);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";u.style.position=
"relative";var I=document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var E=
-mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E();mxEvent.consume(G)}}));if(c.isEditable()){var t=this.editor.graph,m=null,F=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(G)}),J=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=m&&null!=m.parentNode&&m.parentNode.removeChild(m),m=I.cloneNode(!1),
-m.setAttribute("src",Editor.spinImage),m.setAttribute("title",mxResources.get("saving")),m.style.cursor="default",m.style.marginRight="2px",m.style.marginTop="-2px",y.insertBefore(m,y.firstChild),u.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=m&&null!=m.parentNode&&(m.parentNode.removeChild(m),u.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=I.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",
+mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E();mxEvent.consume(G)}}));if(c.isEditable()){var t=this.editor.graph,p=null,F=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(G)}),J=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=I.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",y.insertBefore(p,y.firstChild),u.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=p&&null!=p.parentNode&&(p.parentNode.removeChild(p),u.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=I.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",
mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(E){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(u.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(E)})),u.style.paddingRight=18*y.childNodes.length+"px")}),M=mxUtils.bind(this,function(G,E,P,T){G=t.cloneCells(mxUtils.sortCells(t.model.getTopmostCells(G)));for(var W=
-0;W<G.length;W++){var U=t.getCellGeometry(G[W]);null!=U&&U.translate(-E.x,-E.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(G,E.width,E.height,T||"",!0,null,!1));G={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(G))),w:E.width,h:E.height};null!=T&&(G.title=T);e.push(G);J(P);null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null)}),H=mxUtils.bind(this,function(G){if(t.isSelectionEmpty())t.getRubberband().isActive()?(t.getRubberband().execute(G),t.getRubberband().reset()):
+0;W<G.length;W++){var U=t.getCellGeometry(G[W]);null!=U&&U.translate(-E.x,-E.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(G,E.width,E.height,T||"",!0,null,!1));G={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(G))),w:E.width,h:E.height};null!=T&&(G.title=T);e.push(G);J(P);null!=m&&null!=m.parentNode&&0<e.length&&(m.parentNode.removeChild(m),m=null)}),H=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 E=t.getSelectionCells(),P=t.view.getBounds(E),T=t.view.scale;P.x/=T;P.y/=T;P.width/=T;P.height/=T;P.x-=t.view.translate.x;P.y-=t.view.translate.y;M(E,P)}mxEvent.consume(G)});mxEvent.addGestureListeners(C,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"),C.style.backgroundColor="#f1f3f4",C.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&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,t.panningManager.stop(),t.graphHandler.reset(),t.isMouseDown=!1,t.autoScroll=!0,H(G),mxEvent.consume(G))}));mxEvent.addListener(C,"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"),C.style.backgroundColor="",C.style.cursor="",t.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(G){C.style.backgroundColor="#f1f3f4";G.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(G){C.style.cursor="";C.style.backgroundColor=
-"";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(E,P,T,W,U,V,l,A,L){if(null!=E&&"image/"==P.substring(0,6))E="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(E),E=[new mxCell("",new mxGeometry(0,0,U,V),E)],E[0].vertex=!0,M(E,new mxRectangle(0,0,U,V),G,mxEvent.isAltDown(G)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&
-(p.parentNode.removeChild(p),p=null);else{var Q=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(R.documentElement));z(X,C);e=e.concat(X);J(G);this.spinner.stop();Q=!0}catch(ca){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y=
-this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);M(Y,new mxRectangle(0,0,Z.width,Z.height),G)}Q=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}Q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null)});null!=L&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(L,function(R){O(R,
+"";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(E,P,T,W,U,V,l,A,L){if(null!=E&&"image/"==P.substring(0,6))E="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(E),E=[new mxCell("",new mxGeometry(0,0,U,V),E)],E[0].vertex=!0,M(E,new mxRectangle(0,0,U,V),G,mxEvent.isAltDown(G)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=m&&null!=m.parentNode&&0<e.length&&
+(m.parentNode.removeChild(m),m=null);else{var Q=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(R.documentElement));z(X,C);e=e.concat(X);J(G);this.spinner.stop();Q=!0}catch(ca){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y=
+this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);M(Y,new mxRectangle(0,0,Z.width,Z.height),G)}Q=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}Q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=m&&null!=m.parentNode&&0<e.length&&(m.parentNode.removeChild(m),m=null)});null!=L&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(L,function(R){O(R,
"text/xml")},null,l):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,l)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?O(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(E,P)}}));
G.stopPropagation();G.preventDefault()})),mxEvent.addListener(C,"dragleave",function(G){C.style.cursor="";C.style.backgroundColor="";G.stopPropagation();G.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));y.insertBefore(I,y.firstChild);mxEvent.addListener(I,"click",F);mxEvent.addListener(C,"dblclick",function(G){mxEvent.getSource(G)==C&&F(G)});q=I.cloneNode(!1);q.setAttribute("src",Editor.plusImage);q.setAttribute("title",
mxResources.get("add"));y.insertBefore(q,y.firstChild);mxEvent.addListener(q,"click",H);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(q=document.createElement("span"),q.setAttribute("title",mxResources.get("help")),q.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(q,"?"),mxEvent.addGestureListeners(q,mxUtils.bind(this,function(G){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(G)})),y.insertBefore(q,y.firstChild))}u.appendChild(y);
-u.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var q=c[g],n=q.data;if(null!=n){n=this.convertDataUri(n);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(p+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(p+"image="+n,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(n=this.stringToCells(Graph.decompress(q.xml)),0<n.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(n,
+u.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var q=c[g],n=q.data;if(null!=n){n=this.convertDataUri(n);var m="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(m+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(m+"image="+n,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(n=this.stringToCells(Graph.decompress(q.xml)),0<n.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(n,
q.w,q.h,q.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");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)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,q,n,p,z){c=new ImageDialog(this,c,e,g,q,n,p,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,q){q||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,q,n){c=new LibraryDialog(this,c,e,g,q,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,q,n,m,z){c=new ImageDialog(this,c,e,g,q,n,m,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,q){q||(g=new ChangePageSetup(this,null,g),
+g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,q,n){c=new LibraryDialog(this,c,e,g,q,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(m){m&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);
this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=
-e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();mxEvent.consume(q)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,q,n,p,z){var C=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},u=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(m){}if(null!=u||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),I=null;e=null!=e?e:mxResources.get("error");if(null!=u){null!=
-u.retry&&(y=mxResources.get("cancel"),I=function(){C();u.retry()});if(404==u.code||404==u.status||403==u.code){z=403==u.code?null!=u.message?mxUtils.htmlEntities(u.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=n?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();mxEvent.consume(q)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,q,n,m,z){var C=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},u=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(p){}if(null!=u||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),I=null;e=null!=e?e:mxResources.get("error");if(null!=u){null!=
+u.retry&&(y=mxResources.get("cancel"),I=function(){C();u.retry()});if(404==u.code||404==u.status||403==u.code){z=403==u.code?null!=u.message?mxUtils.htmlEntities(u.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=n?null:null!=m?m:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
N.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==u.code||404==u.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(e,z,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,e,g,q,n)}),
-I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function m(){H.innerText="";for(var G=0;G<F.length;G++){var E=document.createElement("option");mxUtils.write(E,F[G].displayName);E.value=G;H.appendChild(E);E=document.createElement("option");E.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(E,"<"+F[G].email+">");E.setAttribute("disabled","disabled");H.appendChild(E)}E=document.createElement("option");mxUtils.write(E,mxResources.get("addAccount"));E.value=F.length;H.appendChild(E)}var F=this.drive.getUsersList(),
-J=document.createElement("div"),M=document.createElement("span");M.style.marginTop="6px";mxUtils.write(M,mxResources.get("changeUser")+": ");J.appendChild(M);var H=document.createElement("select");H.style.width="200px";m();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var G=H.value,E=F.length!=G;E&&this.drive.setUser(F[G]);this.drive.authorize(E,mxUtils.bind(this,function(){E||(F=this.drive.getUsersList(),m())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));J.appendChild(H);
+I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function p(){H.innerText="";for(var G=0;G<F.length;G++){var E=document.createElement("option");mxUtils.write(E,F[G].displayName);E.value=G;H.appendChild(E);E=document.createElement("option");E.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(E,"<"+F[G].email+">");E.setAttribute("disabled","disabled");H.appendChild(E)}E=document.createElement("option");mxUtils.write(E,mxResources.get("addAccount"));E.value=F.length;H.appendChild(E)}var F=this.drive.getUsersList(),
+J=document.createElement("div"),M=document.createElement("span");M.style.marginTop="6px";mxUtils.write(M,mxResources.get("changeUser")+": ");J.appendChild(M);var H=document.createElement("select");H.style.width="200px";p();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var G=H.value,E=F.length!=G;E&&this.drive.setUser(F[G]);this.drive.authorize(E,mxUtils.bind(this,function(){E||(F=this.drive.getUsersList(),p())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));J.appendChild(H);
J=new CustomDialog(this,J,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(J.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=u.message?z=""==u.message&&null!=u.name?mxUtils.htmlEntities(u.name):mxUtils.htmlEntities(u.message):null!=u.response&&null!=u.response.error?z=mxUtils.htmlEntities(u.response.error):"undefined"!==typeof window.App&&(u.code==App.ERROR_TIMEOUT?
-z=mxUtils.htmlEntities(mxResources.get("timeout")):u.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof u&&0<u.length&&(z=mxUtils.htmlEntities(u)))}var t=p=null;null!=u&&null!=u.helpLink?(p=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(u.helpLink)})):null!=u&&null!=u.ownerEmail&&(p=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+p+": "+u.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+
-mxUtils.htmlEntities(u.ownerEmail))}));this.showError(e,z,y,g,I,null,null,p,t,null,null,null,q?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,q,n,p){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&
-e()},function(){z();null!=g&&g()},q,n,null,null,null,null,C);this.showDialog(c.container,340,46+C,!0,p);c.init()};EditorUi.prototype.showBanner=function(c,e,g,q){var n=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";n=document.createElement("img");n.setAttribute("src",IMAGE_PATH+"/logo.png");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(n);
-n=document.createElement("img");n.setAttribute("src",Dialog.prototype.closeImage);n.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));n.setAttribute("border","0");n.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(n);mxUtils.write(p,e);document.body.appendChild(p);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!q){e.appendChild(z);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));e.appendChild(C);p.style.paddingBottom="30px";p.appendChild(e)}var u=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,z.checked||q)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(n,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);u()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){u()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){var N=mxEvent.getSource(I);N!=z&&N!=C?(null!=g&&g(),u(),mxEvent.consume(I)):y()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);n=!0}return n};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,q){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,
-"tEXt","mxfile",encodeURIComponent(e))),0<q&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,q,n){var p="jpeg"==g?"jpg":g;q=this.getBaseFilename(q)+(null!=e?".drawio":"")+"."+p;c=this.createImageDataUri(c,e,g,n);this.saveData(q,p,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,q,n,p){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||
-/(\.html)$/i.test(e)||(e=e+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=q?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,
-g,q);else{var z=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(C?parseInt(C[2],10):!1)?!1:p}if(p||this.isOffline()){z.href=URL.createObjectURL(q?this.base64ToBlob(c,g):new Blob([c],{type:g}));p?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},
-2E4),z.click(),z.parentNode.removeChild(z)}catch(u){}}else this.createEchoRequest(c,e,g,q,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,q,n,p){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=n?"&format="+n:"")+(null!=p?"&base64="+p:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,q=Math.ceil(g/1024),n=Array(q),
-p=0;p<q;++p){for(var z=1024*p,C=Math.min(z+1024,g),u=Array(C-z),y=0;z<C;++y,++z)u[y]=c[z].charCodeAt(0);n[p]=new Uint8Array(u)}return new Blob(n,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,q,n,p,z,C){p=null!=p?p:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(p);isLocalStorage&&n++;var u=4>=n?2:6<n?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,
-g,q);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var t=window.open("about:blank");null==t?mxUtils.popup(c,!0):(t.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),t.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(c,y,g,q,null,C):null!=y&&0<y.length&&this.pickFolder(I,mxUtils.bind(this,function(m){try{this.exportFile(c,y,g,q,I,m)}catch(F){this.handleError(F)}}))}catch(m){this.handleError(m)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,z,null,1<n,u,c,g,q);p=this.isServices(n)?n>u?390:280:160;this.showDialog(e.container,420,p,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=function(c,e,g){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+
+z=mxUtils.htmlEntities(mxResources.get("timeout")):u.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof u&&0<u.length&&(z=mxUtils.htmlEntities(u)))}var t=m=null;null!=u&&null!=u.helpLink?(m=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(u.helpLink)})):null!=u&&null!=u.ownerEmail&&(m=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+m+": "+u.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+
+mxUtils.htmlEntities(u.ownerEmail))}));this.showError(e,z,y,g,I,null,null,m,t,null,null,null,q?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,q,n,m){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&
+e()},function(){z();null!=g&&g()},q,n,null,null,null,null,C);this.showDialog(c.container,340,46+C,!0,m);c.init()};EditorUi.prototype.showBanner=function(c,e,g,q){var n=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var m=document.createElement("div");m.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(m.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(m.style,"transition","all 1s ease");m.className="geBtn gePrimaryBtn";n=document.createElement("img");n.setAttribute("src",IMAGE_PATH+"/logo.png");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";m.appendChild(n);
+n=document.createElement("img");n.setAttribute("src",Dialog.prototype.closeImage);n.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));n.setAttribute("border","0");n.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";m.appendChild(n);mxUtils.write(m,e);document.body.appendChild(m);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!q){e.appendChild(z);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));e.appendChild(C);m.style.paddingBottom="30px";m.appendChild(e)}var u=mxUtils.bind(this,function(){null!=m.parentNode&&(m.parentNode.removeChild(m),this.bannerShowing=!1,z.checked||q)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(n,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);u()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){u()}),1E3)});mxEvent.addListener(m,"click",mxUtils.bind(this,function(I){var N=mxEvent.getSource(I);N!=z&&N!=C?(null!=g&&g(),u(),mxEvent.consume(I)):y()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);n=!0}return n};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,q){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,
+"tEXt","mxfile",encodeURIComponent(e))),0<q&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,q,n){var m="jpeg"==g?"jpg":g;q=this.getBaseFilename(q)+(null!=e?".drawio":"")+"."+m;c=this.createImageDataUri(c,e,g,n);this.saveData(q,m,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,q,n,m){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||
+/(\.html)$/i.test(e)||(e=e+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=q?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,
+g,q);else{var z=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);m=65==(C?parseInt(C[2],10):!1)?!1:m}if(m||this.isOffline()){z.href=URL.createObjectURL(q?this.base64ToBlob(c,g):new Blob([c],{type:g}));m?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},
+2E4),z.click(),z.parentNode.removeChild(z)}catch(u){}}else this.createEchoRequest(c,e,g,q,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,q,n,m){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=n?"&format="+n:"")+(null!=m?"&base64="+m:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,q=Math.ceil(g/1024),n=Array(q),
+m=0;m<q;++m){for(var z=1024*m,C=Math.min(z+1024,g),u=Array(C-z),y=0;z<C;++y,++z)u[y]=c[z].charCodeAt(0);n[m]=new Uint8Array(u)}return new Blob(n,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,q,n,m,z,C){m=null!=m?m:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(m);isLocalStorage&&n++;var u=4>=n?2:6<n?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,
+g,q);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var t=window.open("about:blank");null==t?mxUtils.popup(c,!0):(t.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),t.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(c,y,g,q,null,C):null!=y&&0<y.length&&this.pickFolder(I,mxUtils.bind(this,function(p){try{this.exportFile(c,y,g,q,I,p)}catch(F){this.handleError(F)}}))}catch(p){this.handleError(p)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,z,null,1<n,u,c,g,q);m=this.isServices(n)?n>u?390:280:160;this.showDialog(e.container,420,m,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=function(c,e,g){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+
e+";base64,"+c+'"/></html>')):q.document.write("<html>"+c+"</html>"):q.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),q.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=
this.tagsComponent=null;var e=c(mxUtils.bind(this,function(q){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
@@ -11858,110 +11858,110 @@ this.tagsComponent=null;var e=c(mxUtils.bind(this,function(q){null==this.tagsCom
4+"px";n=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=n.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(q)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var q=this.editor.graph.getAllTags();e.style.display=0<q.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,
-function(q){var n=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",n);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)n.apply(this);else{this.exportDialog=document.createElement("div");var p=g.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,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=p.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var u=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
+function(q){var n=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",n);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)n.apply(this);else{this.exportDialog=document.createElement("div");var m=g.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,70);this.exportDialog.style.left=m.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";m=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=m.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var u=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",u);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(u.substring(u.indexOf(",")+1),"image/png",!0);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",n);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,q,n){this.isLocalFileSave()?this.saveLocalFile(g,c,q,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(p,z){return this.createEchoRequest(g,p,q,n,e,z)}),g,n,q)};EditorUi.prototype.saveRequest=function(c,e,g,q,n,p,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var u=4>=C?2:6<C?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,I){if("_blank"==I||null!=y&&0<y.length){var N=g("_blank"==I?null:y,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=N&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?N.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){p=null!=p?p:"pdf"==e?"application/pdf":"image/"+e;if(null!=q)try{this.exportFile(q,y,p,!0,I,t)}catch(m){this.handleError(m)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,p,!0,I,t)}catch(m){this.handleError(m)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(m){this.spinner.stop();this.handleError(m)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<C,u,q,p,n);C=this.isServices(C)?4<C?390:280:160;this.showDialog(c.container,
-420,C,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,q,n,p){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,q,n,p,z,C,u,y,I,N,t,m){if(this.spinner.spin(document.body,mxResources.get("export")))try{var F=this.editor.graph.isSelectionEmpty();g=null!=g?g:F;var J=e?null:this.editor.graph.background;J==mxConstants.NONE&&
-(J=null);null==J&&0==e&&(J=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var M=this.editor.graph.getSvg(J,c,z,C,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!t,I,N);q&&this.editor.graph.addSvgShadow(M);var H=this.getBaseFilename()+(n?".drawio":"")+".svg";m=null!=m?m:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(P)}))});var G=mxUtils.bind(this,function(P){this.spinner.stop();n&&P.setAttribute("content",this.getFileData(!0,null,null,null,g,u,null,null,null,!1));m(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var E=mxUtils.bind(this,function(P){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,G,this.thumbImageCache)):
-G(P)});t?this.embedFonts(M,E):(this.editor.addFontCss(M),E(M))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(c,e,g,q,n,p,z){return this.addCheckbox(c,g,q,n,p,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,q,n,p,z,C){p=null!=p?p:!0;var u=document.createElement("input");u.style.marginRight="8px";u.style.marginTop="16px";u.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();u.id=z;null!=C&&u.setAttribute("name",C);g&&(u.setAttribute("checked","checked"),
-u.defaultChecked=!0);q&&u.setAttribute("disabled","disabled");p&&(c.appendChild(u),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",z),c.appendChild(g),n||mxUtils.br(c));return u};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var q=this.getCurrentFile(),n="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var p=document.createElement("select");
-p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("makeCopy"));p.appendChild(q);q=document.createElement("option");q.setAttribute("value","custom");mxUtils.write(q,mxResources.get("custom")+"...");p.appendChild(q);c.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var z=new FilenameDialog(this,
-n,mxResources.get("ok"),function(C){null!=C?n=C:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===p.value?"_blank":n:null},getEditInput:function(){return g},getEditSelect:function(){return p}}};
-EditorUi.prototype.addLinkSection=function(c,e){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=p):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(C)}mxUtils.write(c,mxResources.get("links")+":");var q=document.createElement("select");
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",n);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,q,n){this.isLocalFileSave()?this.saveLocalFile(g,c,q,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(m,z){return this.createEchoRequest(g,m,q,n,e,z)}),g,n,q)};EditorUi.prototype.saveRequest=function(c,e,g,q,n,m,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var u=4>=C?2:6<C?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,I){if("_blank"==I||null!=y&&0<y.length){var N=g("_blank"==I?null:y,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=N&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?N.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){m=null!=m?m:"pdf"==e?"application/pdf":"image/"+e;if(null!=q)try{this.exportFile(q,y,m,!0,I,t)}catch(p){this.handleError(p)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,m,!0,I,t)}catch(p){this.handleError(p)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(p){this.spinner.stop();this.handleError(p)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<C,u,q,m,n);C=this.isServices(C)?4<C?390:280:160;this.showDialog(c.container,
+420,C,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,q,n,m){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,q,n,m,z,C,u,y,I,N,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var F=this.editor.graph.isSelectionEmpty();g=null!=g?g:F;var J=e?null:this.editor.graph.background;J==mxConstants.NONE&&
+(J=null);null==J&&0==e&&(J=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var M=this.editor.graph.getSvg(J,c,z,C,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!t,I,N);q&&this.editor.graph.addSvgShadow(M);var H=this.getBaseFilename()+(n?".drawio":"")+".svg";p=null!=p?p:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(P)}))});var G=mxUtils.bind(this,function(P){this.spinner.stop();n&&P.setAttribute("content",this.getFileData(!0,null,null,null,g,u,null,null,null,!1));p(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var E=mxUtils.bind(this,function(P){m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,G,this.thumbImageCache)):
+G(P)});t?this.embedFonts(M,E):(this.editor.addFontCss(M),E(M))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(c,e,g,q,n,m,z){return this.addCheckbox(c,g,q,n,m,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,q,n,m,z,C){m=null!=m?m:!0;var u=document.createElement("input");u.style.marginRight="8px";u.style.marginTop="16px";u.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();u.id=z;null!=C&&u.setAttribute("name",C);g&&(u.setAttribute("checked","checked"),
+u.defaultChecked=!0);q&&u.setAttribute("disabled","disabled");m&&(c.appendChild(u),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",z),c.appendChild(g),n||mxUtils.br(c));return u};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var q=this.getCurrentFile(),n="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var m=document.createElement("select");
+m.style.maxWidth="200px";m.style.width="auto";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("makeCopy"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","custom");mxUtils.write(q,mxResources.get("custom")+"...");m.appendChild(q);c.appendChild(m);mxEvent.addListener(m,"change",mxUtils.bind(this,function(){if("custom"==m.value){var z=new FilenameDialog(this,
+n,mxResources.get("ok"),function(C){null!=C?n=C:m.value="blank"},mxResources.get("url"),null,null,null,null,function(){m.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===m.value?"_blank":n:null},getEditInput:function(){return g},getEditSelect:function(){return m}}};
+EditorUi.prototype.addLinkSection=function(c,e){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=m&&m!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=m):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(C)}mxUtils.write(c,mxResources.get("links")+":");var q=document.createElement("select");
q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));q.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));q.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));
-q.appendChild(n);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(e));c.appendChild(q);mxUtils.write(c,mxResources.get("borderColor")+":");var p="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(p||"none",function(u){p=u;g()});mxEvent.consume(C)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height=
-"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return p},getTarget:function(){return q.value},focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,q,n,p,z){z=null!=z?z:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!=
-e&&e!=mxConstants.NONE&&z.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=n&&0<n.length&&z.push("edit="+encodeURIComponent(n)),p&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,e,g,q,n,p,z,C,u,y){u=this.createUrlParameters(c,e,g,q,n,p,u);c=this.getCurrentFile();e=!0;null!=z?g="#U"+encodeURIComponent(z):
+q.appendChild(n);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(e));c.appendChild(q);mxUtils.write(c,mxResources.get("borderColor")+":");var m="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(m||"none",function(u){m=u;g()});mxEvent.consume(C)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height=
+"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return m},getTarget:function(){return q.value},focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,q,n,m,z){z=null!=z?z:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!=
+e&&e!=mxConstants.NONE&&z.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=n&&0<n.length&&z.push("edit="+encodeURIComponent(n)),m&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,e,g,q,n,m,z,C,u,y){u=this.createUrlParameters(c,e,g,q,n,m,u);c=this.getCurrentFile();e=!0;null!=z?g="#U"+encodeURIComponent(z):
(c=this.getCurrentFile(),C||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&u.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(u.push("open="+g.substring(1)),g="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<u.length?"?"+u.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,q,n,p,z,C,u,y,I,N){this.getBasenames();var t={};""!=n&&n!=mxConstants.NONE&&(t.highlight=n);"auto"!==q&&(t.target=q);y||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(t.zoom=g/100);g=[];z&&(g.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages,
-this.currentPage)));e&&(g.push("zoom"),t.resize=!0);C&&g.push("layers");u&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),t.toolbar=g.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=c?t.url=c:t.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+
-(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,q){var n=document.createElement("div");n.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(p);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");p=C.cloneNode(!0);p.setAttribute("value","copy");z.appendChild(p);var u=document.createElement("span");
+!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<u.length?"?"+u.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,q,n,m,z,C,u,y,I,N){this.getBasenames();var t={};""!=n&&n!=mxConstants.NONE&&(t.highlight=n);"auto"!==q&&(t.target=q);y||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(t.zoom=g/100);g=[];z&&(g.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages,
+this.currentPage)));e&&(g.push("zoom"),t.resize=!0);C&&g.push("layers");u&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),t.toolbar=g.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=c?t.url=c:t.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(m?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+
+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,q){var n=document.createElement("div");n.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxResources.get("html"));m.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(m);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");m=C.cloneNode(!0);m.setAttribute("value","copy");z.appendChild(m);var u=document.createElement("span");
mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(u);mxUtils.br(z);z.appendChild(C);u=document.createElement("span");mxUtils.write(u,mxResources.get("publicDiagramUrl"));z.appendChild(u);var y=this.getCurrentFile();null==g&&null!=y&&y.constructor==window.DriveFile&&(u=document.createElement("a"),u.style.paddingLeft="12px",u.style.color="gray",u.style.cursor="pointer",mxUtils.write(u,mxResources.get("share")),z.appendChild(u),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(y.getId())})));p.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");n.appendChild(z);var I=this.addLinkSection(n),N=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value="100%";n.appendChild(t);var m=this.addCheckbox(n,mxResources.get("fit"),!0);
+this.drive.showPermissions(y.getId())})));m.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");n.appendChild(z);var I=this.addLinkSection(n),N=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value="100%";n.appendChild(t);var p=this.addCheckbox(n,mxResources.get("fit"),!0);
z=null!=this.pages&&1<this.pages.length;var F=F=this.addCheckbox(n,mxResources.get("allPages"),z,!z),J=this.addCheckbox(n,mxResources.get("layers"),!0),M=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),G=null;z=380;if(EditorUi.enableHtmlEditOption){G=this.addEditButton(n,H);var E=G.getEditInput();E.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");
-E.checked&&H.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){q(C.checked?g:null,N.checked,t.value,I.getTarget(),I.getColor(),m.checked,F.checked,J.checked,M.checked,H.checked,null!=G?G.getLink():null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,q,n,p,z,C){var u=document.createElement("div");u.style.whiteSpace=
+E.checked&&H.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){q(C.checked?g:null,N.checked,t.value,I.getTarget(),I.getColor(),p.checked,F.checked,J.checked,M.checked,H.checked,null!=G?G.getLink():null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);m.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,q,n,m,z,C){var u=document.createElement("div");u.style.whiteSpace=
"nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";u.appendChild(y);var I=this.getCurrentFile();c=0;if(null==I||I.constructor!=window.DriveFile||e)z=null!=z?z:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;z=null!=z?z:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var N=document.createElement("div");N.style.whiteSpace="normal";mxUtils.write(N,mxResources.get("linkAccountRequired"));y.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);u.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.appendChild(N);
-mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var t=null,m=null;if(null!=g||null!=q)c+=30,mxUtils.write(u,mxResources.get("width")+":"),t=document.createElement("input"),
-t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",u.appendChild(t),mxUtils.write(u,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=q+"px",u.appendChild(m),mxUtils.br(u);var F=this.addLinkSection(u,p);g=null!=this.pages&&1<this.pages.length;var J=null;
-if(null==I||I.constructor!=window.DriveFile||e)J=this.addCheckbox(u,mxResources.get("allPages"),g,!g);var M=this.addCheckbox(u,mxResources.get("lightbox"),!0,null,null,!p),H=this.addEditButton(u,M),G=H.getEditInput();p&&(G.style.marginLeft=M.style.marginLeft,M.style.display="none",c-=20);var E=this.addCheckbox(u,mxResources.get("layers"),!0);E.style.marginLeft=G.style.marginLeft;E.style.marginTop="8px";var P=this.addCheckbox(u,mxResources.get("tags"),!0);P.style.marginLeft=G.style.marginLeft;P.style.marginBottom=
+mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var t=null,p=null;if(null!=g||null!=q)c+=30,mxUtils.write(u,mxResources.get("width")+":"),t=document.createElement("input"),
+t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",u.appendChild(t),mxUtils.write(u,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=q+"px",u.appendChild(p),mxUtils.br(u);var F=this.addLinkSection(u,m);g=null!=this.pages&&1<this.pages.length;var J=null;
+if(null==I||I.constructor!=window.DriveFile||e)J=this.addCheckbox(u,mxResources.get("allPages"),g,!g);var M=this.addCheckbox(u,mxResources.get("lightbox"),!0,null,null,!m),H=this.addEditButton(u,M),G=H.getEditInput();m&&(G.style.marginLeft=M.style.marginLeft,M.style.display="none",c-=20);var E=this.addCheckbox(u,mxResources.get("layers"),!0);E.style.marginLeft=G.style.marginLeft;E.style.marginTop="8px";var P=this.addCheckbox(u,mxResources.get("tags"),!0);P.style.marginLeft=G.style.marginLeft;P.style.marginBottom=
"16px";P.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"));G.checked&&M.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,u,mxUtils.bind(this,function(){n(F.getTarget(),F.getColor(),null==J?!0:J.checked,M.checked,H.getLink(),E.checked,null!=t?t.value:null,
-null!=m?m.value:null,P.checked)}),null,mxResources.get("create"),z,C);this.showDialog(e.container,340,300+c,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):F.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,q,n){var p=document.createElement("div");p.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(n?"10":"4")+"px";p.appendChild(z);if(n){mxUtils.write(p,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";p.appendChild(C);mxUtils.write(p,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=
-this.lastExportBorder||"0";p.appendChild(u);mxUtils.br(p)}var y=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=q?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var N=q?null:this.addCheckbox(p,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,p,mxUtils.bind(this,function(){var t=
-parseInt(C.value)/100||1,m=parseInt(u.value)||0;g(!y.checked,null!=I?I.checked:!1,null!=N?N.checked:!1,t,m)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,q,n,p,z,C,u){z=null!=z?z:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var I=this.editor.graph,N="jpeg"==C?220:300,t=document.createElement("h3");mxUtils.write(t,c);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-y.appendChild(t);mxUtils.write(y,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%";y.appendChild(m);mxUtils.write(y,mxResources.get("borderWidth")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.value=this.lastExportBorder||
+null!=p?p.value:null,P.checked)}),null,mxResources.get("create"),z,C);this.showDialog(e.container,340,300+c,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):F.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,q,n){var m=document.createElement("div");m.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(n?"10":"4")+"px";m.appendChild(z);if(n){mxUtils.write(m,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";m.appendChild(C);mxUtils.write(m,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=
+this.lastExportBorder||"0";m.appendChild(u);mxUtils.br(m)}var y=this.addCheckbox(m,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=q?null:this.addCheckbox(m,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var N=q?null:this.addCheckbox(m,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,m,mxUtils.bind(this,function(){var t=
+parseInt(C.value)/100||1,p=parseInt(u.value)||0;g(!y.checked,null!=I?I.checked:!1,null!=N?N.checked:!1,t,p)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,q,n,m,z,C,u){z=null!=z?z:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var I=this.editor.graph,N="jpeg"==C?220:300,t=document.createElement("h3");mxUtils.write(t,c);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+y.appendChild(t);mxUtils.write(y,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";y.appendChild(p);mxUtils.write(y,mxResources.get("borderWidth")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.value=this.lastExportBorder||
"0";y.appendChild(F);mxUtils.br(y);var J=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),M=document.createElement("input");M.style.marginTop="16px";M.style.marginRight="8px";M.style.marginLeft="24px";M.setAttribute("disabled","disabled");M.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var G={};for(t=0;t<c.length;t++)if(!I.isSelectionEmpty()||"selectionOnly"!=
-c[t]){var E=document.createElement("option");mxUtils.write(E,mxResources.get(c[t]));E.setAttribute("value",c[t]);H.appendChild(E);G[c[t]]=E}u?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(H),mxUtils.br(y),N+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(J.checked=!0)})):p&&(y.appendChild(M),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(J,"change",function(){J.checked?M.removeAttribute("disabled"):M.setAttribute("disabled",
+c[t]){var E=document.createElement("option");mxUtils.write(E,mxResources.get(c[t]));E.setAttribute("value",c[t]);H.appendChild(E);G[c[t]]=E}u?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(H),mxUtils.br(y),N+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(J.checked=!0)})):m&&(y.appendChild(M),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(J,"change",function(){J.checked?M.removeAttribute("disabled"):M.setAttribute("disabled",
"disabled")}));I.isSelectionEmpty()?u&&(J.style.display="none",J.nextSibling.style.display="none",J.nextSibling.nextSibling.style.display="none",N-=30):(H.value="diagram",M.setAttribute("checked","checked"),M.defaultChecked=!0,mxEvent.addListener(J,"change",function(){H.value=J.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var W=this.addCheckbox(y,
mxResources.get("shadow"),I.shadowVisible),U=null;if("png"==C||"jpeg"==C)U=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var V=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),z,null,null,"jpeg"!=C);V.style.marginBottom="16px";var l=document.createElement("input");l.style.marginBottom="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||l.setAttribute("disabled","disabled");var A=
-document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.style.marginBottom="16px";A.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));A.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));A.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,
-mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||A.appendChild(p);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){"lblToSvg"==A.value?(l.checked=!0,l.setAttribute("disabled","disabled"),G.page.style.display="none","page"==H.value&&(H.value="diagram"),W.checked=!1,W.setAttribute("disabled","disabled"),Q.style.display="inline-block",L.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),W.removeAttribute("disabled"),
+document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.style.marginBottom="16px";A.className="geBtn";m=document.createElement("option");m.setAttribute("value","none");mxUtils.write(m,mxResources.get("noChange"));A.appendChild(m);m=document.createElement("option");m.setAttribute("value","embedFonts");mxUtils.write(m,mxResources.get("embedFonts"));A.appendChild(m);m=document.createElement("option");m.setAttribute("value","lblToSvg");mxUtils.write(m,
+mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||A.appendChild(m);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){"lblToSvg"==A.value?(l.checked=!0,l.setAttribute("disabled","disabled"),G.page.style.display="none","page"==H.value&&(H.value="diagram"),W.checked=!1,W.setAttribute("disabled","disabled"),Q.style.display="inline-block",L.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),W.removeAttribute("disabled"),
G.page.style.display="",Q.style.display="none",L.style.display="")}));e&&(y.appendChild(l),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(A),mxUtils.br(y),N+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));L.appendChild(e);
e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));L.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));L.appendChild(e);var Q=document.createElement("div");mxUtils.write(Q,mxResources.get("LinksLost"));Q.style.margin="7px";Q.style.display="none";"svg"==C&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(L),y.appendChild(Q),mxUtils.br(y),
-mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=F.value;this.lastExportZoom=m.value;n(m.value,P.checked,!J.checked,W.checked,V.checked,l.checked,F.value,M.checked,!1,L.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==A.value,"lblToSvg"==A.value)}),null,g,q);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,q,n){var p=document.createElement("div");p.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var C=document.createElement("h3");mxUtils.write(C,e);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(C)}var u=this.addCheckbox(p,mxResources.get("fit"),!0),y=this.addCheckbox(p,mxResources.get("shadow"),z.shadowVisible&&q,!q),I=this.addCheckbox(p,g),N=this.addCheckbox(p,mxResources.get("lightbox"),
-!0),t=this.addEditButton(p,N),m=t.getEditInput(),F=1<z.model.getChildCount(z.model.getRoot()),J=this.addCheckbox(p,mxResources.get("layers"),F,!F);J.style.marginLeft=m.style.marginLeft;J.style.marginBottom="12px";J.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(F&&J.removeAttribute("disabled"),m.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"));m.checked&&N.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled",
-"disabled")});e=new CustomDialog(this,p,mxUtils.bind(this,function(){c(u.checked,y.checked,I.checked,N.checked,t.getLink(),J.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,q,n,p,z,C){function u(m){var F=" ",J="";q&&(F=" 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!=I?"&page="+I:"")+(n?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",J+="cursor:pointer;");c&&(J+="max-width:100%;");var M="";g&&(M=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');z('<img src="'+m+'"'+M+(""!=J?' style="'+J+'"':"")+F+"/>")}var y=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(m){var F=q?this.getFileData(!0):null;m=
-this.createImageDataUri(m,F,"png");u(m)}),null,null,null,mxUtils.bind(this,function(m){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+N+"&xml="+encodeURIComponent(e));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&
-299>=t.getStatus()?u("data:image/png;base64,"+t.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,q,n,p,z){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),u=C.getElementsByTagName("a");if(null!=u)for(var y=0;y<u.length;y++){var I=u[y].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==u[y].getAttribute("target")&&u[y].removeAttribute("target")}q&&
-C.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(C);if(g){var N=" ",t="";q&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(p?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");c&&(t+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(m){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(m))+'"'+(""!=t?' style="'+t+'"':"")+N+"/>")}))}else t="",q&&(e=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),c&&(c=parseInt(C.getAttribute("width")),n=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),t+="max-width:100%;max-height:"+n+"px;",C.removeAttribute("height")),""!=t&&C.setAttribute("style",t),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),z(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(c){c=
+mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=F.value;this.lastExportZoom=p.value;n(p.value,P.checked,!J.checked,W.checked,V.checked,l.checked,F.value,M.checked,!1,L.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==A.value,"lblToSvg"==A.value)}),null,g,q);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,q,n){var m=document.createElement("div");m.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var C=document.createElement("h3");mxUtils.write(C,e);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(C)}var u=this.addCheckbox(m,mxResources.get("fit"),!0),y=this.addCheckbox(m,mxResources.get("shadow"),z.shadowVisible&&q,!q),I=this.addCheckbox(m,g),N=this.addCheckbox(m,mxResources.get("lightbox"),
+!0),t=this.addEditButton(m,N),p=t.getEditInput(),F=1<z.model.getChildCount(z.model.getRoot()),J=this.addCheckbox(m,mxResources.get("layers"),F,!F);J.style.marginLeft=p.style.marginLeft;J.style.marginBottom="12px";J.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(F&&J.removeAttribute("disabled"),p.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&N.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled",
+"disabled")});e=new CustomDialog(this,m,mxUtils.bind(this,function(){c(u.checked,y.checked,I.checked,N.checked,t.getLink(),J.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,q,n,m,z,C){function u(p){var F=" ",J="";q&&(F=" 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!=I?"&page="+I:"")+(n?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",J+="cursor:pointer;");c&&(J+="max-width:100%;");var M="";g&&(M=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');z('<img src="'+p+'"'+M+(""!=J?' style="'+J+'"':"")+F+"/>")}var y=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(p){var F=q?this.getFileData(!0):null;p=
+this.createImageDataUri(p,F,"png");u(p)}),null,null,null,mxUtils.bind(this,function(p){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+N+"&xml="+encodeURIComponent(e));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&
+299>=t.getStatus()?u("data:image/png;base64,"+t.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,q,n,m,z){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),u=C.getElementsByTagName("a");if(null!=u)for(var y=0;y<u.length;y++){var I=u[y].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==u[y].getAttribute("target")&&u[y].removeAttribute("target")}q&&
+C.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(C);if(g){var N=" ",t="";q&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(m?"&layers=1":
+"")+"');}})(this);\"",t+="cursor:pointer;");c&&(t+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(p){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(p))+'"'+(""!=t?' style="'+t+'"':"")+N+"/>")}))}else t="",q&&(e=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),c&&(c=parseInt(C.getAttribute("width")),n=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),t+="max-width:100%;max-height:"+n+"px;",C.removeAttribute("height")),""!=t&&C.setAttribute("style",t),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),z(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
-c;else if("mxfile"==c.nodeName){var q=c.getElementsByTagName("diagram");if(0<q.length){g=q[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(p){return"page"==p?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:n.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}q=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(p){}finally{this.editor.graph=q}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
-c){if(c.hasAttribute("scale")){var q=parseFloat(c.getAttribute("scale"));!isNaN(q)&&0<q&&(e=q)}c.hasAttribute("border")&&(q=parseInt(c.getAttribute("border")),!isNaN(q)&&0<q&&(g=q))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,q,n){try{var p=this.editor.graph,z=null!=p.themes&&"darkTheme"==p.defaultThemeName,C=null;if(null!=g&&0<g.length)p=this.createTemporaryGraph(z?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),p),C=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(z?p.getDefaultStylesheet():p.getStylesheet());var u=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&p.setBackgroundImage(y.viewState.backgroundImage);p.getGlobalVariable=function(I){return"page"==I?y.getName():"pagenumber"==I?1:u.apply(this,
-arguments)};document.body.appendChild(p.container);p.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=I.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(C));c(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(t){null!=e&&e(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=e&&
-e(I)}),null,null,q,null,p.shadowVisible,null,p,n,null,null,null,"diagram",null)}catch(I){null!=e&&e(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,q,n,p,z,C,u,y,I,N,t){C=null!=C?C:!0;I=null!=I?I:0;z=null!=u?u:e.background;z==mxConstants.NONE&&(z=null);p=e.getSvg(z,y,I,null,null,p,null,null,null,e.shadowVisible||N,null,t,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(p,null,null,0==I);null!=c&&p.setAttribute("content",c);null!=g&&p.setAttribute("resource",g);var m=mxUtils.bind(this,function(F){F=
-(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(F);null!=n&&n(F);return F});e.mathEnabled&&this.editor.addMathCss(p);if(null!=n)this.embedFonts(p,mxUtils.bind(this,function(F){C?this.editor.convertImages(F,mxUtils.bind(this,function(J){m(J)})):m(F)}));else return m(p)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(q){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,q,n,p,z,C,u,y,I,N,t){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var m=this.editor.graph.isSelectionEmpty();g=null!=g?g:m;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(F){this.spinner.stop();try{this.saveCanvas(F,
-n?this.getFileData(!0,null,null,null,g,C):null,u,null==this.pages||0==this.pages.length,I)}catch(J){this.handleError(J)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}),null,g,c||1,e,q,null,null,p,z,y,N,t)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,q,n,p,z){e=null!=e?e:0;g=null!=g?g:0;var C=[];try{var u=
-this.editor.graph;if(null!=c&&0<c.length){u.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var N=I.getElementsByTagName("diagram");if(1==N.length&&!p){if(I=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=N[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,t))}}else if(0<N.length){p=[];var m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(N[0]),q=!1,m=1);for(;m<N.length;m++){var F=N[m].getAttribute("id");N[m].removeAttribute("id");var J=this.updatePageRoot(new DiagramPage(N[m]));c[F]=N[m].getAttribute("id");var M=this.pages.length;null==J.getName()&&J.setName(mxResources.get("pageWithNumber",[M+1]));u.model.execute(new ChangePage(this,J,J,M,
-!0));p.push(J)}this.updatePageLinks(c,p)}}if(null!=I&&"mxGraphModel"===I.nodeName){C=u.importGraphModel(I,e,g,q);if(null!=C)for(m=0;m<C.length;m++)this.updatePageLinksForCell(c,C[m]);var H=u.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var G=new ChangePageSetup(this,null,H);G.ignoreColor=!0;u.model.execute(G)}}z&&this.insertHandler(C,null,null,u.defaultVertexStyle,u.defaultEdgeStyle,!1,!0)}finally{u.model.endUpdate()}}}catch(E){if(n)throw E;
+c;else if("mxfile"==c.nodeName){var q=c.getElementsByTagName("diagram");if(0<q.length){g=q[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(m){return"page"==m?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==m?1:n.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}q=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(m){}finally{this.editor.graph=q}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
+c){if(c.hasAttribute("scale")){var q=parseFloat(c.getAttribute("scale"));!isNaN(q)&&0<q&&(e=q)}c.hasAttribute("border")&&(q=parseInt(c.getAttribute("border")),!isNaN(q)&&0<q&&(g=q))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,q,n){try{var m=this.editor.graph,z=null!=m.themes&&"darkTheme"==m.defaultThemeName,C=null;if(null!=g&&0<g.length)m=this.createTemporaryGraph(z?m.getDefaultStylesheet():m.getStylesheet()),document.body.appendChild(m.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),m),C=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){m=this.createTemporaryGraph(z?m.getDefaultStylesheet():m.getStylesheet());var u=m.getGlobalVariable;m.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?m.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&m.setBackgroundImage(y.viewState.backgroundImage);m.getGlobalVariable=function(I){return"page"==I?y.getName():"pagenumber"==I?1:u.apply(this,
+arguments)};document.body.appendChild(m.container);m.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=I.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(C));c(N.substring(N.lastIndexOf(",")+1));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container)}catch(t){null!=e&&e(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=e&&
+e(I)}),null,null,q,null,m.shadowVisible,null,m,n,null,null,null,"diagram",null)}catch(I){null!=e&&e(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,q,n,m,z,C,u,y,I,N,t){C=null!=C?C:!0;I=null!=I?I:0;z=null!=u?u:e.background;z==mxConstants.NONE&&(z=null);m=e.getSvg(z,y,I,null,null,m,null,null,null,e.shadowVisible||N,null,t,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(m,null,null,0==I);null!=c&&m.setAttribute("content",c);null!=g&&m.setAttribute("resource",g);var p=mxUtils.bind(this,function(F){F=
+(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(F);null!=n&&n(F);return F});e.mathEnabled&&this.editor.addMathCss(m);if(null!=n)this.embedFonts(m,mxUtils.bind(this,function(F){C?this.editor.convertImages(F,mxUtils.bind(this,function(J){p(J)})):p(F)}));else return p(m)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(q){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,q,n,m,z,C,u,y,I,N,t){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var p=this.editor.graph.isSelectionEmpty();g=null!=g?g:p;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(F){this.spinner.stop();try{this.saveCanvas(F,
+n?this.getFileData(!0,null,null,null,g,C):null,u,null==this.pages||0==this.pages.length,I)}catch(J){this.handleError(J)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}),null,g,c||1,e,q,null,null,m,z,y,N,t)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,q,n,m,z){e=null!=e?e:0;g=null!=g?g:0;var C=[];try{var u=
+this.editor.graph;if(null!=c&&0<c.length){u.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var N=I.getElementsByTagName("diagram");if(1==N.length&&!m){if(I=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=N[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,t))}}else if(0<N.length){m=[];var p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(N[0]),q=!1,p=1);for(;p<N.length;p++){var F=N[p].getAttribute("id");N[p].removeAttribute("id");var J=this.updatePageRoot(new DiagramPage(N[p]));c[F]=N[p].getAttribute("id");var M=this.pages.length;null==J.getName()&&J.setName(mxResources.get("pageWithNumber",[M+1]));u.model.execute(new ChangePage(this,J,J,M,
+!0));m.push(J)}this.updatePageLinks(c,m)}}if(null!=I&&"mxGraphModel"===I.nodeName){C=u.importGraphModel(I,e,g,q);if(null!=C)for(p=0;p<C.length;p++)this.updatePageLinksForCell(c,C[p]);var H=u.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var G=new ChangePageSetup(this,null,H);G.ignoreColor=!0;u.model.execute(G)}}z&&this.insertHandler(C,null,null,u.defaultVertexStyle,u.defaultEdgeStyle,!1,!0)}finally{u.model.endUpdate()}}}catch(E){if(n)throw E;
this.handleError(E)}return C};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,e){var g=document.createElement("div"),q=this.editor.graph,n=q.getLinkForCell(e);null!=n&&q.setLinkForCell(e,this.updatePageLink(c,n));if(q.isHtmlLabel(e)){g.innerHTML=q.sanitizeHtml(q.getLabel(e));for(var p=g.getElementsByTagName("a"),z=!1,C=0;C<p.length;C++)n=p[C].getAttribute("href"),null!=n&&(p[C].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&q.labelChanged(e,g.innerHTML)}for(C=0;C<q.model.getChildCount(e);C++)this.updatePageLinksForCell(c,q.model.getChildAt(e,C))};EditorUi.prototype.updatePageLink=
-function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var q=JSON.parse(e.substring(17));if(null!=q.actions){for(var n=0;n<q.actions.length;n++){var p=q.actions[n];if(null!=p.open&&Graph.isPageLink(p.open)){var z=p.open.substring(p.open.indexOf(",")+1);g=c[z];null!=g?p.open="data:page/id,"+g:null==this.getPageById(z)&&delete p.open}}e="data:action/json,"+JSON.stringify(q)}}catch(C){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,q,n){q=null!=q?q:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(q);try{var C="UNKNOWN-VISIO",u=q.lastIndexOf(".");if(0<=u&&u<q.length)C=q.substring(u+1).toUpperCase();else{var y=q.lastIndexOf("/");0<=
+function(c,e){var g=document.createElement("div"),q=this.editor.graph,n=q.getLinkForCell(e);null!=n&&q.setLinkForCell(e,this.updatePageLink(c,n));if(q.isHtmlLabel(e)){g.innerHTML=q.sanitizeHtml(q.getLabel(e));for(var m=g.getElementsByTagName("a"),z=!1,C=0;C<m.length;C++)n=m[C].getAttribute("href"),null!=n&&(m[C].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&q.labelChanged(e,g.innerHTML)}for(C=0;C<q.model.getChildCount(e);C++)this.updatePageLinksForCell(c,q.model.getChildAt(e,C))};EditorUi.prototype.updatePageLink=
+function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var q=JSON.parse(e.substring(17));if(null!=q.actions){for(var n=0;n<q.actions.length;n++){var m=q.actions[n];if(null!=m.open&&Graph.isPageLink(m.open)){var z=m.open.substring(m.open.indexOf(",")+1);g=c[z];null!=g?m.open="data:page/id,"+g:null==this.getPageById(z)&&delete m.open}}e="data:action/json,"+JSON.stringify(q)}}catch(C){}return e};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,q,n){q=null!=q?q:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(q);try{var C="UNKNOWN-VISIO",u=q.lastIndexOf(".");if(0<=u&&u<q.length)C=q.substring(u+1).toUpperCase();else{var y=q.lastIndexOf("/");0<=
y&&y<q.length&&(q=q.substring(y+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+q,label:z?"remote":"local"})}catch(N){}if(z)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{z=new FormData;z.append("file1",c,q);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(q)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
-null!=n&&I.setRequestHeader("x-convert-custom",n);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var N=I.response;if("text/xml"==N.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(m){try{e(m.target.result)}catch(F){g({message:mxResources.get("errorLoadingFile")})}});t.readAsText(N)}else this.doImportVisio(N,e,g,q)}catch(m){g(m)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(t=new FileReader,t.onload=
-function(){g({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(m){g({})}});I.send(z)}else try{this.doImportVisio(c,e,g,q)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(n){this.handleError(n)});
+null!=n&&I.setRequestHeader("x-convert-custom",n);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var N=I.response;if("text/xml"==N.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(p){try{e(p.target.result)}catch(F){g({message:mxResources.get("errorLoadingFile")})}});t.readAsText(N)}else this.doImportVisio(N,e,g,q)}catch(p){g(p)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(t=new FileReader,t.onload=
+function(){g({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(p){g({})}});I.send(z)}else try{this.doImportVisio(c,e,g,q)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(n){this.handleError(n)});
var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(n){g(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var n=
-JSON.parse(c);e(LucidImporter.importState(n));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",n];null!=n.state&&p.push(JSON.parse(n.state));if(null!=n.svgThumbs)for(var z=0;z<n.svgThumbs.length;z++)p.push(Editor.createSvgDataUri(n.svgThumbs[z]));null!=n.thumb&&p.push(n.thumb);console.log.apply(console,p)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(c);e(LucidImporter.importState(n));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var m=[(new Date).toISOString(),"convertLucidChart",n];null!=n.state&&m.push(JSON.parse(n.state));if(null!=n.svgThumbs)for(var z=0;z<n.svgThumbs.length;z++)m.push(Editor.createSvgDataUri(n.svgThumbs[z]));null!=n.thumb&&m.push(n.thumb);console.log.apply(console,m)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",q)})})})}):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generateMermaidImage=function(c,
-e,g,q){var n=this,p=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(z).getElementsByTagName("svg");
-if(0<C.length){var u=parseFloat(C[0].getAttribute("width")),y=parseFloat(C[0].getAttribute("height"));if(isNaN(u)||isNaN(y))try{var I=C[0].getAttribute("viewBox").split(/\s+/);u=parseFloat(I[2]);y=parseFloat(I[3])}catch(N){u=u||100,y=y||100}g(n.convertDataUri(Editor.createSvgDataUri(z)),u,y)}else q({message:mxResources.get("invalidInput")})}catch(N){q(N)}})}catch(z){q(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,q){function n(C,u,y){c1=C>>2;c2=(C&3)<<4|u>>4;c3=(u&15)<<2|y>>6;c4=y&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+e,g,q){var n=this,m=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(z).getElementsByTagName("svg");
+if(0<C.length){var u=parseFloat(C[0].getAttribute("width")),y=parseFloat(C[0].getAttribute("height"));if(isNaN(u)||isNaN(y))try{var I=C[0].getAttribute("viewBox").split(/\s+/);u=parseFloat(I[2]);y=parseFloat(I[3])}catch(N){u=u||100,y=y||100}g(n.convertDataUri(Editor.createSvgDataUri(z)),u,y)}else q({message:mxResources.get("invalidInput")})}catch(N){q(N)}})}catch(z){q(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?m():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+m):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,q){function n(C,u,y){c1=C>>2;c2=(C&3)<<4|u>>4;c3=(u&15)<<2|y>>6;c4=y&63;r="";r+=m(c1&63);r+=m(c2&63);r+=m(c3&63);return r+=m(c4&63)}function m(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+n(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+n(C.charCodeAt(i),0,0):r+n(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var u=new FileReader;u.readAsDataURL(this.response);u.onloadend=function(y){var I=new Image;I.onload=
-function(){try{var N=I.width,t=I.height;if(0==N&&0==t){var m=u.result,F=m.indexOf(","),J=decodeURIComponent(escape(atob(m.substring(F+1)))),M=mxUtils.parseXml(J).getElementsByTagName("svg");0<M.length&&(N=parseFloat(M[0].getAttribute("width")),t=parseFloat(M[0].getAttribute("height")))}g(u.result,N,t)}catch(H){q(H)}};I.src=u.result};u.onerror=function(y){q(y)}}else q(C)};z.onerror=function(C){q(C)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var q=this.editor.graph,n=null;q.getModel().beginUpdate();
-try{n=q.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(n,!0)}finally{q.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,g,q,n,p,z,C){p=null!=p?p:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(t){4==
-t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var u=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,p,!0,C)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
-e,g,p,!0,C);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(y,e,g,p,!0,C);if(0<I.length)return I}catch(t){}this.loadImage(c,mxUtils.bind(this,function(t){if("data:"==c.substring(0,5))this.resizeImage(t,c,mxUtils.bind(this,function(J,M,H){u.setSelectionCell(u.insertVertex(null,null,
-"",u.snap(e),u.snap(g),M,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(J)+";"))}),z,this.maxImageSize);else{var m=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),F=Math.round(t.width*m);t=Math.round(t.height*m);u.setSelectionCell(u.insertVertex(null,null,"",u.snap(e),u.snap(g),F,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var t=null;u.getModel().beginUpdate();try{t=u.insertVertex(u.getDefaultParent(),null,c,u.snap(e),u.snap(g),1,1,"text;"+(q?"html=1;":"")),u.updateCellSize(t),u.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{u.getModel().endUpdate()}u.setSelectionCell(t)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,p,null,C);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(t){this.editor.graph.setSelectionCells(this.importXml(t,e,g,p,null,C))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{u=this.editor.graph;n=null;u.getModel().beginUpdate();try{n=u.insertVertex(u.getDefaultParent(),null,"",u.snap(e),u.snap(g),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));u.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+function(){try{var N=I.width,t=I.height;if(0==N&&0==t){var p=u.result,F=p.indexOf(","),J=decodeURIComponent(escape(atob(p.substring(F+1)))),M=mxUtils.parseXml(J).getElementsByTagName("svg");0<M.length&&(N=parseFloat(M[0].getAttribute("width")),t=parseFloat(M[0].getAttribute("height")))}g(u.result,N,t)}catch(H){q(H)}};I.src=u.result};u.onerror=function(y){q(y)}}else q(C)};z.onerror=function(C){q(C)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var q=this.editor.graph,n=null;q.getModel().beginUpdate();
+try{n=q.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(n,!0)}finally{q.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,g,q,n,m,z,C){m=null!=m?m:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(t){4==
+t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var u=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,m,!0,C)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
+e,g,m,!0,C);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(y,e,g,m,!0,C);if(0<I.length)return I}catch(t){}this.loadImage(c,mxUtils.bind(this,function(t){if("data:"==c.substring(0,5))this.resizeImage(t,c,mxUtils.bind(this,function(J,M,H){u.setSelectionCell(u.insertVertex(null,null,
+"",u.snap(e),u.snap(g),M,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(J)+";"))}),z,this.maxImageSize);else{var p=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),F=Math.round(t.width*p);t=Math.round(t.height*p);u.setSelectionCell(u.insertVertex(null,null,"",u.snap(e),u.snap(g),F,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var t=null;u.getModel().beginUpdate();try{t=u.insertVertex(u.getDefaultParent(),null,c,u.snap(e),u.snap(g),1,1,"text;"+(q?"html=1;":"")),u.updateCellSize(t),u.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{u.getModel().endUpdate()}u.setSelectionCell(t)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,m,null,C);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(t){this.editor.graph.setSelectionCells(this.importXml(t,e,g,m,null,C))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{u=this.editor.graph;n=null;u.getModel().beginUpdate();try{n=u.insertVertex(u.getDefaultParent(),null,"",u.snap(e),u.snap(g),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));u.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
"...");n.value=c;u.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var N=u.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=N.width;n.geometry.height=N.height}Graph.isLink(n.value)&&u.setLinkForCell(n,n.value);n.geometry.width+=u.gridSize;n.geometry.height+=u.gridSize}finally{u.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,C){StorageFile.listFiles(this,
"F",z,C)});window.openBrowserFile=mxUtils.bind(this,function(z,C,u){StorageFile.getFileContent(this,z,C,u)});window.deleteBrowserFile=mxUtils.bind(this,function(z,C,u){StorageFile.deleteFile(this,z,C,u)});if(!e){var q=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(z=new Blob([z],{type:"application/octet-stream"}),
-this.importVisio(z,mxUtils.bind(this,function(u){this.importXml(u,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,p=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=q;p.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,e,g){var q=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(p){if(mxUtils.isEmptyObject(p.files))g();else{var z=0,C,u=!1;p.forEach(function(y,I){y=I.name.toLowerCase();"diagram/diagram.xml"==y?(u=!0,I.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>z&&(z=y,C=I))});0<z?C.async("string").then(function(y){(new XMLHttpRequest).upload&&
-q.isRemoteFileFormat(y,c.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):q.parseFileData(y,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?e(I.responseText):g())}),c.name):g()}):u||g()}},function(p){g(p)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.importFile=function(c,e,g,q,n,p,z,C,u,y,I,N){y=null!=
-y?y:!0;var t=!1,m=null,F=mxUtils.bind(this,function(J){var M=null;null!=J&&"<mxlibrary"==J.substring(0,10)?this.loadLibrary(new LocalLibrary(this,J,z)):M=this.importXml(J,g,q,y,null,null!=N?mxEvent.isControlDown(N):null);null!=C&&C(M)});"image"==e.substring(0,5)?(u=!1,"image/png"==e.substring(0,9)&&(e=I?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(m=this.importXml(e,g,q,y,null,null!=N?mxEvent.isControlDown(N):null),u=!0)),u||(e=this.editor.graph,u=c.indexOf(";"),0<u&&(c=c.substring(0,
-u)+c.substring(c.indexOf(",",u+1))),y&&e.isGridEnabled()&&(g=e.snap(g),q=e.snap(q)),m=[e.insertVertex(null,null,"",g,q,n,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(t=!0,this.importGraphML(c,F)):null!=u&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(t=!0,this.importVisio(u,F)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,n=mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?F(J.responseText):null!=C&&C(null))}),null!=c?this.parseFileData(c,n,z):this.parseFile(u,n,z)):0==c.indexOf("PK")&&null!=u?(t=!0,this.importZipFile(u,F,mxUtils.bind(this,function(){m=this.insertTextAt(this.validateFileData(c),g,q,!0,null,y);C(m)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(m=this.insertTextAt(this.validateFileData(c),
-g,q,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));t||null==C||C(m);return m};EditorUi.prototype.importFiles=function(c,e,g,q,n,p,z,C,u,y,I,N,t){q=null!=q?q:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var m=null!=e&&null!=g,F=!0;e=null!=e?e:0;g=null!=g?g:0;var J=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var M=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>M){J=!0;break}var G=mxUtils.bind(this,function(){var E=
-this.editor.graph,P=E.gridSize;n=null!=n?n:mxUtils.bind(this,function(A,L,Q,O,R,S,X,aa,Y){try{return null!=A&&"<mxlibrary"==A.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,A,X)),null):this.importFile(A,L,Q,O,R,S,X,aa,Y,m,N,t)}catch(Z){return this.handleError(Z),null}});p=null!=p?p:mxUtils.bind(this,function(A){E.setSelectionCells(A)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,W=T,U=[],V=mxUtils.bind(this,function(A,L){U[A]=L;if(0==
---W){this.spinner.stop();if(null!=C)C(U);else{var Q=[];E.getModel().beginUpdate();try{for(A=0;A<U.length;A++){var O=U[A]();null!=O&&(Q=Q.concat(O))}}finally{E.getModel().endUpdate()}}p(Q)}}),l=0;l<T;l++)mxUtils.bind(this,function(A){var L=c[A];if(null!=L){var Q=new FileReader;Q.onload=mxUtils.bind(this,function(O){if(null==z||z(L))if("image/"==L.type.substring(0,6))if("image/svg"==L.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+
+this.importVisio(z,mxUtils.bind(this,function(u){this.importXml(u,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,m=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=q;m.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,g){var q=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(m){if(mxUtils.isEmptyObject(m.files))g();else{var z=0,C,u=!1;m.forEach(function(y,I){y=I.name.toLowerCase();"diagram/diagram.xml"==y?(u=!0,I.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>z&&(z=y,C=I))});0<z?C.async("string").then(function(y){(new XMLHttpRequest).upload&&
+q.isRemoteFileFormat(y,c.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):q.parseFileData(y,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?e(I.responseText):g())}),c.name):g()}):u||g()}},function(m){g(m)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.importFile=function(c,e,g,q,n,m,z,C,u,y,I,N){y=null!=
+y?y:!0;var t=!1,p=null,F=mxUtils.bind(this,function(J){var M=null;null!=J&&"<mxlibrary"==J.substring(0,10)?this.loadLibrary(new LocalLibrary(this,J,z)):M=this.importXml(J,g,q,y,null,null!=N?mxEvent.isControlDown(N):null);null!=C&&C(M)});"image"==e.substring(0,5)?(u=!1,"image/png"==e.substring(0,9)&&(e=I?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(p=this.importXml(e,g,q,y,null,null!=N?mxEvent.isControlDown(N):null),u=!0)),u||(e=this.editor.graph,u=c.indexOf(";"),0<u&&(c=c.substring(0,
+u)+c.substring(c.indexOf(",",u+1))),y&&e.isGridEnabled()&&(g=e.snap(g),q=e.snap(q)),p=[e.insertVertex(null,null,"",g,q,n,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(t=!0,this.importGraphML(c,F)):null!=u&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(t=!0,this.importVisio(u,F)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,n=mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?F(J.responseText):null!=C&&C(null))}),null!=c?this.parseFileData(c,n,z):this.parseFile(u,n,z)):0==c.indexOf("PK")&&null!=u?(t=!0,this.importZipFile(u,F,mxUtils.bind(this,function(){p=this.insertTextAt(this.validateFileData(c),g,q,!0,null,y);C(p)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(p=this.insertTextAt(this.validateFileData(c),
+g,q,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));t||null==C||C(p);return p};EditorUi.prototype.importFiles=function(c,e,g,q,n,m,z,C,u,y,I,N,t){q=null!=q?q:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var p=null!=e&&null!=g,F=!0;e=null!=e?e:0;g=null!=g?g:0;var J=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var M=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>M){J=!0;break}var G=mxUtils.bind(this,function(){var E=
+this.editor.graph,P=E.gridSize;n=null!=n?n:mxUtils.bind(this,function(A,L,Q,O,R,S,X,aa,Y){try{return null!=A&&"<mxlibrary"==A.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,A,X)),null):this.importFile(A,L,Q,O,R,S,X,aa,Y,p,N,t)}catch(Z){return this.handleError(Z),null}});m=null!=m?m:mxUtils.bind(this,function(A){E.setSelectionCells(A)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,W=T,U=[],V=mxUtils.bind(this,function(A,L){U[A]=L;if(0==
+--W){this.spinner.stop();if(null!=C)C(U);else{var Q=[];E.getModel().beginUpdate();try{for(A=0;A<U.length;A++){var O=U[A]();null!=O&&(Q=Q.concat(O))}}finally{E.getModel().endUpdate()}}m(Q)}}),l=0;l<T;l++)mxUtils.bind(this,function(A){var L=c[A];if(null!=L){var Q=new FileReader;Q.onload=mxUtils.bind(this,function(O){if(null==z||z(L))if("image/"==L.type.substring(0,6))if("image/svg"==L.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+
1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?V(A,mxUtils.bind(this,function(){try{if(null!=X){var ca=X.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],la=fa.getAttribute("width"),
ia=fa.getAttribute("height");la=null!=la&&"%"!=la.charAt(la.length-1)?parseFloat(la):NaN;ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;var qa=fa.getAttribute("viewBox");if(null==qa||0==qa.length)fa.setAttribute("viewBox","0 0 "+la+" "+ia);else if(isNaN(la)||isNaN(ia)){var ka=qa.split(" ");3<ka.length&&(la=parseFloat(ka[2]),ia=parseFloat(ka[3]))}R=Editor.createSvgDataUri(mxUtils.getXml(fa));var Da=Math.min(1,Math.min(q/Math.max(1,la)),q/Math.max(1,ia)),Ea=n(R,L.type,e+A*P,g+A*P,Math.max(1,
Math.round(la*Da)),Math.max(1,Math.round(ia*Da)),L.name);if(isNaN(la)||isNaN(ia)){var za=new Image;za.onload=mxUtils.bind(this,function(){la=Math.max(1,za.width);ia=Math.max(1,za.height);Ea[0].geometry.width=la;Ea[0].geometry.height=ia;fa.setAttribute("viewBox","0 0 "+la+" "+ia);R=Editor.createSvgDataUri(mxUtils.getXml(fa));var Oa=R.indexOf(";");0<Oa&&(R=R.substring(0,Oa)+R.substring(R.indexOf(",",Oa+1)));E.setCellStyles("image",R,[Ea[0]])});za.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return Ea}}}catch(Oa){}return null})):
@@ -11969,10 +11969,10 @@ V(A,mxUtils.bind(this,function(){return n(aa,"text/xml",e+A*P,g+A*P,0,0,L.name)}
mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,O.target.result,mxUtils.bind(this,function(fa,la,ia){V(A,mxUtils.bind(this,function(){if(null!=fa&&fa.length<y){var qa=F&&this.isResampleImageSize(L.size,I)?Math.min(1,Math.min(q/la,q/ia)):1;return n(fa,L.type,e+A*P,g+A*P,Math.round(la*qa),Math.round(ia*qa),L.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),F,q,I,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=O.target.result,n(R,L.type,e+A*P,g+A*P,240,160,L.name,function(ca){V(A,function(){return ca})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||/(\.vs(x|sx?))($|\?)/i.test(L.name)?n(null,L.type,e+A*P,g+A*P,240,160,L.name,function(O){V(A,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?Q.readAsDataURL(L):Q.readAsText(L)}})(l)});if(J){J=
[];for(H=0;H<c.length;H++)J.push(c[H]);c=J;this.confirmImageResize(function(E){F=E;G()},u)}else G()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},q=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
-null,n=function(p,z){if(p||e)mxSettings.setResizeImages(p?z:null),mxSettings.save();g();c(z)};null==q||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){n(p,!0)},function(p){n(p,!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?220:200,
+null,n=function(m,z){if(m||e)mxSettings.setResizeImages(m?z:null),mxSettings.save();g();c(z)};null==q||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(m){n(m,!0)},function(m){n(m,!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?220:200,
!0,!0):n(!1,q)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var q=new FileReader;q.onload=mxUtils.bind(this,function(){this.parseFileData(q.result,e,g)});q.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var q=new XMLHttpRequest;q.open("POST",OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){e(q)};q.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,q,n,p,z){n=null!=n?n:this.maxImageSize;var C=Math.max(1,c.width),u=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=z?z:e.length,p))try{var y=Math.max(C/n,u/n);if(1<y){var I=Math.round(C/y),N=Math.round(u/y),t=document.createElement("canvas");t.width=I;t.height=N;t.getContext("2d").drawImage(c,0,0,I,N);var m=
-t.toDataURL();if(m.length<e.length){var F=document.createElement("canvas");F.width=I;F.height=N;var J=F.toDataURL();m!==J&&(e=m,C=I,u=N)}}}catch(M){}g(e,C,u)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;e(q)};null!=g&&(q.onerror=g);q.src=c}catch(n){if(null!=g)g(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,q,n,m,z){n=null!=n?n:this.maxImageSize;var C=Math.max(1,c.width),u=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=z?z:e.length,m))try{var y=Math.max(C/n,u/n);if(1<y){var I=Math.round(C/y),N=Math.round(u/y),t=document.createElement("canvas");t.width=I;t.height=N;t.getContext("2d").drawImage(c,0,0,I,N);var p=
+t.toDataURL();if(p.length<e.length){var F=document.createElement("canvas");F.width=I;F.height=N;var J=F.toDataURL();p!==J&&(e=p,C=I,u=N)}}}catch(M){}g(e,C,u)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;e(q)};null!=g&&(q.onerror=g);q.src=c}catch(n){if(null!=g)g(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=
function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(M){var H=M.getEvent();return null==M.getState()&&!mxEvent.isMouseEvent(H)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&(null==M.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});e.cellEditor.editPlantUmlData=function(M,H,G){var E=JSON.parse(G);H=new TextareaDialog(c,mxResources.get("plantUml")+":",E.data,
function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,E.format,function(T,W,U){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==E.format)e.labelChanged(M,"<pre>"+T+"</pre>"),e.updateCellSize(M,!0);else{e.setCellStyles("image",c.convertDataUri(T),[M]);var V=e.model.getGeometry(M);null!=V&&(V=V.clone(),V.width=W,V.height=U,e.cellsResized([M],[V],!1))}e.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:P,format:E.format}))}finally{e.getModel().endUpdate()}},
@@ -11980,35 +11980,35 @@ function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,
W),V.height=Math.max(V.height,U),e.cellsResized([M],[V],!1));e.setAttributeForCell(M,"mermaidData",JSON.stringify({data:P,config:E.config},null,2))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(M,H){try{var G=this.graph.getAttributeForCell(M,"plantUmlData");if(null!=G)this.editPlantUmlData(M,H,G);else if(G=this.graph.getAttributeForCell(M,"mermaidData"),
null!=G)this.editMermaidData(M,H,G);else{var E=e.getCellStyle(M);"1"==mxUtils.getValue(E,"metaEdit","0")?c.showDataDialog(M):g.apply(this,arguments)}}catch(P){c.handleError(P)}};e.getLinkTitle=function(M){return c.getLinkTitle(M)};e.customLinkClicked=function(M){var H=!1;try{c.handleCustomLink(M),H=!0}catch(G){c.handleError(G)}return H};var q=e.parseBackgroundImage;e.parseBackgroundImage=function(M){var H=q.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});
return H};var n=e.setBackgroundImage;e.setBackgroundImage=function(M){null!=M&&null!=M.originalSrc&&(M=c.createImageForPageLink(M.originalSrc,c.currentPage,this));n.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(M,H){M=null!=e.backgroundImage?e.backgroundImage.originalSrc:
-null;if(null!=M){var G=M.indexOf(",");if(0<G)for(M=M.substring(G+1),H=H.getProperty("patches"),G=0;G<H.length;G++)if(null!=H[G][EditorUi.DIFF_UPDATE]&&null!=H[G][EditorUi.DIFF_UPDATE][M]||null!=H[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[G][EditorUi.DIFF_REMOVE],M)){e.refreshBackgroundImage();break}}}));var p=e.getBackgroundImageObject;e.getBackgroundImageObject=function(M,H){var G=p.apply(this,arguments);if(null!=G&&null!=G.originalSrc)if(!H)G={src:G.originalSrc};else if(H&&null!=this.themes&&
+null;if(null!=M){var G=M.indexOf(",");if(0<G)for(M=M.substring(G+1),H=H.getProperty("patches"),G=0;G<H.length;G++)if(null!=H[G][EditorUi.DIFF_UPDATE]&&null!=H[G][EditorUi.DIFF_UPDATE][M]||null!=H[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[G][EditorUi.DIFF_REMOVE],M)){e.refreshBackgroundImage();break}}}));var m=e.getBackgroundImageObject;e.getBackgroundImageObject=function(M,H){var G=m.apply(this,arguments);if(null!=G&&null!=G.originalSrc)if(!H)G={src:G.originalSrc};else if(H&&null!=this.themes&&
"darkTheme"==this.defaultThemeName){var E=this.stylesheet,P=this.shapeForegroundColor,T=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";G=c.createImageForPageLink(G.originalSrc);this.shapeBackgroundColor=T;this.shapeForegroundColor=P;this.stylesheet=E}return G};var z=this.clearDefaultStyle;this.clearDefaultStyle=function(){z.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||
(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/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 C=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(M){M=null!=M?M:"";"1"==urlParams.dev&&(M+=(0<M.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var u=e.addClickHandler;e.addClickHandler=function(M,H,G){var E=H;
H=function(P,T){if(null==T){var W=mxEvent.getSource(P);"a"==W.nodeName.toLowerCase()&&(T=W.getAttribute("href"))}null!=T&&e.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&e.customLinkClicked(T)&&mxEvent.consume(P);null!=E&&E(P,T)};u.call(this,M,H,G)};v.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(M,H,G){c.editor.graph.isSelectionEmpty()?
y.apply(this,arguments):c.menus.addMenuItems(M,"delete - cut copy copyAsImage - duplicate".split(" "),null,G)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=e.getExportVariables;e.getExportVariables=function(){var M=I.apply(this,arguments),H=c.getCurrentFile();null!=H&&(M.filename=H.getTitle());M.pagecount=null!=c.pages?c.pages.length:1;M.page=null!=
c.currentPage?c.currentPage.getName():"";M.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return M};var N=e.getGlobalVariable;e.getGlobalVariable=function(M){var H=c.getCurrentFile();return"filename"==M&&null!=H?H.getTitle():"page"==M&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==M?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==M?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var t=e.labelLinkClicked;
-e.labelLinkClicked=function(M,H,G){var E=H.getAttribute("href");if(null==E||!e.isCustomLink(E)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))t.apply(this,arguments);else{if(!e.isEnabled()||null!=M&&e.isCellLocked(M.cell))e.customLinkClicked(E),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=function(){var M=c.defaultFilename,H=c.getCurrentFile();null!=H&&(M=null!=H.getTitle()?H.getTitle():M);return M};var m=this.actions.get("print");m.setEnabled(!mxClient.IS_IOS||
-!navigator.standalone);m.visible=m.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,
+e.labelLinkClicked=function(M,H,G){var E=H.getAttribute("href");if(null==E||!e.isCustomLink(E)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))t.apply(this,arguments);else{if(!e.isEnabled()||null!=M&&e.isCellLocked(M.cell))e.customLinkClicked(E),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=function(){var M=c.defaultFilename,H=c.getCurrentFile();null!=H&&(M=null!=H.getTitle()?H.getTitle():M);return M};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||
+!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!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(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(M){var H=
e.cellEditor.text2,G=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(E){null!=G&&(G.parentNode.removeChild(G),G=null);E.stopPropagation();E.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(E){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(H));E.stopPropagation();E.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(E){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<E.dataTransfer.files.length)this.importFiles(E.dataTransfer.files,
0,0,this.maxImageSize,function(T,W,U,V,l,A){e.insertImage(T,l,A)},function(){},function(T){return"image/"==T.type.substring(0,6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(E));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var P=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var U=this.maxImageSize;U=Math.min(1,
-Math.min(U/Math.max(1,W)),U/Math.max(1,T));e.insertImage(decodeURIComponent(P),W*U,T*U)})):document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/plain"));E.stopPropagation();E.preventDefault()})))}));this.isSettingsEnabled()&&(m=
-this.editor.graph.view,m.setUnit(mxSettings.getUnit()),m.addListener("unitChanged",function(M,H){mxSettings.setUnit(H.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,m.unit),this.refresh());if("1"==urlParams.styledev){m=document.getElementById("geFooter");null!=m&&(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)})),m.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(M,H){0<this.editor.graph.getSelectionCount()?(M=this.editor.graph.getSelectionCell(),M=this.editor.graph.getModel().getStyle(M),this.styleInput.value=M||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var F=this.isSelectionAllowed;this.isSelectionAllowed=function(M){return mxEvent.getSource(M)==this.styleInput?!0:F.apply(this,arguments)}}m=document.getElementById("geInfo");null!=m&&m.parentNode.removeChild(m);if(Graph.fileSupport&&(!this.editor.chromeless||
+Math.min(U/Math.max(1,W)),U/Math.max(1,T));e.insertImage(decodeURIComponent(P),W*U,T*U)})):document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/plain"));E.stopPropagation();E.preventDefault()})))}));this.isSettingsEnabled()&&(p=
+this.editor.graph.view,p.setUnit(mxSettings.getUnit()),p.addListener("unitChanged",function(M,H){mxSettings.setUnit(H.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,p.unit),this.refresh());if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(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)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(M,H){0<this.editor.graph.getSelectionCount()?(M=this.editor.graph.getSelectionCell(),M=this.editor.graph.getModel().getStyle(M),this.styleInput.value=M||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var F=this.isSelectionAllowed;this.isSelectionAllowed=function(M){return mxEvent.getSource(M)==this.styleInput?!0:F.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||
this.editor.editable)){var J=null;mxEvent.addListener(e.container,"dragleave",function(M){e.isEnabled()&&(null!=J&&(J.parentNode.removeChild(J),J=null),M.stopPropagation(),M.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(M){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();M.stopPropagation();M.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,
function(M){null!=J&&(J.parentNode.removeChild(J),J=null);if(e.isEnabled()){var H=mxUtils.convertPoint(e.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),G=M.dataTransfer.files,E=e.view.translate,P=e.view.scale,T=H.x/P-E.x,W=H.y/P-E.y;if(0<G.length)H=1==G.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===G[0].type.substring(0,9)||"image/"!==G[0].type.substring(0,6)||/(\.drawio.png)$/i.test(G[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(M)||H)?(!mxEvent.isShiftDown(M)&&H&&null!=
this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(M)&&(W=T=null),this.importFiles(G,T,W,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(M),null,null,mxEvent.isShiftDown(M),M));else{mxEvent.isAltDown(M)&&(W=T=0);var U=0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")?M.dataTransfer.getData("text/uri-list"):null;G=this.extractGraphModelFromEvent(M,null!=this.pages);if(null!=G)e.setSelectionCells(this.importXml(G,T,W,!0));else if(0<=mxUtils.indexOf(M.dataTransfer.types,
"text/html")){var V=M.dataTransfer.getData("text/html");G=document.createElement("div");G.innerHTML=e.sanitizeHtml(V);var l=null;H=G.getElementsByTagName("img");null!=H&&1==H.length?(V=H[0].getAttribute("src"),null==V&&(V=H[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)||(l=!0)):(H=G.getElementsByTagName("a"),null!=H&&1==H.length?V=H[0].getAttribute("href"):(G=G.getElementsByTagName("pre"),null!=G&&1==G.length&&(V=mxUtils.getTextContent(G[0]))));var A=!0,L=mxUtils.bind(this,
function(){e.setSelectionCells(this.insertTextAt(V,T,W,!0,l,null,A,mxEvent.isControlDown(M)))});l&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(Q){A=Q;L()},mxEvent.isControlDown(M)):L()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(Q){var O=Math.max(1,Q.width);Q=Math.max(1,Q.height);var R=this.maxImageSize;R=Math.min(1,Math.min(R/Math.max(1,O)),R/Math.max(1,Q));e.setSelectionCell(e.insertVertex(null,
null,"",T,W,O*R,Q*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(Q){e.setSelectionCells(this.insertTextAt(U,T,W,!0))})):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(M.dataTransfer.getData("text/plain"),T,W,!0))}}M.stopPropagation();M.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-m=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",m);this.addListener("sketchModeChanged",m);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);
-this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,q=!1,n=0;n<g.types.length;n++)if("text/"===g.types[n].substring(0,5)){q=!0;break}if(!q){var p=g.items;for(index in p){var z=p[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,
-function(u,y,I,N,t,m){c.insertImage(u,t,m)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var y=0;y<u.length;y++)u[y]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,
+p=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",p);this.addListener("sketchModeChanged",p);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);
+this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,q=!1,n=0;n<g.types.length;n++)if("text/"===g.types[n].substring(0,5)){q=!0;break}if(!q){var m=g.items;for(index in m){var z=m[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,
+function(u,y,I,N,t,p){c.insertImage(u,t,p)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var y=0;y<u.length;y++)u[y]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,
g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize=
-"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var z=mxEvent.getSource(p);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=p.keyCode&&
-(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||q||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",e.container.appendChild(g),q=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var z=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||224!=z&&17!=z&&91!=z&&93!=z||(q=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),
-g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(p){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
-(g.innerHTML="&nbsp;",g.focus(),null!=p.clipboardData&&this.pasteCells(p,g,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,g,!1,!0)}),0))}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==g?!0:n.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);this.doSetCurrentTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));e||this.alert(mxResources.get("restartForChangeRequired"))};
+"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(m){var z=mxEvent.getSource(m);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=m.keyCode&&
+(mxClient.IS_MAC||17!=m.keyCode)&&(!mxClient.IS_MAC||91!=m.keyCode&&93!=m.keyCode)||q||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",e.container.appendChild(g),q=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(m){var z=m.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||224!=z&&17!=z&&91!=z&&93!=z||(q=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),
+g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(m){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(m){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(m){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
+(g.innerHTML="&nbsp;",g.focus(),null!=m.clipboardData&&this.pasteCells(m,g,!0,!0),mxEvent.isConsumed(m)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(m,g,!1,!0)}),0))}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=function(m){return mxEvent.getSource(m)==g?!0:n.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);this.doSetCurrentTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));e||this.alert(mxResources.get("restartForChangeRequired"))};
EditorUi.prototype.doSetCurrentTheme=function(c){Editor.currentTheme!=c&&(Editor.currentTheme=c)};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
@@ -12025,8 +12025,8 @@ x.setAttribute("charset","UTF-8");x.setAttribute("type","text/css");EditorUi.pro
e.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=e.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=e.shapeForegroundColor;Graph.prototype.defaultThemeName=e.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==x.parentNode&&document.getElementsByTagName("head")[0].appendChild(x):null!=x.parentNode&&x.parentNode.removeChild(x)}};
EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var e=function(q,n,p){null==
-q[n]&&(q[n]=p)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);e(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);e(g.defaultEdgeStyle,"edgeStyle","none");e(g.defaultEdgeStyle,"rounded","0");e(g.defaultEdgeStyle,"curved","1");e(g.defaultEdgeStyle,"jettySize","auto");
+function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var e=function(q,n,m){null==
+q[n]&&(q[n]=m)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);e(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);e(g.defaultEdgeStyle,"edgeStyle","none");e(g.defaultEdgeStyle,"rounded","0");e(g.defaultEdgeStyle,"curved","1");e(g.defaultEdgeStyle,"jettySize","auto");
e(g.defaultEdgeStyle,"orthogonalLoop","1");e(g.defaultEdgeStyle,"endArrow","open");e(g.defaultEdgeStyle,"endSize","14");e(g.defaultEdgeStyle,"startSize","14");c&&(e(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),e(g.defaultVertexStyle,"hachureGap","4"),e(g.defaultVertexStyle,"sketch","1"),e(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),e(g.defaultEdgeStyle,
"sketch","1"),e(g.defaultEdgeStyle,"hachureGap","4"),e(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),e(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),e=null!=e?e.getName():
mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
@@ -12035,48 +12035,48 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito
function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(q,n){try{this.spinner.stop();var p=this.createImageDataUri(q,e,"png"),z=parseInt(n.getAttribute("width")),C=parseInt(n.getAttribute("height"));this.writeImageToClipboard(p,z,C,mxUtils.bind(this,function(u){this.handleError(u)}))}catch(u){this.handleError(u)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(q,n){try{this.spinner.stop();var m=this.createImageDataUri(q,e,"png"),z=parseInt(n.getAttribute("width")),C=parseInt(n.getAttribute("height"));this.writeImageToClipboard(m,z,C,mxUtils.bind(this,function(u){this.handleError(u)}))}catch(u){this.handleError(u)}}),null,null,null,mxUtils.bind(this,
function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,q){var n=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":n,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](q)};
EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var q=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),n=mxUtils.getXml(g.encodeCells(q));mxUtils.setTextContent(c,encodeURIComponent(n));e?(g.removeCells(q,!1),g.lastPasteXml=null):(g.lastPasteXml=n,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;
-e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,q){var n=this.editor.graph,p=null;n.lastPasteXml==c?n.pasteCounter++:(n.lastPasteXml=c,n.pasteCounter=0);var z=n.pasteCounter*n.gridSize;if(g||this.isCompatibleString(c))p=this.importXml(c,z,z),n.setSelectionCells(p);else if(e&&1==n.getSelectionCount()){z=n.getStartEditingCell(n.getSelectionCell(),
-q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==n.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])n.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{n.model.beginUpdate();try{n.labelChanged(z,c),Graph.isLink(c)&&n.setLinkForCell(z,c)}finally{n.model.endUpdate()}}n.setSelectionCell(z)}else p=n.getInsertPoint(),n.isMouseInsertPoint()&&(z=0,n.lastPasteXml==c&&0<n.pasteCounter&&n.pasteCounter--),p=this.insertTextAt(c,p.x+z,p.y+z,!0),n.setSelectionCells(p);n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(c,e,g,q){if(!mxEvent.isConsumed(c)){var n=e,p=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),C=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var u=decodeURIComponent(z);this.isCompatibleString(u)&&(C=!0,z=u)}catch(F){}C=C?null:c.clipboardData.getData("text/html");null!=C&&0<C.length?(n=
-this.parseHtmlData(C),p="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,C))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(F){var J=this.editor.graph;J.lastPasteXml==F?J.pasteCounter++:(J.lastPasteXml=F,J.pasteCounter=0);var M=
-J.pasteCounter*J.gridSize;J.setSelectionCells(this.importXml(F,M,M));J.scrollCellToVisible(J.getSelectionCell())}),mxUtils.bind(this,function(F){this.handleError(F)})),mxEvent.consume(c));else{var y=p?n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText),I=!1;try{var N=y.lastIndexOf("%3E");0<=N&&N<y.length-3&&(y=y.substring(0,N+3))}catch(F){}try{z=n.getElementsByTagName("span"),(u=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(y))&&
-(this.isCompatibleString(u)||0==u.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,y=u)}catch(F){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var t=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,q,I,c)}catch(F){console.log("Miro import error:",F)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",t):t()}else this.pasteXml(y,q,I,c);try{mxEvent.consume(c)}catch(F){}}else if(!g){var m=
-this.editor.graph;m.lastPasteXml=null;m.pasteCounter=0}}catch(F){this.handleError(F)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(q){null!=e&&(e.parentNode.removeChild(e),e=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<
+e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,q){var n=this.editor.graph,m=null;n.lastPasteXml==c?n.pasteCounter++:(n.lastPasteXml=c,n.pasteCounter=0);var z=n.pasteCounter*n.gridSize;if(g||this.isCompatibleString(c))m=this.importXml(c,z,z),n.setSelectionCells(m);else if(e&&1==n.getSelectionCount()){z=n.getStartEditingCell(n.getSelectionCell(),
+q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==n.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])n.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{n.model.beginUpdate();try{n.labelChanged(z,c),Graph.isLink(c)&&n.setLinkForCell(z,c)}finally{n.model.endUpdate()}}n.setSelectionCell(z)}else m=n.getInsertPoint(),n.isMouseInsertPoint()&&(z=0,n.lastPasteXml==c&&0<n.pasteCounter&&n.pasteCounter--),m=this.insertTextAt(c,m.x+z,m.y+z,!0),n.setSelectionCells(m);n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));return m};EditorUi.prototype.pasteCells=function(c,e,g,q){if(!mxEvent.isConsumed(c)){var n=e,m=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),C=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var u=decodeURIComponent(z);this.isCompatibleString(u)&&(C=!0,z=u)}catch(F){}C=C?null:c.clipboardData.getData("text/html");null!=C&&0<C.length?(n=
+this.parseHtmlData(C),m="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,C))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(F){var J=this.editor.graph;J.lastPasteXml==F?J.pasteCounter++:(J.lastPasteXml=F,J.pasteCounter=0);var M=
+J.pasteCounter*J.gridSize;J.setSelectionCells(this.importXml(F,M,M));J.scrollCellToVisible(J.getSelectionCell())}),mxUtils.bind(this,function(F){this.handleError(F)})),mxEvent.consume(c));else{var y=m?n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText),I=!1;try{var N=y.lastIndexOf("%3E");0<=N&&N<y.length-3&&(y=y.substring(0,N+3))}catch(F){}try{z=n.getElementsByTagName("span"),(u=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(y))&&
+(this.isCompatibleString(u)||0==u.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,y=u)}catch(F){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var t=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,q,I,c)}catch(F){console.log("Miro import error:",F)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",t):t()}else this.pasteXml(y,q,I,c);try{mxEvent.consume(c)}catch(F){}}else if(!g){var p=
+this.editor.graph;p.lastPasteXml=null;p.pasteCounter=0}}catch(F){this.handleError(F)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(q){null!=e&&(e.parentNode.removeChild(e),e=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<
document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());q.stopPropagation();q.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(q){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<q.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(q.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(q)&&!mxEvent.isShiftDown(q)):this.openFiles(q.dataTransfer.files,
-!0);else{var n=this.extractGraphModelFromEvent(q);if(null==n){var p=null!=q.dataTransfer?q.dataTransfer:q.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?n=p.getData("Text"):(n=null,n=0<=mxUtils.indexOf(p.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=n&&0<n.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(n),p=p.getElementsByTagName("img"),0<p.length&&
-(n=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(n=p.getData("text/plain"))),null!=n&&(Editor.isPngDataUrl(n)?(n=Editor.extractGraphModelFromPng(n),null!=n&&0<n.length&&this.openLocalFile(n,null,!0)):this.isRemoteFileFormat(n)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(n))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()&&this.openLocalFile(z.getText(),
-null,!0)})):/^https?:\/\//.test(n)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(n):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(n)))))}else this.openLocalFile(n,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var q=document.body;var n=document.documentElement;var p=(q.clientWidth||n.clientWidth)-3;q=
-Math.max(q.clientHeight||0,n.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,p=c.clientWidth,q=c.clientHeight;n=document.createElement("div");n.style.zIndex=mxPopupMenu.prototype.zIndex+2;n.style.border="3px dotted rgb(254, 137, 12)";n.style.pointerEvents="none";n.style.position="absolute";n.style.top=e+"px";n.style.left=g+"px";n.style.width=Math.max(0,p-3)+"px";n.style.height=Math.max(0,q-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(n):document.body.appendChild(n);
+!0);else{var n=this.extractGraphModelFromEvent(q);if(null==n){var m=null!=q.dataTransfer?q.dataTransfer:q.clipboardData;null!=m&&(10==document.documentMode||11==document.documentMode?n=m.getData("Text"):(n=null,n=0<=mxUtils.indexOf(m.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(m.types,"text/html")?m.getData("text/html"):null,null!=n&&0<n.length?(m=document.createElement("div"),m.innerHTML=this.editor.graph.sanitizeHtml(n),m=m.getElementsByTagName("img"),0<m.length&&
+(n=m[0].getAttribute("src"))):0<=mxUtils.indexOf(m.types,"text/plain")&&(n=m.getData("text/plain"))),null!=n&&(Editor.isPngDataUrl(n)?(n=Editor.extractGraphModelFromPng(n),null!=n&&0<n.length&&this.openLocalFile(n,null,!0)):this.isRemoteFileFormat(n)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(n))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()&&this.openLocalFile(z.getText(),
+null,!0)})):/^https?:\/\//.test(n)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(n):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(n)))))}else this.openLocalFile(n,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var q=document.body;var n=document.documentElement;var m=(q.clientWidth||n.clientWidth)-3;q=
+Math.max(q.clientHeight||0,n.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,m=c.clientWidth,q=c.clientHeight;n=document.createElement("div");n.style.zIndex=mxPopupMenu.prototype.zIndex+2;n.style.border="3px dotted rgb(254, 137, 12)";n.style.pointerEvents="none";n.style.position="absolute";n.style.top=e+"px";n.style.left=g+"px";n.style.width=Math.max(0,m-3)+"px";n.style.height=Math.max(0,q-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(n):document.body.appendChild(n);
return n};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),q=new mxGraphModel;g.decode(e,q);e=q.getChildAt(q.getRoot(),0);for(g=0;g<q.getChildCount(e);g++)c.push(q.getChildAt(e,g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,q,n){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=
-e.substring(0,e.length-4)+".drawio");var p=mxUtils.bind(this,function(C){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,C,e))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,e,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,
-mxUtils.bind(this,function(C){this.spinner.stop();p(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();p(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?p(C.responseText):this.handleError({message:mxResources.get(413==
+e.substring(0,e.length-4)+".drawio");var m=mxUtils.bind(this,function(C){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,C,e))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,e,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,
+mxUtils.bind(this,function(C){this.spinner.stop();m(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();m(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?m(C.responseText):this.handleError({message:mxResources.get(413==
C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,e,q)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();p(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,q)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(n=null,q=!0,
-c=z)}this.spinner.stop();this.openLocalFile(c,e,q,n,null!=n?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(q){var n=new FileReader;n.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,q.name,q,e)}catch(z){this.handleError(z)}});n.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==q.type.substring(0,
-5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?n.readAsText(q):n.readAsDataURL(q)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,q,n){var p=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,q,n))});if(null!=
-c&&0<c.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),
+this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();m(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,q)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(n=null,q=!0,
+c=z)}this.spinner.stop();this.openLocalFile(c,e,q,n,null!=n?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(q){var n=new FileReader;n.onload=mxUtils.bind(this,function(m){try{this.openFileHandle(m.target.result,q.name,q,e)}catch(z){this.handleError(z)}});n.onerror=mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m);window.openFile=null});"image"!==q.type.substring(0,
+5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?n.readAsText(q):n.readAsDataURL(q)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,q,n){var m=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,q,n))});if(null!=
+c&&0<c.length)null==m||!m.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=m&&m.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=m&&m.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(z){if(null!=
-z){var C=z.lastIndexOf(".");0<C&&(z=z.substring(C+1,z.length));null==e[z]&&(e[z]=!0)}}var q=this.editor.graph,n=q.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(n[mxConstants.STYLE_SHAPE]));q.model.isEdge(c)&&(g(mxMarker.getPackageForType(n[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(n[mxConstants.STYLE_ENDARROW])));n=q.model.getChildCount(c);for(var p=0;p<n;p++)this.addBasenamesForCell(q.model.getChildAt(c,p),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=
+z){var C=z.lastIndexOf(".");0<C&&(z=z.substring(C+1,z.length));null==e[z]&&(e[z]=!0)}}var q=this.editor.graph,n=q.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(n[mxConstants.STYLE_SHAPE]));q.model.isEdge(c)&&(g(mxMarker.getPackageForType(n[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(n[mxConstants.STYLE_ENDARROW])));n=q.model.getChildCount(c);for(var m=0;m<n;m++)this.addBasenamesForCell(q.model.getChildAt(c,m),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=
c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=
-!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,q,n){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(n)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var z=p.model.cells,C;for(C in z){var u=z[C];null!=u&&null!=u.style&&(u.style+=";sketch=1;"+(-1==u.style.indexOf("fontFamily=")||-1<u.style.indexOf("fontFamily=Helvetica;")?
+!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,q,n){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(n)try{var m=this.editor.graph;m.setGridEnabled(!1);m.pageVisible=!1;var z=m.model.cells,C;for(C in z){var u=z[C];null!=u&&null!=u.style&&(u.style+=";sketch=1;"+(-1==u.style.indexOf("fontFamily=")||-1<u.style.indexOf("fontFamily=Helvetica;")?
"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=q?q:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var q=e.background;if(null==q||q==mxConstants.NONE)q=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(n){g.postMessage(JSON.stringify({event:"export",
point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(n)}),"*")}),null,null,!0,q,1,this.embedExportBorder)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(c){var e=null,g=!1,q=!1,n=null,p=mxUtils.bind(this,function(u,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(u){if(u.source==(window.opener||window.parent)){var y=u.data,I=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
+function(c){var e=null,g=!1,q=!1,n=null,m=mxUtils.bind(this,function(u,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,m);mxEvent.addListener(window,"message",mxUtils.bind(this,function(u){if(u.source==(window.opener||window.parent)){var y=u.data,I=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var t=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[u],"data",[y])}catch(Y){y=null}try{if(null==y)return;
-if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var m=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(Y){null!=
-Y?z.postMessage(JSON.stringify({event:"prompt",value:Y,message:y}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==y.action){var F=N(y.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),F,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",
-message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{m.init()}catch(Y){z.postMessage(JSON.stringify({event:"draft",
+if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var p=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(Y){null!=
+Y?z.postMessage(JSON.stringify({event:"prompt",value:Y,message:y}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==y.action){var F=N(y.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),F,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",
+message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{p.init()}catch(Y){z.postMessage(JSON.stringify({event:"draft",
error:Y.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var J=1==y.enableRecent,M=1==y.enableSearch,H=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var G=this.getCurrentUser(),E=new TemplatesDialog(this,function(Y,Z,ca){Y=Y||this.emptyDiagramXml;z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca.url,libs:ca.libs,builtIn:null!=ca.info&&null!=ca.info.custContentId,message:y}),
"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=G?G.id:null,J?mxUtils.bind(this,function(Y,Z,ca){this.remoteInvoke("getRecentDiagrams",[ca],null,Y,Z)}):null,M?mxUtils.bind(this,function(Y,Z,ca,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ca)}):null,mxUtils.bind(this,function(Y,Z,ca){this.remoteInvoke("getFileContent",[Y.url],null,Z,ca)}),null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
-!1,!1,!0,!0);this.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}m=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(Y,Z,ca,fa){Y=Y||this.emptyDiagramXml;null!=y.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca,libs:fa,builtIn:!0,message:y}),"*"):(c(Y,u,Y!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
+!1,!1,!0,!0);this.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(Y,Z,ca,fa){Y=Y||this.emptyDiagramXml;null!=y.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca,libs:fa,builtIn:!0,message:y}),"*"):(c(Y,u,Y!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
null,J?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,M?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ca){z.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ca}),"*")}),null,null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
-y.withoutType);this.showDialog(m.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==y.action){var P=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:P,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));
+y.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==y.action){var P=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:P,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));
null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var T=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==
y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var W=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,V=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=y.format;Z.message=y;Z.data=Y;Z.xml=W;z.postMessage(JSON.stringify(Z),"*")}),l=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==y.format&&
(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(W)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);V(Y)}),A=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=A){var Y=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Z,ca=0;ca<this.pages.length;ca++)if(this.pages[ca].getId()==
@@ -12095,30 +12095,30 @@ mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<thi
this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",
e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,z.postMessage(JSON.stringify(Z),"*");null!=I&&I()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(Y){aa(Y,u)},mxUtils.bind(this,function(Y){this.handleError(Y)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,u)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==y||"object"!==typeof y||
-null==y.format||null==y.data&&null==y.url?(y=N(y),aa(y,u)):this.loadDescriptor(y,mxUtils.bind(this,function(Y){aa(X(),u)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(p,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(u,y,I){C.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
+null==y.format||null==y.data&&null==y.url?(y=N(y),aa(y,u)):this.loadDescriptor(y,mxUtils.bind(this,function(Y){aa(X(),u)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;m="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(m,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(u,y,I){C.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
href:u,target:y,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";var e=document.createElement("button");e.className="geBigButton";var g=e;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var q="1"==urlParams.publishClose?mxResources.get("publish"):
mxResources.get("saveAndExit");mxUtils.write(e,q);e.setAttribute("title",q);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e,
mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e),g=e);"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",
e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e),g=e);g.style.marginRight="20px";this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c);c.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,
function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():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",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,
-e){try{var g=c.split("\n"),q=[],n=[],p=[],z={};if(0<g.length){var C={},u=this.editor.graph,y=null,I=null,N=null,t=null,m=null,F=null,J=null,M="whiteSpace=wrap;html=1;",H=null,G=null,E="",P="auto",T="auto",W=!1,U=null,V=null,l=40,A=40,L=100,Q=0,O=function(){null!=e?e(xa):(u.setSelectionCells(xa),u.scrollCellToVisible(u.getSelectionCell()))},R=u.getFreeInsertPoint(),S=R.x,X=R.y;R=X;var aa=null,Y="auto";G=null;for(var Z=[],ca=null,fa=null,la=0;la<g.length&&"#"==g[la].charAt(0);){c=g[la].replace(/\r$/,
-"");for(la++;la<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[la].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[la].substring(1)),la++;if("#"!=c.charAt(1)){var ia=c.indexOf(":");if(0<ia){var qa=mxUtils.trim(c.substring(1,ia)),ka=mxUtils.trim(c.substring(ia+1));"label"==qa?aa=u.sanitizeHtml(ka):"labelname"==qa&&0<ka.length&&"-"!=ka?m=ka:"labels"==qa&&0<ka.length&&"-"!=ka?J=JSON.parse(ka):"style"==qa?I=ka:"parentstyle"==qa?M=ka:"unknownStyle"==qa&&"-"!=ka?F=ka:"stylename"==qa&&0<ka.length&&"-"!=
+e){try{var g=c.split("\n"),q=[],n=[],m=[],z={};if(0<g.length){var C={},u=this.editor.graph,y=null,I=null,N=null,t=null,p=null,F=null,J=null,M="whiteSpace=wrap;html=1;",H=null,G=null,E="",P="auto",T="auto",W=!1,U=null,V=null,l=40,A=40,L=100,Q=0,O=function(){null!=e?e(xa):(u.setSelectionCells(xa),u.scrollCellToVisible(u.getSelectionCell()))},R=u.getFreeInsertPoint(),S=R.x,X=R.y;R=X;var aa=null,Y="auto";G=null;for(var Z=[],ca=null,fa=null,la=0;la<g.length&&"#"==g[la].charAt(0);){c=g[la].replace(/\r$/,
+"");for(la++;la<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[la].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[la].substring(1)),la++;if("#"!=c.charAt(1)){var ia=c.indexOf(":");if(0<ia){var qa=mxUtils.trim(c.substring(1,ia)),ka=mxUtils.trim(c.substring(ia+1));"label"==qa?aa=u.sanitizeHtml(ka):"labelname"==qa&&0<ka.length&&"-"!=ka?p=ka:"labels"==qa&&0<ka.length&&"-"!=ka?J=JSON.parse(ka):"style"==qa?I=ka:"parentstyle"==qa?M=ka:"unknownStyle"==qa&&"-"!=ka?F=ka:"stylename"==qa&&0<ka.length&&"-"!=
ka?t=ka:"styles"==qa&&0<ka.length&&"-"!=ka?N=JSON.parse(ka):"vars"==qa&&0<ka.length&&"-"!=ka?y=JSON.parse(ka):"identity"==qa&&0<ka.length&&"-"!=ka?H=ka:"parent"==qa&&0<ka.length&&"-"!=ka?G=ka:"namespace"==qa&&0<ka.length&&"-"!=ka?E=ka:"width"==qa?P=ka:"height"==qa?T=ka:"collapsed"==qa&&"-"!=ka?W="true"==ka:"left"==qa&&0<ka.length?U=ka:"top"==qa&&0<ka.length?V=ka:"ignore"==qa?fa=ka.split(","):"connect"==qa?Z.push(JSON.parse(ka)):"link"==qa?ca=ka:"padding"==qa?Q=parseFloat(ka):"edgespacing"==qa?l=parseFloat(ka):
"nodespacing"==qa?A=parseFloat(ka):"levelspacing"==qa?L=parseFloat(ka):"layout"==qa&&(Y=ka)}}}if(null==g[la])throw Error(mxResources.get("invalidOrMissingFile"));var Da=this.editor.csvToArray(g[la].replace(/\r$/,""));ia=c=null;qa=[];for(ka=0;ka<Da.length;ka++)H==Da[ka]&&(c=ka),G==Da[ka]&&(ia=ka),qa.push(mxUtils.trim(Da[ka]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==aa&&(aa="%"+qa[0]+"%");if(null!=Z)for(var Ea=0;Ea<Z.length;Ea++)null==C[Z[Ea].to]&&(C[Z[Ea].to]={});H=[];
for(ka=la+1;ka<g.length;ka++){var za=this.editor.csvToArray(g[ka].replace(/\r$/,""));if(null==za){var Oa=40<g[ka].length?g[ka].substring(0,40)+"...":g[ka];throw Error(Oa+" ("+ka+"):\n"+mxResources.get("containsValidationErrors"));}0<za.length&&H.push(za)}u.model.beginUpdate();try{for(ka=0;ka<H.length;ka++){za=H[ka];var Aa=null,Ga=null!=c?E+za[c]:null;g=!1;null!=Ga&&(Aa=u.model.getCell(Ga),g=null==Aa||0<=mxUtils.indexOf(q,Aa));var Ia=new mxCell(aa,new mxGeometry(S,R,0,0),I||"whiteSpace=wrap;html=1;");
-Ia.collapsed=W;Ia.vertex=!0;Ia.id=Ga;null==Aa||g||u.model.setCollapsed(Aa,W);for(var ra=0;ra<za.length;ra++)u.setAttributeForCell(Ia,qa[ra],za[ra]),null==Aa||g||u.setAttributeForCell(Aa,qa[ra],za[ra]);if(null!=m&&null!=J){var ua=J[Ia.getAttribute(m)];null!=ua&&(u.labelChanged(Ia,ua),null==Aa||g||u.cellLabelChanged(Aa,ua))}if(null!=t&&null!=N){var Ba=N[Ia.getAttribute(t)];null!=Ba&&(Ia.style=Ba)}u.setAttributeForCell(Ia,"placeholders","1");Ia.style=u.replacePlaceholders(Ia,Ia.style,y);null==Aa||g?
-u.fireEvent(new mxEventObject("cellsInserted","cells",[Ia])):(u.model.setStyle(Aa,Ia.style),0>mxUtils.indexOf(p,Aa)&&p.push(Aa),u.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])));g=null!=Aa;Aa=Ia;if(!g)for(Ea=0;Ea<Z.length;Ea++)C[Z[Ea].to][Aa.getAttribute(Z[Ea].to)]=Aa;null!=ca&&"link"!=ca&&(u.setLinkForCell(Aa,Aa.getAttribute(ca)),u.setAttributeForCell(Aa,ca,null));var Fa=this.editor.graph.getPreferredSizeForCell(Aa);G=null!=ia?u.model.getCell(E+za[ia]):null;if(Aa.vertex){Oa=null!=G?0:
+Ia.collapsed=W;Ia.vertex=!0;Ia.id=Ga;null==Aa||g||u.model.setCollapsed(Aa,W);for(var ra=0;ra<za.length;ra++)u.setAttributeForCell(Ia,qa[ra],za[ra]),null==Aa||g||u.setAttributeForCell(Aa,qa[ra],za[ra]);if(null!=p&&null!=J){var ua=J[Ia.getAttribute(p)];null!=ua&&(u.labelChanged(Ia,ua),null==Aa||g||u.cellLabelChanged(Aa,ua))}if(null!=t&&null!=N){var Ba=N[Ia.getAttribute(t)];null!=Ba&&(Ia.style=Ba)}u.setAttributeForCell(Ia,"placeholders","1");Ia.style=u.replacePlaceholders(Ia,Ia.style,y);null==Aa||g?
+u.fireEvent(new mxEventObject("cellsInserted","cells",[Ia])):(u.model.setStyle(Aa,Ia.style),0>mxUtils.indexOf(m,Aa)&&m.push(Aa),u.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])));g=null!=Aa;Aa=Ia;if(!g)for(Ea=0;Ea<Z.length;Ea++)C[Z[Ea].to][Aa.getAttribute(Z[Ea].to)]=Aa;null!=ca&&"link"!=ca&&(u.setLinkForCell(Aa,Aa.getAttribute(ca)),u.setAttributeForCell(Aa,ca,null));var Fa=this.editor.graph.getPreferredSizeForCell(Aa);G=null!=ia?u.model.getCell(E+za[ia]):null;if(Aa.vertex){Oa=null!=G?0:
S;la=null!=G?0:X;null!=U&&null!=Aa.getAttribute(U)&&(Aa.geometry.x=Oa+parseFloat(Aa.getAttribute(U)));null!=V&&null!=Aa.getAttribute(V)&&(Aa.geometry.y=la+parseFloat(Aa.getAttribute(V)));var wa="@"==P.charAt(0)?Aa.getAttribute(P.substring(1)):null;Aa.geometry.width=null!=wa&&"auto"!=wa?parseFloat(Aa.getAttribute(P.substring(1))):"auto"==P||"auto"==wa?Fa.width+Q:parseFloat(P);var La="@"==T.charAt(0)?Aa.getAttribute(T.substring(1)):null;Aa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==
-T||"auto"==La?Fa.height+Q:parseFloat(T);R+=Aa.geometry.height+A}g?(null==z[Ga]&&(z[Ga]=[]),z[Ga].push(Aa)):(q.push(Aa),null!=G?(G.style=u.replacePlaceholders(G,M,y),u.addCell(Aa,G),n.push(G)):p.push(u.addCell(Aa)))}for(ka=0;ka<n.length;ka++)wa="@"==P.charAt(0)?n[ka].getAttribute(P.substring(1)):null,La="@"==T.charAt(0)?n[ka].getAttribute(T.substring(1)):null,"auto"!=P&&"auto"!=wa||"auto"!=T&&"auto"!=La||u.updateGroupBounds([n[ka]],Q,!0);var ja=p.slice(),xa=p.slice();for(Ea=0;Ea<Z.length;Ea++){var sa=
-Z[Ea];for(ka=0;ka<q.length;ka++){Aa=q[ka];var da=mxUtils.bind(this,function(Ha,Ma,Ra){var Ja=Ma.getAttribute(Ra.from);if(null!=Ja&&""!=Ja){Ja=Ja.split(",");for(var Pa=0;Pa<Ja.length;Pa++){var Qa=C[Ra.to][Ja[Pa]];if(null==Qa&&null!=F){Qa=new mxCell(Ja[Pa],new mxGeometry(S,X,0,0),F);Qa.style=u.replacePlaceholders(Ma,Qa.style,y);var Na=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Na.width+Q;Qa.geometry.height=Na.height+Q;C[Ra.to][Ja[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ja[Pa];p.push(u.addCell(Qa))}if(null!=
+T||"auto"==La?Fa.height+Q:parseFloat(T);R+=Aa.geometry.height+A}g?(null==z[Ga]&&(z[Ga]=[]),z[Ga].push(Aa)):(q.push(Aa),null!=G?(G.style=u.replacePlaceholders(G,M,y),u.addCell(Aa,G),n.push(G)):m.push(u.addCell(Aa)))}for(ka=0;ka<n.length;ka++)wa="@"==P.charAt(0)?n[ka].getAttribute(P.substring(1)):null,La="@"==T.charAt(0)?n[ka].getAttribute(T.substring(1)):null,"auto"!=P&&"auto"!=wa||"auto"!=T&&"auto"!=La||u.updateGroupBounds([n[ka]],Q,!0);var ja=m.slice(),xa=m.slice();for(Ea=0;Ea<Z.length;Ea++){var sa=
+Z[Ea];for(ka=0;ka<q.length;ka++){Aa=q[ka];var da=mxUtils.bind(this,function(Ha,Ma,Ra){var Ja=Ma.getAttribute(Ra.from);if(null!=Ja&&""!=Ja){Ja=Ja.split(",");for(var Pa=0;Pa<Ja.length;Pa++){var Qa=C[Ra.to][Ja[Pa]];if(null==Qa&&null!=F){Qa=new mxCell(Ja[Pa],new mxGeometry(S,X,0,0),F);Qa.style=u.replacePlaceholders(Ma,Qa.style,y);var Na=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Na.width+Q;Qa.geometry.height=Na.height+Q;C[Ra.to][Ja[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ja[Pa];m.push(u.addCell(Qa))}if(null!=
Qa){Na=Ra.label;null!=Ra.fromlabel&&(Na=(Ma.getAttribute(Ra.fromlabel)||"")+(Na||""));null!=Ra.sourcelabel&&(Na=u.replacePlaceholders(Ma,Ra.sourcelabel,y)+(Na||""));null!=Ra.tolabel&&(Na=(Na||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Na=(Na||"")+u.replacePlaceholders(Qa,Ra.targetlabel,y));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ha;Sa=null!=Ra.style?u.replacePlaceholders(Sa,Ra.style,y):u.createCurrentEdgeStyle();Na=u.insertEdge(null,null,Na||"",Ra.invert?Qa:Ha,Ra.invert?
Ha:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],Ka=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=!0;null!=Ua.placeholders&&(Ka.value=u.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ha,Ka.value,y));if(null!=Ua.dx||null!=Ua.dy)Ka.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=Ua.dy?Ua.dy:0);Na.insert(Ka)}xa.push(Na);mxUtils.remove(Ra.invert?
-Ha:Qa,ja)}}}});da(Aa,Aa,sa);if(null!=z[Aa.id])for(ra=0;ra<z[Aa.id].length;ra++)da(Aa,z[Aa.id][ra],sa)}}if(null!=fa)for(ka=0;ka<q.length;ka++)for(Aa=q[ka],ra=0;ra<fa.length;ra++)u.setAttributeForCell(Aa,mxUtils.trim(fa[ra]),null);if(0<p.length){var ba=new mxParallelEdgeLayout(u);ba.spacing=l;ba.checkOverlap=!0;var na=function(){0<ba.spacing&&ba.execute(u.getDefaultParent());for(var Ha=0;Ha<p.length;Ha++){var Ma=u.getCellGeometry(p[Ha]);Ma.x=Math.round(u.snap(Ma.x));Ma.y=Math.round(u.snap(Ma.y));"auto"==
-P&&(Ma.width=Math.round(u.snap(Ma.width)));"auto"==T&&(Ma.height=Math.round(u.snap(Ma.height)))}};if("["==Y.charAt(0)){var ea=O;u.view.validate();this.executeLayouts(u.createLayouts(JSON.parse(Y)),function(){na();ea()});O=null}else if("circle"==Y){var ha=new mxCircleLayout(u);ha.disableEdgeStyle=!1;ha.resetEdges=!1;var oa=ha.isVertexIgnored;ha.isVertexIgnored=function(Ha){return oa.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){ha.execute(u.getDefaultParent());na()},
-!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&xa.length==2*p.length-1&&1==ja.length){u.view.validate();var ma=new mxCompactTreeLayout(u,"horizontaltree"==Y);ma.levelDistance=A;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(u.getDefaultParent(),0<ja.length?ja[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ja.length){u.view.validate();var va=new mxHierarchicalLayout(u,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);va.intraCellSpacing=A;va.parallelEdgeSpacing=l;va.interRankCellSpacing=L;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(u.getDefaultParent(),xa);u.moveCells(xa,S,X)},!0,O);O=null}else if("orgchart"==Y){u.view.validate();var Ca=new mxOrgChartLayout(u,2,L,A),ya=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return ya.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){Ca.execute(u.getDefaultParent());na()},!0,O);O=null}else if("organic"==
-Y||"auto"==Y&&xa.length>p.length){u.view.validate();var ta=new mxFastOrganicLayout(u);ta.forceConstant=3*A;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var pa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){ta.execute(u.getDefaultParent());na()},!0,O);O=null}}this.hideDialog()}finally{u.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&
+Ha:Qa,ja)}}}});da(Aa,Aa,sa);if(null!=z[Aa.id])for(ra=0;ra<z[Aa.id].length;ra++)da(Aa,z[Aa.id][ra],sa)}}if(null!=fa)for(ka=0;ka<q.length;ka++)for(Aa=q[ka],ra=0;ra<fa.length;ra++)u.setAttributeForCell(Aa,mxUtils.trim(fa[ra]),null);if(0<m.length){var ba=new mxParallelEdgeLayout(u);ba.spacing=l;ba.checkOverlap=!0;var na=function(){0<ba.spacing&&ba.execute(u.getDefaultParent());for(var Ha=0;Ha<m.length;Ha++){var Ma=u.getCellGeometry(m[Ha]);Ma.x=Math.round(u.snap(Ma.x));Ma.y=Math.round(u.snap(Ma.y));"auto"==
+P&&(Ma.width=Math.round(u.snap(Ma.width)));"auto"==T&&(Ma.height=Math.round(u.snap(Ma.height)))}};if("["==Y.charAt(0)){var ea=O;u.view.validate();this.executeLayouts(u.createLayouts(JSON.parse(Y)),function(){na();ea()});O=null}else if("circle"==Y){var ha=new mxCircleLayout(u);ha.disableEdgeStyle=!1;ha.resetEdges=!1;var oa=ha.isVertexIgnored;ha.isVertexIgnored=function(Ha){return oa.apply(this,arguments)||0>mxUtils.indexOf(m,Ha)};this.executeLayout(function(){ha.execute(u.getDefaultParent());na()},
+!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&xa.length==2*m.length-1&&1==ja.length){u.view.validate();var ma=new mxCompactTreeLayout(u,"horizontaltree"==Y);ma.levelDistance=A;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(u.getDefaultParent(),0<ja.length?ja[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ja.length){u.view.validate();var va=new mxHierarchicalLayout(u,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);va.intraCellSpacing=A;va.parallelEdgeSpacing=l;va.interRankCellSpacing=L;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(u.getDefaultParent(),xa);u.moveCells(xa,S,X)},!0,O);O=null}else if("orgchart"==Y){u.view.validate();var Ca=new mxOrgChartLayout(u,2,L,A),ya=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return ya.apply(this,arguments)||0>mxUtils.indexOf(m,Ha)};this.executeLayout(function(){Ca.execute(u.getDefaultParent());na()},!0,O);O=null}else if("organic"==
+Y||"auto"==Y&&xa.length>m.length){u.view.validate();var ta=new mxFastOrganicLayout(u);ta.forceConstant=3*A;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var pa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(m,Ha)};this.executeLayout(function(){ta.execute(u.getDefaultParent());na()},!0,O);O=null}}this.hideDialog()}finally{u.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&
"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",q;for(q in urlParams)0>mxUtils.indexOf(c,q)&&null!=urlParams[q]&&(e+=g+q+"="+urlParams[q],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),q;for(q in urlParams)0>mxUtils.indexOf(g,
q)&&(c=0==e?c+"?":c+"&",null!=urlParams[q]&&(c+=q+"="+urlParams[q],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,q,n){c=new LinkDialog(this,c,e,g,!0,q,n);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=
this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
@@ -12129,32 +12129,32 @@ this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}))
this.actions.get("shadowVisible").setEnabled(q);this.actions.get("connectionArrows").setEnabled(q);this.actions.get("connectionPoints").setEnabled(q);this.actions.get("copyStyle").setEnabled(q&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(q&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(q);this.actions.get("createRevision").setEnabled(q);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=
e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(q&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==
urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"")+"...";c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(q&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
-function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,q,n,p,z,C){var u=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(u.getSvg(q,n,p)),"image/svg+xml");
-else{var y=c.getFileData(!0,null,null,null,null,!0),I=u.getGraphBounds(),N=Math.floor(I.width*n/u.view.scale),t=Math.floor(I.height*n/u.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var m={globalVars:u.getExportVariables()};C&&(m.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});c.saveRequest(e,g,function(F,J){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(J||"0")+(null!=F?"&filename="+
-encodeURIComponent(F):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(0<z?"&dpi="+z:"")+"&bg="+(null!=q?q:"none")+"&w="+N+"&h="+t+"&border="+p+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(n,null==q||"none"==q,!0,!1,!1,p,!0,!1,null,C,z):c.exportImage(n,!1,!0,!1,!1,p,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=
+function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,q,n,m,z,C){var u=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(u.getSvg(q,n,m)),"image/svg+xml");
+else{var y=c.getFileData(!0,null,null,null,null,!0),I=u.getGraphBounds(),N=Math.floor(I.width*n/u.view.scale),t=Math.floor(I.height*n/u.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var p={globalVars:u.getExportVariables()};C&&(p.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});c.saveRequest(e,g,function(F,J){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(J||"0")+(null!=F?"&filename="+
+encodeURIComponent(F):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<z?"&dpi="+z:"")+"&bg="+(null!=q?q:"none")+"&w="+N+"&h="+t+"&border="+m+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(n,null==q||"none"==q,!0,!1,!1,m,!0,!1,null,C,z):c.exportImage(n,!1,!0,!1,!1,m,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=
0;g<this.pages.length;g++){var q=c;this.currentPage!=this.pages[g]&&(q=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),q.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+q.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxUtils.htmlEntities(c));
-q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var n=document.createElement("div");n.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var C=z[c];if("R"==C.substring(0,1)){var u=JSON.parse(decodeURIComponent(C.substring(1)));p[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",
-null,null,function(y){n.innerText="";if(0==y.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<y.length;I++){var N=y[I];p[N.id]&&(e[N.id]=N);var t=this.addCheckbox(n,N.title,p[N.id]);(function(m,F){mxEvent.addListener(F,"change",function(){this.checked?e[m.id]=m:delete e[m.id]})})(N,t)}},mxUtils.bind(this,function(y){n.innerText="";var I=document.createElement("div");I.style.padding="8px";
-I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));n.appendChild(I)}));g.appendChild(n);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,I;for(I in e)null==p[I]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(t){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-t,N))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[I]));for(I in p)e[I]||this.closeLibrary(new RemoteLibrary(this,null,p[I]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
+q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var n=document.createElement("div");n.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var m={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var C=z[c];if("R"==C.substring(0,1)){var u=JSON.parse(decodeURIComponent(C.substring(1)));m[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",
+null,null,function(y){n.innerText="";if(0==y.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<y.length;I++){var N=y[I];m[N.id]&&(e[N.id]=N);var t=this.addCheckbox(n,N.title,m[N.id]);(function(p,F){mxEvent.addListener(F,"change",function(){this.checked?e[p.id]=p:delete e[p.id]})})(N,t)}},mxUtils.bind(this,function(y){n.innerText="";var I=document.createElement("div");I.style.padding="8px";
+I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));n.appendChild(I)}));g.appendChild(n);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,I;for(I in e)null==m[I]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(t){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+t,N))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[I]));for(I in m)e[I]||this.closeLibrary(new RemoteLibrary(this,null,m[I]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
-function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,q,n){var p=!0,z=window.setTimeout(mxUtils.bind(this,function(){p=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(z);
-p&&q.apply(this,arguments)}),u=mxUtils.bind(this,function(){window.clearTimeout(z);p&&n.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:u});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,I){var N={event:"remoteInvokeResponse",
-msgMarkers:c.msgMarkers};null!=I?N.error={errResp:I}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var q=c.funtionName,n=this.remoteInvokableFns[q];if(null!=n&&"function"===typeof this[q]){if(n.allowedDomains){for(var p=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){p=!0;break}if(!p){g(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)||(C=[]);if(n.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),
-C.push(function(y){g(null,y||"Unkown Error")}),this[q].apply(this,C);else{var u=this[q].apply(this,C);g([u])}}else g(null,"Invalid Call: "+q+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var q=g.open("database",2);q.onupgradeneeded=function(n){try{var p=q.result;1>n.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});
-2>n.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};q.onsuccess=mxUtils.bind(this,function(n){var p=q.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||
-"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var u=!0,y=!1,I,N=0,t=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),m=mxUtils.bind(this,function(){N++;F()}),F=mxUtils.bind(this,function(){try{if(N>=
-I.length)t();else{var M=I[N];StorageFile.getFileContent(this,M,mxUtils.bind(this,function(H){null==H||".scratchpad"==M&&H==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[M]}),"*"):m()}),m)}}catch(H){console.log(H)}}),J=mxUtils.bind(this,function(M){try{this.setDatabaseItem(null,[{title:M.title,size:M.data.length,lastModified:Date.now(),type:M.isLib?"L":"F"},{title:M.title,data:M.data}],m,m,["filesInfo","files"])}catch(H){console.log(H)}});
-z=mxUtils.bind(this,function(M){try{if(M.source==C.contentWindow){var H={};try{H=JSON.parse(M.data)}catch(G){}"init"==H.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||y||(u?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],u=!1,F()):t():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?J(H.resp[0]):m())}}catch(G){console.log(G)}});
-window.addEventListener("message",z)}})));c(p);p.onversionchange=function(){p.close()}});q.onerror=e;q.onblocked=function(){}}catch(n){null!=e&&e(n)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,q,n){this.openDatabase(mxUtils.bind(this,function(p){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c],e=[e]);var z=p.transaction(n,"readwrite");z.oncomplete=g;z.onerror=q;for(p=0;p<n.length;p++)z.objectStore(n[p]).put(null!=c&&null!=c[p]?{key:c[p],data:e[p]}:e[p])}catch(C){null!=
-q&&q(C)}}),q)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,q){this.openDatabase(mxUtils.bind(this,function(n){q=q||"objects";Array.isArray(q)||(q=[q],c=[c]);n=n.transaction(q,"readwrite");n.oncomplete=e;n.onerror=g;for(var p=0;p<q.length;p++)n.objectStore(q[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,q){this.openDatabase(mxUtils.bind(this,function(n){try{q=q||"objects";var p=n.transaction([q],"readonly").objectStore(q).get(c);p.onsuccess=function(){e(p.result)};
-p.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var n=q.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];n.onsuccess=function(z){null==z.target.result?c(p):(p.push(z.target.result.value),z.target.result.continue())};n.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=
-g||"objects";var n=q.transaction([g],"readonly").objectStore(g).getAllKeys();n.onsuccess=function(){c(n.result)};n.onerror=e}catch(p){null!=e&&e(p)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():
+function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,q,n){var m=!0,z=window.setTimeout(mxUtils.bind(this,function(){m=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(z);
+m&&q.apply(this,arguments)}),u=mxUtils.bind(this,function(){window.clearTimeout(z);m&&n.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:u});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,I){var N={event:"remoteInvokeResponse",
+msgMarkers:c.msgMarkers};null!=I?N.error={errResp:I}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var q=c.funtionName,n=this.remoteInvokableFns[q];if(null!=n&&"function"===typeof this[q]){if(n.allowedDomains){for(var m=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){m=!0;break}if(!m){g(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)||(C=[]);if(n.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),
+C.push(function(y){g(null,y||"Unkown Error")}),this[q].apply(this,C);else{var u=this[q].apply(this,C);g([u])}}else g(null,"Invalid Call: "+q+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var q=g.open("database",2);q.onupgradeneeded=function(n){try{var m=q.result;1>n.oldVersion&&m.createObjectStore("objects",{keyPath:"key"});
+2>n.oldVersion&&(m.createObjectStore("files",{keyPath:"title"}),m.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};q.onsuccess=mxUtils.bind(this,function(n){var m=q.result;this.database=m;EditorUi.migrateStorageFiles&&(StorageFile.migrate(m),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||
+"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var u=!0,y=!1,I,N=0,t=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),p=mxUtils.bind(this,function(){N++;F()}),F=mxUtils.bind(this,function(){try{if(N>=
+I.length)t();else{var M=I[N];StorageFile.getFileContent(this,M,mxUtils.bind(this,function(H){null==H||".scratchpad"==M&&H==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[M]}),"*"):p()}),p)}}catch(H){console.log(H)}}),J=mxUtils.bind(this,function(M){try{this.setDatabaseItem(null,[{title:M.title,size:M.data.length,lastModified:Date.now(),type:M.isLib?"L":"F"},{title:M.title,data:M.data}],p,p,["filesInfo","files"])}catch(H){console.log(H)}});
+z=mxUtils.bind(this,function(M){try{if(M.source==C.contentWindow){var H={};try{H=JSON.parse(M.data)}catch(G){}"init"==H.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||y||(u?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],u=!1,F()):t():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?J(H.resp[0]):p())}}catch(G){console.log(G)}});
+window.addEventListener("message",z)}})));c(m);m.onversionchange=function(){m.close()}});q.onerror=e;q.onblocked=function(){}}catch(n){null!=e&&e(n)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,q,n){this.openDatabase(mxUtils.bind(this,function(m){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c],e=[e]);var z=m.transaction(n,"readwrite");z.oncomplete=g;z.onerror=q;for(m=0;m<n.length;m++)z.objectStore(n[m]).put(null!=c&&null!=c[m]?{key:c[m],data:e[m]}:e[m])}catch(C){null!=
+q&&q(C)}}),q)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,q){this.openDatabase(mxUtils.bind(this,function(n){q=q||"objects";Array.isArray(q)||(q=[q],c=[c]);n=n.transaction(q,"readwrite");n.oncomplete=e;n.onerror=g;for(var m=0;m<q.length;m++)n.objectStore(q[m]).delete(c[m])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,q){this.openDatabase(mxUtils.bind(this,function(n){try{q=q||"objects";var m=n.transaction([q],"readonly").objectStore(q).get(c);m.onsuccess=function(){e(m.result)};
+m.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var n=q.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),m=[];n.onsuccess=function(z){null==z.target.result?c(m):(m.push(z.target.result.value),z.target.result.continue())};n.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=
+g||"objects";var n=q.transaction([g],"readonly").objectStore(g).getAllKeys();n.onsuccess=function(){c(n.result)};n.onerror=e}catch(m){null!=e&&e(m)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():
!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var q=this.getCurrentFile();null!=q?q.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();
return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
-DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,q,n,p,z,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,q,n,p,z,C)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};
-EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,q,n,p,z,C,u,y,I,N,t,m,F,J){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(c,e,g,q,n,p,z,C,u,y,I,N,t,m,F,J)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,q)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,q,n,m,z,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,q,n,m,z,C)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};
+EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,q,n,m,z,C,u,y,I,N,t,p,F,J){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(c,e,g,q,n,m,z,C,u,y,I,N,t,p,F,J)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,q)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,q)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,q,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(c,e,g,q,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),q=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<q.length){var n="<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12);q="<mxlibrary>"===q.substring(0,11);(n||
q)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
@@ -12165,35 +12165,35 @@ function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&
"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){R(Y,M);Y.preventDefault();mxEvent.consume(Y)});Q.appendChild(X);S&&(X.style.display="none")}function W(){function O(X){R.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var R=[],S=V;O(M);return{pdiv:S,replies:R}}function U(O,R,S,X,aa){function Y(){c(la);M.addReply(fa,function(ia){fa.id=ia;M.replies.push(fa);g(la);S&&S()},function(ia){Z();e(la);b.handleError(ia,
null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){D(fa,la,function(ia){Y()},!0)}var ca=W().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=M.id;null==M.replies&&(M.replies=[]);var la=q(fa,M.replies,ca,E+1);R?Z():Y()}if(P||!M.isResolved){I.style.display="none";var V=document.createElement("div");V.className="geCommentContainer";V.setAttribute("data-commentId",M.id);V.style.marginLeft=20*E+5+"px";M.isResolved&&!Editor.isDarkMode()&&(V.style.backgroundColor=
"ghostWhite");var l=document.createElement("div");l.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=M.user.pictureUrl||Editor.userImage;l.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";l.appendChild(A);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,M.user.displayName||"");A.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
-M.id);K(M,L);A.appendChild(L);V.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,M.content||"");V.appendChild(l);M.isLocked&&(V.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";l.appendChild(Q);n||M.isLocked||0!=E&&!p||T(mxResources.get("reply"),function(){U("",!0)},M.isResolved);A=b.getCurrentUser();null==A||A.id!=M.user.id||n||M.isLocked||(T(mxResources.get("edit"),
+M.id);K(M,L);A.appendChild(L);V.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,M.content||"");V.appendChild(l);M.isLocked&&(V.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";l.appendChild(Q);n||M.isLocked||0!=E&&!m||T(mxResources.get("reply"),function(){U("",!0)},M.isResolved);A=b.getCurrentUser();null==A||A.id!=M.user.id||n||M.isLocked||(T(mxResources.get("edit"),
function(){function O(){D(M,V,function(){c(V);M.editComment(M.content,function(){g(V)},function(R){e(V);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},M.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){c(V);M.deleteComment(function(O){if(!0===O){O=V.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=V.querySelectorAll(".geCommentAction");for(O=
0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);g(V);V.style.opacity="0.5"}else{R=W(M).replies;for(O=0;O<R.length;O++)y.removeChild(R[O]);for(O=0;O<H.length;O++)if(H[O]==M){H.splice(O,1);break}I.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(O){e(V);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},M.isResolved));n||M.isLocked||0!=E||T(M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S=
-O.target;S.innerText="";M.isResolved=!M.isResolved;mxUtils.write(S,M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=M.isResolved?"none":"",aa=W(M).replies,Y=Editor.isDarkMode()?"transparent":M.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ca=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=S.parentNode&&(ca[fa].style.display=X);m||(aa[Z].style.display="none")}B()}M.isResolved?U(mxResources.get("reOpened")+
+O.target;S.innerText="";M.isResolved=!M.isResolved;mxUtils.write(S,M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=M.isResolved?"none":"",aa=W(M).replies,Y=Editor.isDarkMode()?"transparent":M.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ca=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=S.parentNode&&(ca[fa].style.display=X);p||(aa[Z].style.display="none")}B()}M.isResolved?U(mxResources.get("reOpened")+
": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});V.appendChild(l);null!=G?y.insertBefore(V,G.nextSibling):y.appendChild(V);for(G=0;null!=M.replies&&G<M.replies.length;G++)l=M.replies[G],l.isResolved=M.isResolved,q(l,M.replies,null,E+1,P);null!=z&&(z.comment.id==M.id?(P=M.content,M.content=z.comment.content,D(M,V,z.saveCallback,z.deleteOnCancel),M.content=P):null==z.comment.id&&z.comment.pCommentId==M.id&&(y.appendChild(z.div),D(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return V}}
-var n=!b.canComment(),p=b.canReplyToReplies(),z=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var u=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(u)+7+"px";C.appendChild(y);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
+var n=!b.canComment(),m=b.canReplyToReplies(),z=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var u=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(u)+7+"px";C.appendChild(y);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(I,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=u;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";u=document.createElement("a");u.className="geButton";if(!n){var t=u.cloneNode();t.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';t.setAttribute("title",mxResources.get("create")+
"...");mxEvent.addListener(t,"click",function(M){function H(){D(G,E,function(P){c(E);b.addComment(P,function(T){P.id=T;F.push(P);g(E)},function(T){e(E);H();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),E=q(G,F,null,0);H();M.preventDefault();mxEvent.consume(M)});N.appendChild(t)}t=u.cloneNode();t.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';t.setAttribute("title",mxResources.get("showResolved"));
-t.className="geAdaptiveAsset";var m=!1;mxEvent.addListener(t,"click",function(M){this.className=(m=!m)?"geButton geCheckedBtn":"geButton";J();M.preventDefault();mxEvent.consume(M)});N.appendChild(t);b.commentsRefreshNeeded()&&(t=u.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',t.setAttribute("title",mxResources.get("refresh")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(M){J();M.preventDefault();mxEvent.consume(M)}),N.appendChild(t));
+t.className="geAdaptiveAsset";var p=!1;mxEvent.addListener(t,"click",function(M){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";J();M.preventDefault();mxEvent.consume(M)});N.appendChild(t);b.commentsRefreshNeeded()&&(t=u.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',t.setAttribute("title",mxResources.get("refresh")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(M){J();M.preventDefault();mxEvent.consume(M)}),N.appendChild(t));
b.commentsSaveNeeded()&&(u=u.cloneNode(),u.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',u.setAttribute("title",mxResources.get("save")),u.className="geAdaptiveAsset",mxEvent.addListener(u,"click",function(M){x();M.preventDefault();mxEvent.consume(M)}),N.appendChild(u));C.appendChild(N);var F=[],J=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var M=z.div.querySelector(".geCommentEditTxtArea"),H=z.div.querySelector(".geCommentEditBtns");
-z.comment.content=M.value;M.parentNode.removeChild(M);H.parentNode.removeChild(H)}catch(G){b.handleError(G)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function E(P){if(null!=P){P.sort(function(W,U){return new Date(W.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<P.length;T++)E(P[T].replies)}}
-G.sort(function(P,T){return new Date(P.modifiedDate)-new Date(T.modifiedDate)});y.innerText="";y.appendChild(I);I.style.display="block";F=G;for(G=0;G<F.length;G++)E(F[G].replies),q(F[G],F,null,0,m);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(y.appendChild(z.div),D(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(G){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+z.comment.content=M.value;M.parentNode.removeChild(M);H.parentNode.removeChild(H)}catch(G){b.handleError(G)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function E(P){if(null!=P){P.sort(function(W,U){return new Date(W.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<P.length;T++)E(P[T].replies)}}
+G.sort(function(P,T){return new Date(P.modifiedDate)-new Date(T.modifiedDate)});y.innerText="";y.appendChild(I);I.style.display="block";F=G;for(G=0;G<F.length;G++)E(F[G].replies),q(F[G],F,null,0,p);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(y.appendChild(z.div),D(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(G){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
J();this.refreshComments=J;N=mxUtils.bind(this,function(){function M(T){var W=G[T.id];if(null!=W)for(K(T,W),W=0;null!=T.replies&&W<T.replies.length;W++)M(T.replies[W])}if(this.window.isVisible()){for(var H=y.querySelectorAll(".geCommentDate"),G={},E=0;E<H.length;E++){var P=H[E];G[P.getAttribute("data-commentId")]=P}for(E=0;E<F.length;E++)M(F[E])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),C,f,k,d,v,!0,!0);this.window.minimumSize=new mxRectangle(0,
0,300,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,k,d,v,x,B,D,K,c,e){var g=document.createElement("div");g.style.textAlign="center";e=null!=e?e:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=e+
"px";q.style.lineHeight="1.2em";mxUtils.write(q,f);g.appendChild(q);null!=c&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",c),q.appendChild(f),g.appendChild(q));c=document.createElement("div");c.style.textAlign="center";c.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(n.checked)});x.className="geBtn";
-null!=D&&(x.innerHTML=D+"<br>"+x.innerHTML,x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&c.appendChild(x);var p=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(n.checked)});c.appendChild(p);null!=B?(p.innerHTML=B+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-c.appendChild(x);g.appendChild(c);K?(c.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(n),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),q.appendChild(v),g.appendChild(q),mxEvent.addListener(v,"click",function(z){n.checked=!n.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){p.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+null!=D&&(x.innerHTML=D+"<br>"+x.innerHTML,x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&c.appendChild(x);var m=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(n.checked)});c.appendChild(m);null!=B?(m.innerHTML=B+"<br>"+m.innerHTML+"<br>",m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.className="geBtn",m.style.width="40%"):m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+c.appendChild(x);g.appendChild(c);K?(c.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(n),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),q.appendChild(v),g.appendChild(q),mxEvent.addListener(v,"click",function(z){n.checked=!n.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){m.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,d,v){if(null!=f)for(var x=0;x<f.length;x++)null!=f[x]&&(b=this.patchPages(b,f[x],k,d,v));return b};
EditorUi.prototype.patchPages=function(b,f,k,d,v){var x={},B=[],D={},K={},c={},e={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var g in d[EditorUi.DIFF_UPDATE])x[g]=d[EditorUi.DIFF_UPDATE][g];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)K[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)D[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(g in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][g],null!=d.previous&&(e[d.previous]=g);if(null!=b){var q="";for(d=0;d<b.length;d++){var n=b[d].getId();c[n]=b[d];null!=e[q]||K[n]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][n]&&null!=f[EditorUi.DIFF_UPDATE][n].previous||(e[q]=n);q=n}}var p={},z=mxUtils.bind(this,function(u){var y=null!=u?u.getId():"";if(null!=u&&!p[y]){p[y]=!0;B.push(u);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=I&&(this.updatePageRoot(u),null!=I.name&&u.setName(I.name),
+f[EditorUi.DIFF_UPDATE][g],null!=d.previous&&(e[d.previous]=g);if(null!=b){var q="";for(d=0;d<b.length;d++){var n=b[d].getId();c[n]=b[d];null!=e[q]||K[n]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][n]&&null!=f[EditorUi.DIFF_UPDATE][n].previous||(e[q]=n);q=n}}var m={},z=mxUtils.bind(this,function(u){var y=null!=u?u.getId():"";if(null!=u&&!m[y]){m[y]=!0;B.push(u);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=I&&(this.updatePageRoot(u),null!=I.name&&u.setName(I.name),
null!=I.view&&this.patchViewState(u,I.view),null!=I.cells&&this.patchPage(u,I.cells,x[u.getId()],v),!k||null==I.cells&&null==I.view||(u.needsUpdate=!0))}u=e[y];null!=u&&(delete e[y],z(c[u]));u=D[y];null!=u&&(delete D[y],C(u))}),C=mxUtils.bind(this,function(u){u=mxUtils.parseXml(u.data).documentElement;u=new DiagramPage(u);this.updatePageRoot(u);var y=c[u.getId()];null==y?z(u):(this.patchPage(y,this.diffPages([y],[u]),x[y.getId()],v),k&&(y.needsUpdate=!0))});z();for(g in e)z(c[e[g]]),delete e[g];for(g in D)C(D[g]),
delete D[g];return B};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
EditorUi.prototype.createParentLookup=function(b,f){function k(c){var e=d[c];null==e&&(e={inserted:[],moved:{}},d[c]=e);return e}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var v=0;v<f[EditorUi.DIFF_INSERT].length;v++){var x=f[EditorUi.DIFF_INSERT][v],B=null!=x.parent?x.parent:"",D=null!=x.previous?x.previous:"";k(B).inserted[D]=x}if(null!=f[EditorUi.DIFF_UPDATE])for(var K in f[EditorUi.DIFF_UPDATE])x=f[EditorUi.DIFF_UPDATE][K],null!=x.previous&&(B=x.parent,null==B&&(v=b.getCell(K),null!=v&&(v=
b.getParent(v),null!=v&&(B=v.getId()))),null!=B&&(k(B).moved[x.previous]=K));return d};
EditorUi.prototype.patchPage=function(b,f,k,d){var v=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(v,f);v.beginUpdate();try{var B=v.updateEdgeParent,D=new mxDictionary,K=[];v.updateEdgeParent=function(C,u){!D.get(C)&&d&&(D.put(C,!0),K.push(C))};var c=x[""],e=null!=c&&null!=c.inserted?c.inserted[""]:null,g=null;null!=e&&(g=this.getCellForJson(e));if(null==g){var q=null!=c&&null!=c.moved?c.moved[""]:null;null!=q&&(g=v.getCell(q))}null!=g&&(v.setRoot(g),
-b.root=g);this.patchCellRecursive(b,v,v.root,x,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var n=0;n<f[EditorUi.DIFF_REMOVE].length;n++){var p=v.getCell(f[EditorUi.DIFF_REMOVE][n]);null!=p&&v.remove(p)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(q in f[EditorUi.DIFF_UPDATE])this.patchCell(v,v.getCell(q),f[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(n=0;n<f[EditorUi.DIFF_INSERT].length;n++)e=f[EditorUi.DIFF_INSERT][n],
-p=v.getCell(e.id),null!=p&&(v.setTerminal(p,v.getCell(e.source),!0),v.setTerminal(p,v.getCell(e.target),!1));v.updateEdgeParent=B;if(d&&0<K.length)for(n=0;n<K.length;n++)v.contains(K[n])&&v.updateEdgeParent(K[n])}finally{v.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,k,d,v){if(null!=k){var x=d[k.getId()],B=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var D=0,K=f.getChildCount(k),c="",e=0;e<K;e++){var g=f.getChildAt(k,e).getId();null==x[c]&&(null==v[EditorUi.DIFF_UPDATE]||null==v[EditorUi.DIFF_UPDATE][g]||null==v[EditorUi.DIFF_UPDATE][g].previous&&null==v[EditorUi.DIFF_UPDATE][g].parent)&&(x[c]=g);c=g}K=mxUtils.bind(this,function(q,n){var p=null!=q?q.getId():"";null!=q&&n&&(n=
-f.getCell(p),null!=n&&n!=q&&(q=null));null!=q&&(f.getChildAt(k,D)!=q&&f.add(k,q,D),this.patchCellRecursive(b,f,q,d,v),D++);return p});for(c=[null];0<c.length;)if(e=c.shift(),e=K(null!=e?e.child:null,null!=e?e.insert:!1),g=x[e],null!=g&&(delete x[e],c.push({child:f.getCell(g)})),g=B[e],null!=g&&(delete B[e],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(e in x)c.push({child:f.getCell(x[e])}),delete x[e];for(e in B)c.push({child:this.getCellForJson(B[e]),insert:!0}),delete B[e]}}};
+b.root=g);this.patchCellRecursive(b,v,v.root,x,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var n=0;n<f[EditorUi.DIFF_REMOVE].length;n++){var m=v.getCell(f[EditorUi.DIFF_REMOVE][n]);null!=m&&v.remove(m)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(q in f[EditorUi.DIFF_UPDATE])this.patchCell(v,v.getCell(q),f[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(n=0;n<f[EditorUi.DIFF_INSERT].length;n++)e=f[EditorUi.DIFF_INSERT][n],
+m=v.getCell(e.id),null!=m&&(v.setTerminal(m,v.getCell(e.source),!0),v.setTerminal(m,v.getCell(e.target),!1));v.updateEdgeParent=B;if(d&&0<K.length)for(n=0;n<K.length;n++)v.contains(K[n])&&v.updateEdgeParent(K[n])}finally{v.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,k,d,v){if(null!=k){var x=d[k.getId()],B=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var D=0,K=f.getChildCount(k),c="",e=0;e<K;e++){var g=f.getChildAt(k,e).getId();null==x[c]&&(null==v[EditorUi.DIFF_UPDATE]||null==v[EditorUi.DIFF_UPDATE][g]||null==v[EditorUi.DIFF_UPDATE][g].previous&&null==v[EditorUi.DIFF_UPDATE][g].parent)&&(x[c]=g);c=g}K=mxUtils.bind(this,function(q,n){var m=null!=q?q.getId():"";null!=q&&n&&(n=
+f.getCell(m),null!=n&&n!=q&&(q=null));null!=q&&(f.getChildAt(k,D)!=q&&f.add(k,q,D),this.patchCellRecursive(b,f,q,d,v),D++);return m});for(c=[null];0<c.length;)if(e=c.shift(),e=K(null!=e?e.child:null,null!=e?e.insert:!1),g=x[e],null!=g&&(delete x[e],c.push({child:f.getCell(g)})),g=B[e],null!=g&&(delete B[e],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(e in x)c.push({child:f.getCell(x[e])}),delete x[e];for(e in B)c.push({child:this.getCellForJson(B[e]),insert:!0}),delete B[e]}}};
EditorUi.prototype.patchCell=function(b,f,k,d){if(null!=f&&null!=k){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=d&&null!=d.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=
1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var v in k)this.cellProperties[v]||(f[v]=k[v])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var v=b[k].node.cloneNode(!1);v.appendChild(d);f.appendChild(v)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
@@ -12264,16 +12264,16 @@ v,"applied",x)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){re
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(k){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,k)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
DrawioFileSync.prototype.merge=function(b,f,k,d,v,x){try{this.file.stats.merged++;this.lastModified=new Date;var B=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var D=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(D,this.ui.pages):null;var K=this.file.isRealtime()?this.ui.diffPages(D,this.file.ownPages):null;D=this.ui.applyPatches(D,b);var c=null==f?null:this.ui.getHashValueForPages(D);
-this.file.setShadowPages(D);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",K,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",B,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var e=this.ui.hashValue(B),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(v,b,"From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nCurrent: "+c,B,"merge");
-"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(D)]);return}null==this.patchRealtime(b,null,K)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=v&&v(p);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(B),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var q=this.file.getCurrentUser(),n=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),n,p)}}catch(z){}}};
+this.file.setShadowPages(D);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",K,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",B,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var e=this.ui.hashValue(B),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(v,b,"From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nCurrent: "+c,B,"merge",
+f,c,B);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(D)]);return}null==this.patchRealtime(b,null,K)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(m){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=v&&v(m);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(B),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),m);else{var q=this.file.getCurrentUser(),n=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),n,m)}}catch(z){}}};
DrawioFileSync.prototype.fileChanged=function(b,f,k,d){var v=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=k&&k()||(this.isValidState()?this.catchup(x,b,f,k):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=v};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,f,k,d){if(null!=b&&(null==d||!d())){var v=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",v,"to",x,"valid",this.isValidState());if(v==x)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var B=this.file.getDescriptorSecret(b);if(null==B||"1"==urlParams.lockdown)this.reload(f,k,d);else{var D=0,K=!1,c=mxUtils.bind(this,function(){if(null==
d||!d())if(v!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;this.reload(f,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(v)+"&to="+encodeURIComponent(x)+(null!=B?"&secret="+encodeURIComponent(B):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(g);if(e&&
-(null==d||!d()))if(v!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var n=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",D,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var C=0;C<z.length;C++){var u=this.stringToObject(z[C]);if(u.v>DrawioFileSync.PROTOCOL){K=!0;p=[];break}else if(u.v===
-DrawioFileSync.PROTOCOL&&null!=u.d)n=u.d.checksum,p.push(u.d.patch);else{K=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",K,"temp",p,"checksum",n)}catch(y){p=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,n,b,f,k,d)):D<=this.maxCacheReadyRetries-1&&!K&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(D++,this.file.stats.cacheMiss++,window.setTimeout(c,(D+1)*this.cacheReadyDelay)):
+(null==d||!d()))if(v!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var n=null,m=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",D,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var C=0;C<z.length;C++){var u=this.stringToObject(z[C]);if(u.v>DrawioFileSync.PROTOCOL){K=!0;m=[];break}else if(u.v===
+DrawioFileSync.PROTOCOL&&null!=u.d)n=u.d.checksum,m.push(u.d.patch);else{K=!0;m=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",K,"temp",m,"checksum",n)}catch(y){m=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<m.length?(this.file.stats.cacheHits++,this.merge(m,n,b,f,k,d)):D<=this.maxCacheReadyRetries-1&&!K&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(D++,this.file.stats.cacheMiss++,window.setTimeout(c,(D+1)*this.cacheReadyDelay)):
(this.file.stats.cacheFail++,this.reload(f,k,d))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(c,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(v){null!=f&&f(v)}),k,d)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
@@ -12282,7 +12282,7 @@ DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){
DrawioFileSync.prototype.fileSaved=function(b,f,k,d,v){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),B=this.file.getDescriptorSecret(this.file.getDescriptor()),D=this.file.getDescriptorRevisionId(f),K=this.file.getCurrentRevisionId();if(null==
B||null==v||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(x),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",D,"to",K,"etag",this.file.getCurrentEtag());else{var c=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var e=this.ui.getHashValueForPages(b),g=this.objectToString(this.createMessage({patch:c,checksum:e}));this.file.stats.bytesSent+=g.length;
this.file.stats.msgSent++;var q=!0,n=window.setTimeout(mxUtils.bind(this,function(){q=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(D)+"&to="+encodeURIComponent(K)+"&msg="+encodeURIComponent(x)+(null!=B?"&secret="+encodeURIComponent(B):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):"")+(null!=v?"&token="+encodeURIComponent(v):
-""),mxUtils.bind(this,function(p){window.clearTimeout(n);q&&(200<=p.getStatus()&&299>=p.getStatus()?null!=k&&k():d({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",D,"to",K,"etag",this.file.getCurrentEtag(),"checksum",e)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+""),mxUtils.bind(this,function(m){window.clearTimeout(n);q&&(200<=m.getStatus()&&299>=m.getStatus()?null!=k&&k():d({code:m.getStatus(),message:m.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",D,"to",K,"etag",this.file.getCurrentEtag(),"checksum",e)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
@@ -12309,12 +12309,12 @@ App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().
App.main=function(b,f){function k(e){mxUtils.getAll("1"!=urlParams.dev?[e]:[e,STYLE_PATH+"/default.xml"],function(g){function q(){var I=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(I);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[I,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=function(I){if(null!=I)for(var N=0;N<I.length;N++)if(!p[I[N]])throw Error(mxResources.get("invalidInput")+
-' "'+I[N])+'"';return!0},p={},z;for(z in App.pluginRegistry)p[App.pluginRegistry[z]]=!0;var C=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=C&&n(C.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(C));if(null!=C.merge){var u=localStorage.getItem(Editor.configurationKey);if(null!=u)try{var y=JSON.parse(u);for(z in C.merge)y[z]=C.merge[z];C=y}catch(I){window.location.hash="",alert(I)}else C=C.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(I);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[I,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=function(I){if(null!=I)for(var N=0;N<I.length;N++)if(!m[I[N]])throw Error(mxResources.get("invalidInput")+
+' "'+I[N])+'"';return!0},m={},z;for(z in App.pluginRegistry)m[App.pluginRegistry[z]]=!0;var C=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=C&&n(C.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(C));if(null!=C.merge){var u=localStorage.getItem(Editor.configurationKey);if(null!=u)try{var y=JSON.parse(u);for(z in C.merge)y[z]=C.merge[z];C=y}catch(I){window.location.hash="",alert(I)}else C=C.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
(localStorage.setItem(Editor.configurationKey,JSON.stringify(C)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(I){window.location.hash="",alert(I)}1<g.length&&(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
q))},function(g){g=document.getElementById("geStatus");null!=g&&(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:
"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var e=parseInt(mxSettings.settings.autosaveDelay);!isNaN(e)&&0<e?(DrawioFile.prototype.autosaveDelay=e,EditorUi.debug("Setting autosaveDelay",e)):EditorUi.debug("Invalid autosaveDelay",e)}null!=mxSettings.settings.defaultEdgeLength&&(e=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(e)&&0<e?(Graph.prototype.defaultEdgeLength=e,EditorUi.debug("Using defaultEdgeLength",e)):EditorUi.debug("Invalid defaultEdgeLength",e))}}catch(q){null!=window.console&&
-console.error(q)}if(null!=Menus.prototype.defaultFonts)for(e=0;e<Menus.prototype.defaultFonts.length;e++){var g=Menus.prototype.defaultFonts[e];"string"!==typeof g&&null!=g.fontFamily&&null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(e,g,q,n,p){EditorUi.logError("Global: "+(null!=e?e:""),g,q,n,p,null,!0)};if(window.top!=window.self||
+console.error(q)}if(null!=Menus.prototype.defaultFonts)for(e=0;e<Menus.prototype.defaultFonts.length;e++){var g=Menus.prototype.defaultFonts[e];"string"!==typeof g&&null!=g.fontFamily&&null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(e,g,q,n,m){EditorUi.logError("Global: "+(null!=e?e:""),g,q,n,m,null,!0)};if(window.top!=window.self||
"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&
null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var x=mxUtils.getTextContent(v[0]);"1f536e2400baaa30261b8c3976d6fe06"!=CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=v&&1<v.length&&(x=mxUtils.getTextContent(v[v.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(x).toString()&&
(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(e){null!=window.console&&console.error(e)}!("ArrayBuffer"in
@@ -12368,9 +12368,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
App.prototype.getThumbnail=function(b,f){var k=!1;try{var d=!0,v=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),x=mxUtils.bind(this,function(J){window.clearTimeout(v);d&&f(J)});null==this.thumbImageCache&&(this.thumbImageCache={});var B=this.editor.graph,D=B.backgroundImage,K=null!=B.themes&&"darkTheme"==B.defaultThemeName;if(null!=this.pages&&(K||this.currentPage!=this.pages[0])){var c=B.getGlobalVariable;B=this.createTemporaryGraph(B.getStylesheet());B.setBackgroundImage=
this.editor.graph.setBackgroundImage;var e=this.pages[0];this.currentPage==e?B.setBackgroundImage(D):null!=e.viewState&&null!=e.viewState&&(D=e.viewState.backgroundImage,B.setBackgroundImage(D));B.getGlobalVariable=function(J){return"page"==J?e.getName():"pagenumber"==J?1:c.apply(this,arguments)};B.getGlobalVariable=c;document.body.appendChild(B.container);B.model.setRoot(e.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{B!=this.editor.graph&&
-null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(M){J=null}x(J)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,B,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),q=B.getGraphBounds(),n=B.view.translate,p=B.view.scale;null!=D&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((n.x+D.x)*p,(n.y+D.y)*p,D.width*p,D.height*p)));var z=b/q.width;
+null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(M){J=null}x(J)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,B,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),q=B.getGraphBounds(),n=B.view.translate,m=B.view.scale;null!=D&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((n.x+D.x)*m,(n.y+D.y)*m,D.width*m,D.height*m)));var z=b/q.width;
z=Math.min(1,Math.min(3*b/(4*q.height),z));var C=Math.floor(q.x),u=Math.floor(q.y);g.setAttribute("width",Math.ceil(z*(q.width+4)));g.setAttribute("height",Math.ceil(z*(q.height+4)));var y=g.getContext("2d");y.scale(z,z);y.translate(-C,-u);var I=B.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";y.save();y.fillStyle=I;y.fillRect(C,u,Math.ceil(q.width+4),Math.ceil(q.height+4));y.restore();if(null!=D){var N=new Image;N.src=D.src;y.drawImage(N,D.x*z,D.y*z,D.width*z,D.height*z)}var t=new mxJsCanvas(g),
-m=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(J,M){J.shape instanceof mxShape&&J.shape.checkBounds()&&(M.save(),M.translate(.5,.5),J.shape.paint(M),M.translate(-.5,-.5),M.restore())};F.drawText=function(J,M){};F.drawState(B.getView().getState(B.model.root),m);m.finish(mxUtils.bind(this,function(){try{F.drawState(B.getView().getState(B.model.root),t),B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(J){g=
+p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(J,M){J.shape instanceof mxShape&&J.shape.checkBounds()&&(M.save(),M.translate(.5,.5),J.shape.paint(M),M.translate(-.5,-.5),M.restore())};F.drawText=function(J,M){};F.drawState(B.getView().getState(B.model.root),p);p.finish(mxUtils.bind(this,function(){try{F.drawState(B.getView().getState(B.model.root),t),B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(J){g=
null}x(g)}));k=!0}}catch(J){k=!1,null!=B&&B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}k||window.clearTimeout(v);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var v=new Date;v.setYear(v.getFullYear()+1);document.cookie="MODE="+f+"; expires="+v.toUTCString()}}catch(x){}}})();
@@ -12444,24 +12444,24 @@ this.drive.insertFile(b,f,B,mxUtils.bind(this,function(g){c();this.fileCreated(g
function(g,q){var n=new LocalFile(this,f,q.name,null,g,q);n.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(n,k,x,v,K)}),e,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&e(g)}),this.createFileSystemOptions(b))):(c(),this.fileCreated(new LocalFile(this,f,b,null==d),k,x,v,K))}catch(g){c(),this.handleError(g)}}};
App.prototype.fileCreated=function(b,f,k,d,v){var x=window.location.pathname;null!=f&&0<f.length&&(x+="?libs="+f);null!=v&&0<v.length&&(x+="?clibs="+v);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var B=b.getData();B=0<B.length?this.editor.extractGraphModel(mxUtils.parseXml(B).documentElement,!0):null;var D=window.location.protocol+"//"+window.location.hostname+x,K=B,c=null;null!=B&&/\.svg$/i.test(b.getTitle())&&
(c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),K=this.decodeNodeIntoGraph(K,c));b.setData(this.createFileData(B,c,b,D));null!=c&&c.container.parentNode.removeChild(c.container);var e=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){e();var q=this.getCurrentFile();null==k&&null!=q&&(k=!q.isModified()&&null==q.getMode());var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=v){for(var z=[],C=v.split(";"),u=0;u<C.length;u++)z.push(decodeURIComponent(C[u]));this.loadLibraries(z)}}),p=mxUtils.bind(this,function(){k||null==q||!q.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=d&&d(),window.openWindow(x,null,p))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(q){e();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
-App.prototype.loadFile=function(b,f,k,d,v){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var x=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var K=mxUtils.bind(this,function(n){this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
-window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(n){null!=n?(this.fileLoaded(new StorageFile(this,n,b)),null!=d&&d()):K({message:mxResources.get("fileNotFound")})}),K)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}));else if(null!=k)this.spinner.stop(),
+null!=f&&this.sidebar.showEntries(f);if(null!=v){for(var z=[],C=v.split(";"),u=0;u<C.length;u++)z.push(decodeURIComponent(C[u]));this.loadLibraries(z)}}),m=mxUtils.bind(this,function(){k||null==q||!q.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?m():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=d&&d(),window.openWindow(x,null,m))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(q){e();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
+App.prototype.loadFile=function(b,f,k,d,v){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var x=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var K=mxUtils.bind(this,function(n){this.handleError(n,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(n){null!=n?(this.fileLoaded(new StorageFile(this,n,b)),null!=d&&d()):K({message:mxResources.get("fileNotFound")})}),K)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}));else if(null!=k)this.spinner.stop(),
this.fileLoaded(k),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 c=decodeURIComponent(b.substring(1));"<"!=c.charAt(0)&&(c=Graph.decompress(c));c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(n,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,n,p));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var e=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var n=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+p,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
-!this.editor.editable&&(z.getHash=function(){return"G"+p},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!n()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",n);return!0});this.loadTemplate(e,mxUtils.bind(this,function(n){this.spinner.stop();if(null!=n&&0<n.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=e,C=e.lastIndexOf("."),u=z.lastIndexOf("/");C>u&&0<u&&(z=z.substring(u+1,C),C=e.substring(C),
-this.useCanvasForExport||".png"!=C||(C=".drawio"),".svg"===C||".xml"===C||".html"===C||".png"===C||".drawio"===C)&&(p=z+C)}n=new LocalFile(this,n,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);n.getHash=function(){return b};this.fileLoaded(n,!0)?null!=d&&d():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(n,m){this.spinner.stop();this.fileLoaded(new EmbedFile(this,n,m));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var e=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var n=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var m=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+m,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
+!this.editor.editable&&(z.getHash=function(){return"G"+m},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!n()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",n);return!0});this.loadTemplate(e,mxUtils.bind(this,function(n){this.spinner.stop();if(null!=n&&0<n.length){var m=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=e,C=e.lastIndexOf("."),u=z.lastIndexOf("/");C>u&&0<u&&(z=z.substring(u+1,C),C=e.substring(C),
+this.useCanvasForExport||".png"!=C||(C=".drawio"),".svg"===C||".xml"===C||".html"===C||".png"===C||".drawio"===C)&&(m=z+C)}n=new LocalFile(this,n,null!=urlParams.title?decodeURIComponent(urlParams.title):m,!0);n.getHash=function(){return b};this.fileLoaded(n,!0)?null!=d&&d():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){g()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(c=null,"G"==b.charAt(0)?c=this.drive:"D"==b.charAt(0)?c=this.dropbox:"W"==b.charAt(0)?c=this.oneDrive:"H"==b.charAt(0)?c=this.gitHub:"A"==b.charAt(0)?c=this.gitLab:"T"==b.charAt(0)&&(c=this.trello),null==c)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(n){this.spinner.stop();this.fileLoaded(n);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return q+b},window.location.hash="#"+p.getHash()):n==p&&null==n.getMode()&&
-(n=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+n+'" class="geStatusAlert">'+n+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(n){null!=window.console&&null!=n&&console.log("error in loadFile:",b,n);var p=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==n||"AbortError"!=n.name?this.handleError(n,null!=n?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+q+b):p()}))}}),
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(n){this.spinner.stop();this.fileLoaded(n);var m=this.getCurrentFile();null==m?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(m.getHash=function(){return q+b},window.location.hash="#"+m.getHash()):n==m&&null==n.getMode()&&
+(n=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+n+'" class="geStatusAlert">'+n+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(n){null!=window.console&&null!=n&&console.log("error in loadFile:",b,n);var m=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==n||"AbortError"!=n.name?this.handleError(n,null!=n?mxResources.get("errorLoadingFile"):null,m,null,null,"#"+q+b):m()}))}}),
B=this.getCurrentFile(),D=mxUtils.bind(this,function(){v||null==B||!B.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=B&&(window.location.hash=B.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?D():null==B||f?D():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,D)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var d=0;d<k.length;d++)""!=k[d]&&0>mxUtils.indexOf(f,k[d])&&f.push(k[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(c,e){e||mxSettings.removeCustomLibrary(c);delete this.loadedLibraries[c]}),d=0,v=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,B=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var c=b.length-1;0<=c;c--)null!=v[c]&&this.loadLibrary(v[c],c<=x);null!=f&&f()}});if(null!=b)for(var D=0;D<b.length;D++){var K=encodeURIComponent(decodeURIComponent(b[D]));
mxUtils.bind(this,function(c,e){if(null!=c&&0<c.length&&null==this.loadedLibraries[c]&&null==this.sidebar.palettes[c]){this.loadedLibraries[c]=!0;d++;var g=mxUtils.bind(this,function(u){v[e]=u;d--;B()}),q=mxUtils.bind(this,function(u){k(c,u);d--;B()}),n=c.substring(0,1);if("L"==n)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var u=decodeURIComponent(c.substring(1));StorageFile.getFileContent(this,u,mxUtils.bind(this,function(y){".scratchpad"==u&&null==
-y&&(y=this.emptyLibraryXml);null!=y?g(new StorageLibrary(this,y,u)):q()}),q)}catch(y){q()}}),0);else if("U"==n){var p=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(u){null!=u&&0<u.length?g(new UrlLibrary(this,u,p)):q()}),function(){q()},null,!0)}else if("R"==n){n=decodeURIComponent(c.substring(1));try{n=JSON.parse(n);var z={id:n[0],title:n[1],downloadUrl:n[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(u){try{g(new RemoteLibrary(this,
+y&&(y=this.emptyLibraryXml);null!=y?g(new StorageLibrary(this,y,u)):q()}),q)}catch(y){q()}}),0);else if("U"==n){var m=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(u){null!=u&&0<u.length?g(new UrlLibrary(this,u,m)):q()}),function(){q()},null,!0)}else if("R"==n){n=decodeURIComponent(c.substring(1));try{n=JSON.parse(n);var z={id:n[0],title:n[1],downloadUrl:n[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(u){try{g(new RemoteLibrary(this,
u,z))}catch(y){q()}}),function(){q()})}catch(u){q()}}else if("S"==n&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(c.substring(1)),function(u){g(u)},q)}catch(u){q()}else{var C=null;"G"==n?null!=this.drive&&null!=this.drive.user&&(C=this.drive):"H"==n?null!=this.gitHub&&null!=this.gitHub.getUser()&&(C=this.gitHub):"T"==n?null!=this.trello&&this.trello.isAuthorized()&&(C=this.trello):"D"==n?null!=this.dropbox&&null!=this.dropbox.getUser()&&(C=this.dropbox):"W"==n&&null!=this.oneDrive&&
null!=this.oneDrive.getUser()&&(C=this.oneDrive);null!=C?C.getLibrary(decodeURIComponent(c.substring(1)),mxUtils.bind(this,function(u){try{g(u)}catch(y){q()}}),function(u){q()}):q(!0)}}})(K,D)}B()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
@@ -12492,9 +12492,9 @@ App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=
window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,f,k,d){var v=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(x){try{null!=k&&k(x,mxUtils.bind(this,function(){this.hideDialog();v()}))}catch(B){this.editor.setStatus(mxUtils.htmlEntities(B.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,f,k,d,v,x,B,D){var K=f;/\.svg$/i.test(K)||(K=K.substring(0,f.lastIndexOf("."))+d);var c=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(c=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",b,!0);c||(e.responseType="blob");if(D)for(var g in D)e.setRequestHeader(g,D[g]);e.onload=mxUtils.bind(this,function(){if(200<=
-e.status&&299>=e.status){var n=null;c?(n=JSON.parse(e.responseText),n=this.base64ToBlob(n.content,"application/octet-stream")):n=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(n,mxUtils.bind(this,function(p){v(new LocalFile(this,p,K,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});e.onerror=x;e.send()}else{var q=mxUtils.bind(this,function(n){try{if(/\.pdf$/i.test(f)){var p=Editor.extractGraphModelFromPdf(n);null!=p&&0<p.length&&v(new LocalFile(this,
-p,K,!0))}else/\.png$/i.test(f)?(p=this.extractGraphModelFromPng(n),null!=p?v(new LocalFile(this,p,K,!0)):v(new LocalFile(this,n,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(n,b)?this.parseFileData(n,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?v(new LocalFile(this,z.responseText,K,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),f):v(new LocalFile(this,n,K,!0))}catch(z){null!=x&&x(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(n){if(200<=n.getStatus()&&299>=n.getStatus()){if(null!=v){n=JSON.parse(n.getText());var p=n.content;"base64"===n.encoding&&(p=/\.png$/i.test(f)?"data:image/png;base64,"+p:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));q(p)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+e.status&&299>=e.status){var n=null;c?(n=JSON.parse(e.responseText),n=this.base64ToBlob(n.content,"application/octet-stream")):n=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(n,mxUtils.bind(this,function(m){v(new LocalFile(this,m,K,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});e.onerror=x;e.send()}else{var q=mxUtils.bind(this,function(n){try{if(/\.pdf$/i.test(f)){var m=Editor.extractGraphModelFromPdf(n);null!=m&&0<m.length&&v(new LocalFile(this,
+m,K,!0))}else/\.png$/i.test(f)?(m=this.extractGraphModelFromPng(n),null!=m?v(new LocalFile(this,m,K,!0)):v(new LocalFile(this,n,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(n,b)?this.parseFileData(n,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?v(new LocalFile(this,z.responseText,K,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),f):v(new LocalFile(this,n,K,!0))}catch(z){null!=x&&x(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(n){if(200<=n.getStatus()&&299>=n.getStatus()){if(null!=v){n=JSON.parse(n.getText());var m=n.content;"base64"===n.encoding&&(m=/\.png$/i.test(f)?"data:image/png;base64,"+m:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+m:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m));q(m)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=x&&x({code:App.ERROR_TIMEOUT,retry:fn})},D):null!=B?B(b,q,x,k):this.editor.loadUrl(b,q,x,k,null,null,null,D)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(d){this.appIconClicked(d)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
@@ -12525,11 +12525,11 @@ else{var d=!1;this.userPanel.innerText="";k=document.createElement("img");k.setA
function(K,c){var e=this.getCurrentFile();null!=e&&e.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();K()}),2E3)):K()});k=mxUtils.bind(this,function(K){var c=document.createElement("tr");c.setAttribute("title","User ID: "+K.id);var e=document.createElement("td");e.setAttribute("valig","middle");e.style.height="59px";e.style.width="66px";var g=document.createElement("img");g.setAttribute("width","50");
g.setAttribute("height","50");g.setAttribute("border","0");g.setAttribute("src",null!=K.pictureUrl?K.pictureUrl:this.defaultUserPicture);g.style.borderRadius="50%";g.style.margin="4px 8px 0 8px";e.appendChild(g);c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.paddingTop="4px";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,K.displayName+(K.isCurrent&&1<v.length?" ("+mxResources.get("default")+
")":""));null!=K.email&&(mxUtils.br(e),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,K.email),e.appendChild(g));g=document.createElement("div");g.style.marginTop="4px";var q=document.createElement("i");mxUtils.write(q,mxResources.get("googleDrive"));g.appendChild(q);e.appendChild(g);c.appendChild(e);K.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,"click",mxUtils.bind(this,function(n){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(K);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(n)})));return c});d=!0;var B=document.createElement("table");B.style.borderSpacing="0";B.style.fontSize="10pt";B.style.width="100%";B.style.padding="10px";for(var D=0;D<v.length;D++)B.appendChild(k(v[D]));this.userPanel.appendChild(B);k=document.createElement("div");k.style.textAlign=
+this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(m){this.handleError(m)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(n)})));return c});d=!0;var B=document.createElement("table");B.style.borderSpacing="0";B.style.fontSize="10pt";B.style.width="100%";B.style.padding="10px";for(var D=0;D<v.length;D++)B.appendChild(k(v[D]));this.userPanel.appendChild(B);k=document.createElement("div");k.style.textAlign=
"left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";B=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));B.className="geBtn";B.style.float="right";k.appendChild(B);B=mxUtils.button(mxResources.get("addAccount"),
mxUtils.bind(this,function(){var K=this.drive.createAuthWin();K.blur();window.focus();x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0,K)}),mxResources.get("closingFile")+"...")}));B.className="geBtn";B.style.margin="0px";k.appendChild(B);this.userPanel.appendChild(k)}}k=mxUtils.bind(this,function(K,c,e,g){if(null!=K){d&&this.userPanel.appendChild(document.createElement("hr"));
-d=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var n=document.createElement("tbody"),p=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var C=document.createElement("img");C.setAttribute("width","40");C.setAttribute("height","40");C.setAttribute("border","0");C.setAttribute("src",c);C.style.marginRight="6px";z.appendChild(C)}p.appendChild(z);
-z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,K.displayName);null!=K.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,K.email),z.appendChild(c));null!=g&&(K=document.createElement("div"),K.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),K.appendChild(c),z.appendChild(K));p.appendChild(z);n.appendChild(p);
+d=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var n=document.createElement("tbody"),m=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var C=document.createElement("img");C.setAttribute("width","40");C.setAttribute("height","40");C.setAttribute("border","0");C.setAttribute("src",c);C.style.marginRight="6px";z.appendChild(C)}m.appendChild(z);
+z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,K.displayName);null!=K.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,K.email),z.appendChild(c));null!=g&&(K=document.createElement("div"),K.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),K.appendChild(c),z.appendChild(K));m.appendChild(z);n.appendChild(m);
q.appendChild(n);this.userPanel.appendChild(q);K=document.createElement("div");K.style.textAlign="center";K.style.padding="10px";K.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",K.appendChild(e));this.userPanel.appendChild(K)}});null!=this.dropbox&&k(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&k(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&k(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),
@@ -12543,161 +12543,161 @@ null!=b?(this.userElement.innerText="",560<screen.width&&(mxUtils.write(this.use
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var v=document.createElement("img");mxUtils.setOpacity(v,50);v.style.height="16px";v.style.width="16px";v.setAttribute("border","0");v.setAttribute("valign","bottom");v.setAttribute("src",Editor.helpImage);d.appendChild(v);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(x){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(x)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function k(t,m,F){this.ui=t;this.previousExtFonts=this.extFonts=m;this.prevCustomFonts=this.customFonts=F}f.apply(this,arguments);var d=this.editorUi,v=d.editor.graph,x=mxUtils.bind(v,v.isEnabled),B=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),D=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function k(t,p,F){this.ui=t;this.previousExtFonts=this.extFonts=p;this.prevCustomFonts=this.customFonts=F}f.apply(this,arguments);var d=this.editorUi,v=d.editor.graph,x=mxUtils.bind(v,v.isEnabled),B=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),D=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),K=("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),c="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));d.actions.addAction("new...",function(){var t=d.isOffline();if(t||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var m=new NewDialog(d,t,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(m.container,t?350:620,t?70:460,!0,!0,function(J){d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});
-m.init()}else{var F=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};t=new TemplatesDialog(d,function(J,M,H){var G=H.libs,E=H.clibs;d.pickFolder(d.mode,function(P){d.createFile(M,J,null!=G&&0<G.length?G:null,null,function(){d.hideDialog()},null,P,null,null!=E&&0<E.length?E:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(J,M,H){var G=new Date;G.setDate(G.getDate()-
+d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));d.actions.addAction("new...",function(){var t=d.isOffline();if(t||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var p=new NewDialog(d,t,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(p.container,t?350:620,t?70:460,!0,!0,function(J){d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});
+p.init()}else{var F=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};t=new TemplatesDialog(d,function(J,M,H){var G=H.libs,E=H.clibs;d.pickFolder(d.mode,function(P){d.createFile(M,J,null!=G&&0<G.length?G:null,null,function(){d.hideDialog()},null,P,null,null!=E&&0<E.length?E:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(J,M,H){var G=new Date;G.setDate(G.getDate()-
7);d.drive.listFiles(null,G,H?!0:!1,function(E){for(var P=[],T=0;T<E.items.length;T++)P.push(F(E.items[T]));J(P)},M)},function(J,M,H,G){d.drive.listFiles(J,null,G?!0:!1,function(E){for(var P=[],T=0;T<E.items.length;T++)P.push(F(E.items[T]));M(P)},H)},function(J,M,H){d.drive.getFile(J.id,function(G){M(G.data)},H)},null,null,!1,!1);d.showDialog(t.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(v.isEnabled()&&
-!v.isCellLocked(v.getDefaultParent())){var t=new NewDialog(d,null,!1,function(m){d.hideDialog();if(null!=m){var F=d.editor.graph.getFreeInsertPoint();v.setSelectionCells(d.importXml(m,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));v.scrollCellToVisible(v.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(t.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});t.init()}})).isEnabled=x;var e=d.actions.addAction("shareCursor",
+!v.isCellLocked(v.getDefaultParent())){var t=new NewDialog(d,null,!1,function(p){d.hideDialog();if(null!=p){var F=d.editor.graph.getFreeInsertPoint();v.setSelectionCells(d.importXml(p,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));v.scrollCellToVisible(v.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(t.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});t.init()}})).isEnabled=x;var e=d.actions.addAction("shareCursor",
function(){d.setShareCursorPosition(!d.isShareCursorPosition())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShareCursorPosition()});e=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShowRemoteCursors()});e=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==
mxConstants.POINTS});e=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});e=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});e=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
-e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,m){this.addMenuItems(t,["points","inches","millimeters","meters"],m)})));e=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});e.setEnabled(d.canvasSupported&&9!=document.documentMode);
+e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,["points","inches","millimeters","meters"],p)})));e=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});e.setEnabled(d.canvasSupported&&9!=document.documentMode);
e.setToggleAction(!0);e.setSelectedCallback(function(){return null!=d.ruler});e=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});e.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;e.setToggleAction(!0);e.setSelectedCallback(function(){return"1"==urlParams.embedInline?
Editor.inlineFullscreen:null!=document.fullscreenElement});e=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(t){d.setDarkMode(!Editor.isDarkMode());t=mxSettings.getUi();"atlas"!=t&&"min"!=t&&"sketch"!=t&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});e.isEnabled=function(){return"atlas"!=mxSettings.getUi()};d.actions.addAction("properties...",function(){var t=new FilePropertiesDialog(d);
d.showDialog(t.container,320,120,!0,!0);t.init()}).isEnabled=x;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(v.isEnabled()){if(null==this.freehandWindow){var t=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,t?120:84,t)}v.freehand.isDrawing()?v.freehand.stopDrawing():v.freehand.startDrawing();this.freehandWindow.window.setVisible(v.freehand.isDrawing())}},null,null,"X")).isEnabled=
-function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var m=null==d.pages||1>=d.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F);var J=d.addCheckbox(t,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),M=d.addCheckbox(t,mxResources.get("compressed"),
-!0),H=d.addCheckbox(t,mxResources.get("allPages"),!m,m);H.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});t=new CustomDialog(d,t,mxUtils.bind(this,function(){d.downloadFile("xml",!M.checked,null,!J.checked,m||!H.checked)}),null,mxResources.get("export"));d.showDialog(t.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(t,m,F,J,M,H,G,E,P){G=[];P&&G.push("tags=%7B%7D");t=new EmbedDialog(d,d.createLink(t,m,F,J,M,H,null,!0,G));d.showDialog(t.container,450,240,!0,!0);t.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(t){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,t,function(m,F,J,M,H,G,E,P,T,W,U){d.createHtml(m,F,J,M,H,
+function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var p=null==d.pages||1>=d.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F);var J=d.addCheckbox(t,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),M=d.addCheckbox(t,mxResources.get("compressed"),
+!0),H=d.addCheckbox(t,mxResources.get("allPages"),!p,p);H.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});t=new CustomDialog(d,t,mxUtils.bind(this,function(){d.downloadFile("xml",!M.checked,null,!J.checked,p||!H.checked)}),null,mxResources.get("export"));d.showDialog(t.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),
+!0,null,null,function(t,p,F,J,M,H,G,E,P){G=[];P&&G.push("tags=%7B%7D");t=new EmbedDialog(d,d.createLink(t,p,F,J,M,H,null,!0,G));d.showDialog(t.container,450,240,!0,!0);t.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(t){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,t,function(p,F,J,M,H,G,E,P,T,W,U){d.createHtml(p,F,J,M,H,
G,E,P,T,W,U,mxUtils.bind(this,function(V,l){var A=d.getBaseFilename(E);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(A)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+l+"\n</body>\n</html>";d.saveData(A+(".drawio"==A.substring(A.lenth-7)?"":".drawio")+".html","html",V,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!d.isOffline()&&!d.printPdfExport){var t=null==d.pages||1>=d.pages.length,m=document.createElement("div");m.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(F);var J=function(){E!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!v.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)};F=200;var M=1,H=null;if(d.pdfPageExport&&
-!t){var G=function(){U.value=Math.max(1,Math.min(M,Math.max(parseInt(U.value),parseInt(T.value))));T.value=Math.max(1,Math.min(M,Math.min(parseInt(U.value),parseInt(T.value))))},E=d.addRadiobox(m,"pages",mxResources.get("allPages"),!0),P=d.addRadiobox(m,"pages",mxResources.get("pages")+":",!1,null,!0),T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("type","number");T.setAttribute("min","1");T.style.width="50px";m.appendChild(T);var W=
-document.createElement("span");mxUtils.write(W,mxResources.get("to"));m.appendChild(W);var U=T.cloneNode(!0);m.appendChild(U);mxEvent.addListener(T,"focus",function(){P.checked=!0});mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(T,"change",G);mxEvent.addListener(U,"change",G);if(null!=d.pages&&(M=d.pages.length,null!=d.currentPage))for(G=0;G<d.pages.length;G++)if(d.currentPage==d.pages[G]){H=G+1;T.value=H;U.value=H;break}T.setAttribute("max",M);U.setAttribute("max",M);
-mxUtils.br(m);var V=d.addRadiobox(m,"pages",mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),l=d.addCheckbox(m,mxResources.get("crop"),!1,!0),A=d.addCheckbox(m,mxResources.get("grid"),!1,!1);mxEvent.addListener(E,"change",J);mxEvent.addListener(P,"change",J);mxEvent.addListener(V,"change",J);F+=64}else V=d.addCheckbox(m,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),l=d.addCheckbox(m,mxResources.get("crop"),!v.pageVisible||!d.pdfPageExport,!d.pdfPageExport),A=d.addCheckbox(m,mxResources.get("grid"),
-!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var L=null,Q=null;if(EditorUi.isElectronApp||J)Q=d.addCheckbox(m,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;J&&(L=d.addCheckbox(m,mxResources.get("transparentBackground"),!1),F+=30);m=new CustomDialog(d,m,mxUtils.bind(this,function(){var O=null;if(!t){O=parseInt(T.value);var R=parseInt(U.value);O=E.checked||O==H&&R==H?null:{from:Math.max(0,
-Math.min(M-1,O-1)),to:Math.max(0,Math.min(M-1,R-1))}}d.downloadFile("pdf",null,null,!V.checked,t?!0:!E.checked&&null==O,!l.checked,null!=L&&L.checked,null,null,A.checked,null!=Q&&Q.checked,O)}),null,mxResources.get("export"));d.showDialog(m.container,300,F,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});
-d.actions.addAction("close",function(){function t(){null!=m&&m.removeDraft();d.fileLoaded(null)}var m=d.getCurrentFile();null!=m&&m.isModified()?d.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){v.getSelectionCells();if(1==v.getSelectionCount()){var t=v.getSelectionCell(),m=v.view.getState(t);null!=m&&null!=m.shape&&null!=m.shape.stencil&&(t=new EditShapeDialog(d,t,mxResources.get("editShape")+
-":",630,400),d.showDialog(t.container,640,480,!0,!1),t.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(t,m){d.spinner.stop();t=new RevisionDialog(d,t,m);d.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,function(t){d.handleError(t)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",
+!d.isOffline()&&!d.printPdfExport){var t=null==d.pages||1>=d.pages.length,p=document.createElement("div");p.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var J=function(){E!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!v.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)};F=200;var M=1,H=null;if(d.pdfPageExport&&
+!t){var G=function(){U.value=Math.max(1,Math.min(M,Math.max(parseInt(U.value),parseInt(T.value))));T.value=Math.max(1,Math.min(M,Math.min(parseInt(U.value),parseInt(T.value))))},E=d.addRadiobox(p,"pages",mxResources.get("allPages"),!0),P=d.addRadiobox(p,"pages",mxResources.get("pages")+":",!1,null,!0),T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("type","number");T.setAttribute("min","1");T.style.width="50px";p.appendChild(T);var W=
+document.createElement("span");mxUtils.write(W,mxResources.get("to"));p.appendChild(W);var U=T.cloneNode(!0);p.appendChild(U);mxEvent.addListener(T,"focus",function(){P.checked=!0});mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(T,"change",G);mxEvent.addListener(U,"change",G);if(null!=d.pages&&(M=d.pages.length,null!=d.currentPage))for(G=0;G<d.pages.length;G++)if(d.currentPage==d.pages[G]){H=G+1;T.value=H;U.value=H;break}T.setAttribute("max",M);U.setAttribute("max",M);
+mxUtils.br(p);var V=d.addRadiobox(p,"pages",mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),l=d.addCheckbox(p,mxResources.get("crop"),!1,!0),A=d.addCheckbox(p,mxResources.get("grid"),!1,!1);mxEvent.addListener(E,"change",J);mxEvent.addListener(P,"change",J);mxEvent.addListener(V,"change",J);F+=64}else V=d.addCheckbox(p,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),l=d.addCheckbox(p,mxResources.get("crop"),!v.pageVisible||!d.pdfPageExport,!d.pdfPageExport),A=d.addCheckbox(p,mxResources.get("grid"),
+!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var L=null,Q=null;if(EditorUi.isElectronApp||J)Q=d.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;J&&(L=d.addCheckbox(p,mxResources.get("transparentBackground"),!1),F+=30);p=new CustomDialog(d,p,mxUtils.bind(this,function(){var O=null;if(!t){O=parseInt(T.value);var R=parseInt(U.value);O=E.checked||O==H&&R==H?null:{from:Math.max(0,
+Math.min(M-1,O-1)),to:Math.max(0,Math.min(M-1,R-1))}}d.downloadFile("pdf",null,null,!V.checked,t?!0:!E.checked&&null==O,!l.checked,null!=L&&L.checked,null,null,A.checked,null!=Q&&Q.checked,O)}),null,mxResources.get("export"));d.showDialog(p.container,300,F,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});
+d.actions.addAction("close",function(){function t(){null!=p&&p.removeDraft();d.fileLoaded(null)}var p=d.getCurrentFile();null!=p&&p.isModified()?d.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){v.getSelectionCells();if(1==v.getSelectionCount()){var t=v.getSelectionCell(),p=v.view.getState(t);null!=p&&null!=p.shape&&null!=p.shape.stencil&&(t=new EditShapeDialog(d,t,mxResources.get("editShape")+
+":",630,400),d.showDialog(t.container,640,480,!0,!1),t.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(t,p){d.spinner.stop();t=new RevisionDialog(d,t,p);d.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,function(t){d.handleError(t)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",
function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");e=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(e.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var t=d.getCurrentFile();null!=t&&(window.drawdata=d.getFileData(),t=null!=t.getTitle()?t.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(t),null,!0))});"undefined"!==typeof MathJax&&(e=d.actions.addAction("mathematicalTypesetting",function(){var t=new ChangePageSetup(d);t.ignoreColor=!0;t.ignoreImage=!0;t.mathEnabled=!d.isMathEnabled();v.model.execute(t)}),e.setToggleAction(!0),e.setSelectedCallback(function(){return d.isMathEnabled()}),e.isEnabled=x);isLocalStorage&&(e=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
-mxSettings.save()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var t=v.getSelectionCells(),m=[],F=0;F<t.length;F++)v.getModel().isVertex(t[F])&&m.push(t[F]);0<m.length&&(t=new EditGeometryDialog(d,m),d.showDialog(t.container,
+mxSettings.save()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var t=v.getSelectionCells(),p=[],F=0;F<t.length;F++)v.getModel().isVertex(t[F])&&p.push(t[F]);0<p.length&&(t=new EditGeometryDialog(d,p),d.showDialog(t.container,
200,270,!0,!0),t.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;d.actions.addAction("copyStyle",function(){v.isEnabled()&&!v.isSelectionEmpty()&&(q=v.copyStyle(v.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){v.isEnabled()&&!v.isSelectionEmpty()&&null!=q&&v.pasteStyle(q,v.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var t=
-new BackgroundImageDialog(d,function(m){d.setBackgroundImage(m)});d.showDialog(t.container,400,170,!0,!0);t.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,m,F,J,M,H,G,E,P,T,W,U,V,l,A){P=parseInt(t);!isNaN(P)&&0<P&&(A?d.downloadFile("remoteSvg",null,null,F,null,E,m,t,G,null,M):d.exportSvg(P/100,m,F,
-J,M,H,G,!E,!1,T,U,V,l))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,m,F,J,M,H,G,E,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&d.exportImage(t/100,m,F,J,M,G,!E,!1,null,W,null,U,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,m,F,J,M){d.downloadFile(m?"xmlpng":"png",null,null,t,null,null,F,J,M)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,m,F,J,M,H,G,E,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&d.exportImage(t/100,!1,
-F,J,!1,G,!E,!1,"jpeg",W,null,U,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,m,F,J,M){d.downloadFile("jpeg",null,null,t,null,null,null,J,M)}),!0,!0)}));e=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(v.model.getTopmostCells(v.getSelectionCells())),m=mxUtils.getXml(0==t.length?d.editor.getGraphXml():v.encodeCells(t));d.copyImage(t,m)}));e.visible=
+new BackgroundImageDialog(d,function(p){d.setBackgroundImage(p)});d.showDialog(t.container,400,170,!0,!0);t.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,J,M,H,G,E,P,T,W,U,V,l,A){P=parseInt(t);!isNaN(P)&&0<P&&(A?d.downloadFile("remoteSvg",null,null,F,null,E,p,t,G,null,M):d.exportSvg(P/100,p,F,
+J,M,H,G,!E,!1,T,U,V,l))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,J,M,H,G,E,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&d.exportImage(t/100,p,F,J,M,G,!E,!1,null,W,null,U,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,J,M){d.downloadFile(p?"xmlpng":"png",null,null,t,null,null,F,J,M)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,J,M,H,G,E,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&d.exportImage(t/100,!1,
+F,J,!1,G,!E,!1,"jpeg",W,null,U,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,J,M){d.downloadFile("jpeg",null,null,t,null,null,null,J,M)}),!0,!0)}));e=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(v.model.getTopmostCells(v.getSelectionCells())),p=mxUtils.getXml(0==t.length?d.editor.getGraphXml():v.encodeCells(t));d.copyImage(t,p)}));e.visible=
Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;e=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){v.setShadowVisible(!v.shadowVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return v.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));
d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var t=new FeedbackDialog(d);d.showDialog(t.container,610,360,!0,!1);t.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});e=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,
212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
-this.tagsWindow.window.isVisible()}));e=d.actions.addAction("findReplace...",mxUtils.bind(this,function(t,m){var F=(t=v.isEnabled()&&(null==m||!mxEvent.isShiftDown(m)))?"findReplace":"find";m=F+"Window";if(null==this[m]){var J=t?"min"==uiTheme?330:300:240;this[m]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,t?"min"==uiTheme?304:288:170,t);this[m].window.addListener("show",function(){d.fireEvent(new mxEventObject(F))});this[m].window.addListener("hide",function(){d.fireEvent(new mxEventObject(F))});
-this[m].window.setVisible(!0)}else this[m].window.setVisible(!this[m].window.isVisible())}),null,null,Editor.ctrlKey+"+F");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){var t=v.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[t]&&this[t].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==d.pages||1>=d.pages.length;if(t)d.exportVisio();else{var m=document.createElement("div");m.style.whiteSpace=
-"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(F);var J=d.addCheckbox(m,mxResources.get("allPages"),!t,t);J.style.marginBottom="16px";t=new CustomDialog(d,m,mxUtils.bind(this,function(){d.exportVisio(!J.checked)}),null,mxResources.get("export"));d.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
-function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var m=document.createElement("span");m.style["float"]="right";m.style.cursor="pointer";m.style.userSelect="none";m.style.marginTop="-4px";m.appendChild(t);mxUtils.write(m,mxResources.get("showStartScreen"));mxEvent.addListener(m,"click",function(M){mxEvent.getSource(M)!=t&&
-(t.checked=!t.checked)});header=m}var F=localStorage.getItem(Editor.configurationKey);m=[[mxResources.get("reset"),function(M,H){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(G){d.handleError(G)}})},"Shift+Click to Reset Settings"]];var J=d.actions.get("plugins");
-null!=J&&"1"==urlParams.sketch&&m.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||m.push([mxResources.get("share"),function(M,H){if(0<H.value.length)try{var G=JSON.parse(H.value),E=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(G)),P=new EmbedDialog(d,E);d.showDialog(P.container,450,240,!0);P.init()}catch(T){d.handleError(T)}else d.handleError({message:mxResources.get("invalidInput")})}]);m=new TextareaDialog(d,mxResources.get("configuration")+
+this.tagsWindow.window.isVisible()}));e=d.actions.addAction("findReplace...",mxUtils.bind(this,function(t,p){var F=(t=v.isEnabled()&&(null==p||!mxEvent.isShiftDown(p)))?"findReplace":"find";p=F+"Window";if(null==this[p]){var J=t?"min"==uiTheme?330:300:240;this[p]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,t?"min"==uiTheme?304:288:170,t);this[p].window.addListener("show",function(){d.fireEvent(new mxEventObject(F))});this[p].window.addListener("hide",function(){d.fireEvent(new mxEventObject(F))});
+this[p].window.setVisible(!0)}else this[p].window.setVisible(!this[p].window.isVisible())}),null,null,Editor.ctrlKey+"+F");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){var t=v.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[t]&&this[t].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==d.pages||1>=d.pages.length;if(t)d.exportVisio();else{var p=document.createElement("div");p.style.whiteSpace=
+"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var J=d.addCheckbox(p,mxResources.get("allPages"),!t,t);J.style.marginBottom="16px";t=new CustomDialog(d,p,mxUtils.bind(this,function(){d.exportVisio(!J.checked)}),null,mxResources.get("export"));d.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
+function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var p=document.createElement("span");p.style["float"]="right";p.style.cursor="pointer";p.style.userSelect="none";p.style.marginTop="-4px";p.appendChild(t);mxUtils.write(p,mxResources.get("showStartScreen"));mxEvent.addListener(p,"click",function(M){mxEvent.getSource(M)!=t&&
+(t.checked=!t.checked)});header=p}var F=localStorage.getItem(Editor.configurationKey);p=[[mxResources.get("reset"),function(M,H){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(G){d.handleError(G)}})},"Shift+Click to Reset Settings"]];var J=d.actions.get("plugins");
+null!=J&&"1"==urlParams.sketch&&p.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||p.push([mxResources.get("share"),function(M,H){if(0<H.value.length)try{var G=JSON.parse(H.value),E=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(G)),P=new EmbedDialog(d,E);d.showDialog(P.container,450,240,!0);P.init()}catch(T){d.handleError(T)}else d.handleError({message:mxResources.get("invalidInput")})}]);p=new TextareaDialog(d,mxResources.get("configuration")+
":",null!=F?JSON.stringify(JSON.parse(F),null,2):"",function(M){if(null!=M)try{if(null!=t.parentNode&&(mxSettings.setShowStartScreen(t.checked),mxSettings.save()),M==F)d.hideDialog();else{if(0<M.length){var H=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(G){d.handleError(G)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-m,t.parentNode);d.showDialog(m.container,620,460,!0,!1);m.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,m){var F=mxUtils.bind(this,function(M){var H=""==M?mxResources.get("automatic"):mxLanguageMap[M],G=null;""!=H&&(G=t.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
-m),(M==mxLanguage||""==M&&null==mxLanguage)&&t.addCheckmark(G,Editor.checkmarkImage));return G});F("");t.addSeparator(m);for(var J in mxLanguageMap)F(J)})));var n=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(t){var m=n.apply(this,arguments);if(null!=m&&"1"!=urlParams.noLangIcon){var F=this.get("language");if(null!=F){F=m.addMenu("",F.funct);F.setAttribute("title",mxResources.get("language"));F.className="geAdaptiveAsset";F.style.width="16px";F.style.paddingTop="2px";F.style.paddingLeft=
+p,t.parentNode);d.showDialog(p.container,620,460,!0,!1);p.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,p){var F=mxUtils.bind(this,function(M){var H=""==M?mxResources.get("automatic"):mxLanguageMap[M],G=null;""!=H&&(G=t.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
+p),(M==mxLanguage||""==M&&null==mxLanguage)&&t.addCheckmark(G,Editor.checkmarkImage));return G});F("");t.addSeparator(p);for(var J in mxLanguageMap)F(J)})));var n=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(t){var p=n.apply(this,arguments);if(null!=p&&"1"!=urlParams.noLangIcon){var F=this.get("language");if(null!=F){F=p.addMenu("",F.funct);F.setAttribute("title",mxResources.get("language"));F.className="geAdaptiveAsset";F.style.width="16px";F.style.paddingTop="2px";F.style.paddingLeft=
"4px";F.style.zIndex="1";F.style.position="absolute";F.style.display="block";F.style.cursor="pointer";F.style.right="17px";"atlas"==uiTheme?(F.style.top="6px",F.style.right="15px"):F.style.top="min"==uiTheme?"2px":"0px";var J=document.createElement("div");J.style.backgroundImage="url("+Editor.globeImage+")";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="19px 19px";J.style.position="absolute";J.style.height="19px";J.style.width="19px";J.style.marginTop=
-"2px";J.style.zIndex="1";F.appendChild(J);mxUtils.setOpacity(F,40);"1"==urlParams.winCtrls&&(F.style.right="95px",F.style.width="19px",F.style.height="19px",F.style.webkitAppRegion="no-drag",J.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(F.style.opacity="0.85",F.style.filter="invert(100%)");document.body.appendChild(F);m.langIcon=F}}return m}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,
-parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var t=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(m){if(0<m.length)try{var F=JSON.parse(m);d.executeLayouts(v.createLayouts(F));d.customLayoutConfig=F;d.hideDialog()}catch(J){d.handleError(J)}},null,null,null,null,function(m,F){var J=mxUtils.button(mxResources.get("copy"),function(){try{var M=F.value;F.value=JSON.stringify(JSON.parse(M));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));F.value=M}catch(H){d.handleError(H)}});J.setAttribute("title","copy");J.className="geBtn";m.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(t.container,620,460,!0,!0);t.init()});e=this.get("layout");var p=e.funct;e.funct=function(t,m){p.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){var F=null,J=20,
+"2px";J.style.zIndex="1";F.appendChild(J);mxUtils.setOpacity(F,40);"1"==urlParams.winCtrls&&(F.style.right="95px",F.style.width="19px",F.style.height="19px",F.style.webkitAppRegion="no-drag",J.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(F.style.opacity="0.85",F.style.filter="invert(100%)");document.body.appendChild(F);p.langIcon=F}}return p}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,
+parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var t=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(p){if(0<p.length)try{var F=JSON.parse(p);d.executeLayouts(v.createLayouts(F));d.customLayoutConfig=F;d.hideDialog()}catch(J){d.handleError(J)}},null,null,null,null,function(p,F){var J=mxUtils.button(mxResources.get("copy"),function(){try{var M=F.value;F.value=JSON.stringify(JSON.parse(M));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));F.value=M}catch(H){d.handleError(H)}});J.setAttribute("title","copy");J.className="geBtn";p.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(t.container,620,460,!0,!0);t.init()});e=this.get("layout");var m=e.funct;e.funct=function(t,p){m.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){var F=null,J=20,
M=20,H=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=F){var l=d.editor.graph,A=new mxOrgChartLayout(l,F,J,M),L=l.getDefaultParent();1<l.model.getChildCount(l.getSelectionCell())&&(L=l.getSelectionCell());A.execute(L)}},G=document.createElement("div"),E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("orgChartType")+": ");G.appendChild(E);var P=document.createElement("select");P.style.width="200px";
P.style.boxSizing="border-box";E=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var T=0;T<E.length;T++){var W=document.createElement("option");mxUtils.write(W,E[T]);W.value=T;2==T&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){F=P.value});G.appendChild(P);E=document.createElement("div");
E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("parentChildSpacing")+": ");G.appendChild(E);var U=document.createElement("input");U.type="number";U.value=J;U.style.width="200px";U.style.boxSizing="border-box";G.appendChild(U);mxEvent.addListener(U,"change",function(){J=U.value});E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("siblingSpacing")+
-": ");G.appendChild(E);var V=document.createElement("input");V.type="number";V.value=M;V.style.width="200px";V.style.boxSizing="border-box";G.appendChild(V);mxEvent.addListener(V,"change",function(){M=V.value});G=new CustomDialog(d,G,function(){null==F&&(F=2);d.loadOrgChartLayouts(H)});d.showDialog(G.container,355,140,!0,!0)},m,null,x());t.addSeparator(m);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(v);F.checkOverlap=!0;d.prompt(mxResources.get("spacing"),
-F.spacing,mxUtils.bind(this,function(J){F.spacing=J;d.executeLayout(function(){F.execute(v.getDefaultParent(),v.isSelectionEmpty()?null:v.getSelectionCells())},!1)}))}),m);t.addSeparator(m);d.menus.addMenuItem(t,"runLayout",m,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,m){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(t,["about"],m);else{var F=t.addItem("Search:",null,null,m,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()?
+": ");G.appendChild(E);var V=document.createElement("input");V.type="number";V.value=M;V.style.width="200px";V.style.boxSizing="border-box";G.appendChild(V);mxEvent.addListener(V,"change",function(){M=V.value});G=new CustomDialog(d,G,function(){null==F&&(F=2);d.loadOrgChartLayouts(H)});d.showDialog(G.container,355,140,!0,!0)},p,null,x());t.addSeparator(p);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(v);F.checkOverlap=!0;d.prompt(mxResources.get("spacing"),
+F.spacing,mxUtils.bind(this,function(J){F.spacing=J;d.executeLayout(function(){F.execute(v.getDefaultParent(),v.isSelectionEmpty()?null:v.getSelectionCells())},!1)}))}),p);t.addSeparator(p);d.menus.addMenuItem(t,"runLayout",p,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,p){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(t,["about"],p);else{var F=t.addItem("Search:",null,null,p,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()?
"#505759":"whiteSmoke";F.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(M){var H=mxUtils.trim(J.value);13==M.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",
action:"search",label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(J.value="")}));F.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(M){document.activeElement!=J&&J.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",
-function(){d.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),m),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates"],m),this.addMenuItems(t,["openDevTools","-","about"],m)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - about".split(" "),m)}"1"==urlParams.test&&(t.addSeparator(m),this.addSubmenu("testDevelop",t,m))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var t=
+function(){d.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),p),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates"],p),this.addMenuItems(t,["openDevTools","-","about"],p)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - about".split(" "),p)}"1"==urlParams.test&&(t.addSeparator(p),this.addSubmenu("testDevelop",t,p))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var t=
prompt("Language Code",Graph.diagramLanguage||"");null!=t&&(Graph.diagramLanguage=0<t.length?t:null,v.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
-mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!v.isSelectionEmpty()){var t=v.cloneCells(v.getSelectionCells()),m=v.getBoundingBoxFromGeometry(t);t=v.moveCells(t,-m.x,-m.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+m.width+", "+m.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(v.encodeCells(t)))+
-"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=v.getGraphBounds(),m=v.view.translate,F=v.view.scale;v.insertVertex(v.getDefaultParent(),null,"",t.x/F-m.x,t.y/F-m.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";t=new TextareaDialog(d,"Paste Data:",t,function(m){if(0<m.length)try{var F=
+mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!v.isSelectionEmpty()){var t=v.cloneCells(v.getSelectionCells()),p=v.getBoundingBoxFromGeometry(t);t=v.moveCells(t,-p.x,-p.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+p.width+", "+p.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(v.encodeCells(t)))+
+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=v.getGraphBounds(),p=v.view.translate,F=v.view.scale;v.insertVertex(v.getDefaultParent(),null,"",t.x/F-p.x,t.y/F-p.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";t=new TextareaDialog(d,"Paste Data:",t,function(p){if(0<p.length)try{var F=
function(E){function P(R){if(null==O[R]){if(O[R]=!0,null!=U[R]){for(;0<U[R].length;){var S=U[R].pop();P(S)}delete U[R]}}else mxLog.debug(T+": Visited: "+R)}var T=E.parentNode.id,W=E.childNodes;E={};for(var U={},V=null,l={},A=0;A<W.length;A++){var L=W[A];if(null!=L.id&&0<L.id.length)if(null==E[L.id]){E[L.id]=L.id;var Q=L.getAttribute("parent");null==Q?null!=V?mxLog.debug(T+": Multiple roots: "+L.id):V=L.id:(null==U[Q]&&(U[Q]=[]),U[Q].push(L.id))}else l[L.id]=L.id}W=Object.keys(l);0<W.length?(W=T+": "+
-W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(T+": Checked");var O={};null==V?mxLog.debug(T+": No root"):(P(V),Object.keys(O).length!=Object.keys(E).length&&(mxLog.debug(T+": Invalid tree: (see console)"),console.log(T+": Invalid tree",U)))};"<"!=m.charAt(0)&&(m=Graph.decompress(m),mxLog.debug("See console for uncompressed XML"),console.log("xml",m));var J=mxUtils.parseXml(m),M=d.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var H=
-d.getHashValueForPages(M);mxLog.debug("Checksum: ",H)}catch(E){mxLog.debug("Error: ",E.message)}else mxLog.debug("No pages found for checksum");var G=J.getElementsByTagName("root");for(m=0;m<G.length;m++)F(G[m]);mxLog.show()}catch(E){d.handleError(E),null!=window.console&&console.error(E)}});d.showDialog(t.container,620,460,!0,!0);t.init()}));var z=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var t=new TextareaDialog(d,"Diff/Sync:","",function(m){var F=d.getCurrentFile();
-if(0<m.length&&null!=F)try{var J=JSON.parse(m);F.patch([J],null,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(m,F){z=d.getPagesForXml(d.getFileData(!0));t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],["Diff",function(m,F){try{t.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2)}catch(J){d.handleError(J)}}]]);null==z?(z=d.getPagesForXml(d.getFileData(!0)),t.textarea.value=
+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(T+": Checked");var O={};null==V?mxLog.debug(T+": No root"):(P(V),Object.keys(O).length!=Object.keys(E).length&&(mxLog.debug(T+": Invalid tree: (see console)"),console.log(T+": Invalid tree",U)))};"<"!=p.charAt(0)&&(p=Graph.decompress(p),mxLog.debug("See console for uncompressed XML"),console.log("xml",p));var J=mxUtils.parseXml(p),M=d.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var H=
+d.getHashValueForPages(M);mxLog.debug("Checksum: ",H)}catch(E){mxLog.debug("Error: ",E.message)}else mxLog.debug("No pages found for checksum");var G=J.getElementsByTagName("root");for(p=0;p<G.length;p++)F(G[p]);mxLog.show()}catch(E){d.handleError(E),null!=window.console&&console.error(E)}});d.showDialog(t.container,620,460,!0,!0);t.init()}));var z=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var t=new TextareaDialog(d,"Diff/Sync:","",function(p){var F=d.getCurrentFile();
+if(0<p.length&&null!=F)try{var J=JSON.parse(p);F.patch([J],null,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(p,F){z=d.getPagesForXml(d.getFileData(!0));t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],["Diff",function(p,F){try{t.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2)}catch(J){d.handleError(J)}}]]);null==z?(z=d.getPagesForXml(d.getFileData(!0)),t.textarea.value=
"Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)):t.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2);d.showDialog(t.container,620,460,!0,!0);t.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var t=d.getCurrentFile();console.log("editorUi",d,"file",t);if(null!=t&&t.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(t.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(t.theirPages));
-console.log("diff ownPages/theirPages",d.diffPages(t.ownPages,t.theirPages));var m=t.getShadowPages();null!=m&&(console.log("Checksum shadowPages",d.getHashValueForPages(m)),console.log("diff shadowPages/ownPages",d.diffPages(m,t.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(t.ownPages,m)),console.log("diff theirPages/shadowPages",d.diffPages(t.theirPages,m)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot",
+console.log("diff ownPages/theirPages",d.diffPages(t.ownPages,t.theirPages));var p=t.getShadowPages();null!=p&&(console.log("Checksum shadowPages",d.getHashValueForPages(p)),console.log("diff shadowPages/ownPages",d.diffPages(p,t.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(t.ownPages,p)),console.log("diff theirPages/shadowPages",d.diffPages(t.theirPages,p)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot",
d.diffPages(t.ownPages,t.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(t.theirPages,t.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(t.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(t.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(t.theirPages,d.pages)))}null!=t&&console.log("Shadow pages",[d.getXmlForPages(t.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",
d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var t=d.getCurrentFile();null!=t&&t.isRealtime()&&null!=t.shadowPages&&(console.log("patching actualPages to shadowPages",t.patch([d.diffPages(t.shadowPages,d.pages)])),t.ownPages=d.clonePages(d.pages),t.theirPages=d.clonePages(d.pages),t.shadowPages=d.clonePages(d.pages),null!=t.sync&&(t.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,
-function(){v.model.beginUpdate();try{var t=v.model.cells,m=0,F=[],J=[],M;for(M in t){var H=t[M],G=v.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=G&&"data:"==G.substring(0,5)&&(null==F[G]&&(F[G]=(F[G]||0)+1,m++),J.push(H))}v.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",m,"image(s) from",J.length,"cell(s): ",[J,F])}finally{v.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,v.getModel())}));d.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var t=new mxImageExport,m=v.getGraphBounds(),F=v.view.scale,J=mxUtils.createXmlDocument(),M=J.createElement("output");J.appendChild(M);J=new mxXmlCanvas2D(M);J.translate(Math.floor((1-m.x)/F),Math.floor((1-m.y)/F));J.scale(1/F);var H=0,G=J.save;J.save=function(){H++;G.apply(this,arguments)};var E=J.restore;J.restore=function(){H--;E.apply(this,arguments)};var P=t.drawShape;t.drawShape=function(T){mxLog.debug("entering shape",T,H);P.apply(this,arguments);mxLog.debug("leaving shape",
-T,H)};t.drawState(v.getView().getState(v.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",H)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,m){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
-m)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){v.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(d,
-t,mxResources.get("editShape")+":",630,400),d.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=x;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(t){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(m,F,J,M,H,G,E,P,T,W,U){d.createHtml(m,F,J,M,H,G,E,P,T,W,U,mxUtils.bind(this,function(V,
+function(){v.model.beginUpdate();try{var t=v.model.cells,p=0,F=[],J=[],M;for(M in t){var H=t[M],G=v.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=G&&"data:"==G.substring(0,5)&&(null==F[G]&&(F[G]=(F[G]||0)+1,p++),J.push(H))}v.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",p,"image(s) from",J.length,"cell(s): ",[J,F])}finally{v.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,v.getModel())}));d.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var t=new mxImageExport,p=v.getGraphBounds(),F=v.view.scale,J=mxUtils.createXmlDocument(),M=J.createElement("output");J.appendChild(M);J=new mxXmlCanvas2D(M);J.translate(Math.floor((1-p.x)/F),Math.floor((1-p.y)/F));J.scale(1/F);var H=0,G=J.save;J.save=function(){H++;G.apply(this,arguments)};var E=J.restore;J.restore=function(){H--;E.apply(this,arguments)};var P=t.drawShape;t.drawShape=function(T){mxLog.debug("entering shape",T,H);P.apply(this,arguments);mxLog.debug("leaving shape",
+T,H)};t.drawState(v.getView().getState(v.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",H)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
+p)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){v.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(d,
+t,mxResources.get("editShape")+":",630,400),d.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=x;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(t){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(p,F,J,M,H,G,E,P,T,W,U){d.createHtml(p,F,J,M,H,G,E,P,T,W,U,mxUtils.bind(this,function(V,
l){var A=new EmbedDialog(d,V+"\n"+l,null,null,function(){var L=window.open(),Q=L.document;if(null!=Q){"CSS1Compat"===document.compatMode&&Q.writeln("<!DOCTYPE html>");Q.writeln("<html>");Q.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Q.writeln("<body>");Q.writeln(V);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&Q.writeln(l);Q.writeln("</body>");Q.writeln("</html>");Q.close();if(!O){var R=L.document.createElement("div");
R.marginLeft="26px";R.marginTop="26px";mxUtils.write(R,mxResources.get("updatingDocument"));O=L.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";R.appendChild(O);L.document.body.insertBefore(R,L.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(l)[1];Q.body.appendChild(S);R.parentNode.removeChild(R)},
-20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(A.container,450,240,!0,!0);A.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var t=d.getCurrentFile();null!=t&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(m){d.spinner.stop();null!=m?(m=new EmbedDialog(d,'<img src="'+(t.constructor!=DriveFile?m:"https://drive.google.com/uc?id="+t.getId())+'"/>'),d.showDialog(m.container,
-450,240,!0,!0),m.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(t,m,F,J,M,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(t,m,F,J,M,H,function(G){d.spinner.stop();G=new EmbedDialog(d,G);d.showDialog(G.container,450,240,!0,!0);G.init()},function(G){d.spinner.stop();d.handleError(G)})},mxResources.get("image"),mxResources.get("retina"),
-d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(t,m,F,J,M,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(t,m,F,J,M,H,function(G){d.spinner.stop();G=new EmbedDialog(d,G);d.showDialog(G.container,450,240,!0,!0);G.init()},function(G){d.spinner.stop();d.handleError(G)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=v.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(t.height/v.view.scale)+2,function(m,F,J,M,H,G,E,P,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(W){d.spinner.stop();var U=[];T&&U.push("tags=%7B%7D");W=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+E+";height:"+P+';" src="'+d.createLink(m,F,J,M,H,G,W,null,
-U)+'"></iframe>');d.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var m=document.createElement("a");m.setAttribute("href","javascript:void(0);");m.setAttribute("target","_blank");m.style.cursor="pointer";mxUtils.write(m,mxResources.get("getNotionChromeExtension"));
-t.appendChild(m);mxEvent.addListener(m,"click",function(F){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(F)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,J,M,H,G,E,P,T,W){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");U=new EmbedDialog(d,d.createLink(F,J,M,H,G,E,U,null,V,!0));
-d.showDialog(U.container,450,240,!0,!0);U.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(t,m,F,J,M,H,G,E,P){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(T){d.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");T=new EmbedDialog(d,d.createLink(t,m,F,J,M,H,T,null,W));d.showDialog(T.container,450,240,
+20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(A.container,450,240,!0,!0);A.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var t=d.getCurrentFile();null!=t&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(p){d.spinner.stop();null!=p?(p=new EmbedDialog(d,'<img src="'+(t.constructor!=DriveFile?p:"https://drive.google.com/uc?id="+t.getId())+'"/>'),d.showDialog(p.container,
+450,240,!0,!0),p.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(t,p,F,J,M,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(t,p,F,J,M,H,function(G){d.spinner.stop();G=new EmbedDialog(d,G);d.showDialog(G.container,450,240,!0,!0);G.init()},function(G){d.spinner.stop();d.handleError(G)})},mxResources.get("image"),mxResources.get("retina"),
+d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(t,p,F,J,M,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(t,p,F,J,M,H,function(G){d.spinner.stop();G=new EmbedDialog(d,G);d.showDialog(G.container,450,240,!0,!0);G.init()},function(G){d.spinner.stop();d.handleError(G)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
+d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=v.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(t.height/v.view.scale)+2,function(p,F,J,M,H,G,E,P,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(W){d.spinner.stop();var U=[];T&&U.push("tags=%7B%7D");W=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+E+";height:"+P+';" src="'+d.createLink(p,F,J,M,H,G,W,null,
+U)+'"></iframe>');d.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var p=document.createElement("a");p.setAttribute("href","javascript:void(0);");p.setAttribute("target","_blank");p.style.cursor="pointer";mxUtils.write(p,mxResources.get("getNotionChromeExtension"));
+t.appendChild(p);mxEvent.addListener(p,"click",function(F){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(F)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,J,M,H,G,E,P,T,W){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");U=new EmbedDialog(d,d.createLink(F,J,M,H,G,E,U,null,V,!0));
+d.showDialog(U.container,450,240,!0,!0);U.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(t,p,F,J,M,H,G,E,P){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(T){d.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");T=new EmbedDialog(d,d.createLink(t,p,F,J,M,H,T,null,W));d.showDialog(T.container,450,240,
!0,!0);T.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
function(t){d.spinner.stop();t=new GoogleSitesDialog(d,t);d.showDialog(t.container,420,256,!0,!0);t.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)e=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});e=d.actions.addAction("search",function(){var t=d.sidebar.isEntryVisible("search");
-d.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});e.label=mxResources.get("searchShapes");e.setToggleAction(!0);e.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(t){v.isEditing()&&v.stopEditing();var m="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var F=d.createLoadMessage("save");
-F.xml=m;t&&(F.exit=!0);m=JSON.stringify(F)}(window.opener||window.parent).postMessage(m,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));t=d.getCurrentFile();null==t||t.constructor==EmbedFile||t.constructor==LocalFile&&null==t.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
-d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var t=function(){d.editor.modified=!1;var m="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(m,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,m){d.isExportToCanvas()?(this.addMenuItems(t,
-["exportPng"],m),d.jpgSupported&&this.addMenuItems(t,["exportJpg"],m)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],m);this.addMenuItems(t,["exportSvg","-"],m);d.isOffline()||d.printPdfExport?this.addMenuItems(t,["exportPdf"],m):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],m);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(t,["exportVsdx"],m);this.addMenuItems(t,["-",
-"exportHtml","exportXml","exportUrl"],m);d.isOffline()||(t.addSeparator(m),this.addMenuItem(t,"export",m).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,m){function F(H){H.pickFile(function(G){d.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(G,function(E){var P="data:image/"==E.getData().substring(0,11)?M(E.getTitle()):"text/xml";/\.svg$/i.test(E.getTitle())&&!d.editor.isDataSvg(E.getData())&&(E.setData(Editor.createSvgDataUri(E.getData())),
+d.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});e.label=mxResources.get("searchShapes");e.setToggleAction(!0);e.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(t){v.isEditing()&&v.stopEditing();var p="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var F=d.createLoadMessage("save");
+F.xml=p;t&&(F.exit=!0);p=JSON.stringify(F)}(window.opener||window.parent).postMessage(p,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));t=d.getCurrentFile();null==t||t.constructor==EmbedFile||t.constructor==LocalFile&&null==t.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
+d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var t=function(){d.editor.modified=!1;var p="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(p,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,p){d.isExportToCanvas()?(this.addMenuItems(t,
+["exportPng"],p),d.jpgSupported&&this.addMenuItems(t,["exportJpg"],p)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],p);this.addMenuItems(t,["exportSvg","-"],p);d.isOffline()||d.printPdfExport?this.addMenuItems(t,["exportPdf"],p):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],p);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(t,["exportVsdx"],p);this.addMenuItems(t,["-",
+"exportHtml","exportXml","exportUrl"],p);d.isOffline()||(t.addSeparator(p),this.addMenuItem(t,"export",p).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,p){function F(H){H.pickFile(function(G){d.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(G,function(E){var P="data:image/"==E.getData().substring(0,11)?M(E.getTitle()):"text/xml";/\.svg$/i.test(E.getTitle())&&!d.editor.isDataSvg(E.getData())&&(E.setData(Editor.createSvgDataUri(E.getData())),
P="image/svg+xml");J(E.getData(),P,E.getTitle())},function(E){d.handleError(E,null!=E?mxResources.get("errorLoadingFile"):null)},H==d.drive)},!0)}var J=mxUtils.bind(this,function(H,G,E){var P=v.view,T=v.getGraphBounds(),W=v.snap(Math.ceil(Math.max(0,T.x/P.scale-P.translate.x)+4*v.gridSize)),U=v.snap(Math.ceil(Math.max(0,(T.y+T.height)/P.scale-P.translate.y)+4*v.gridSize));"data:image/"==H.substring(0,11)?d.loadImage(H,mxUtils.bind(this,function(V){var l=!0,A=mxUtils.bind(this,function(){d.resizeImage(V,
H,mxUtils.bind(this,function(L,Q,O){L=l?Math.min(1,Math.min(d.maxImageSize/Q,d.maxImageSize/O)):1;d.importFile(H,G,W,U,Math.round(Q*L),Math.round(O*L),E,function(R){d.spinner.stop();v.setSelectionCells(R);v.scrollCellToVisible(v.getSelectionCell())})}),l)});H.length>d.resampleThreshold?d.confirmImageResize(function(L){l=L;A()}):A()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(H,G,W,U,0,0,E,function(V){d.spinner.stop();v.setSelectionCells(V);
-v.scrollCellToVisible(v.getSelectionCell())})}),M=mxUtils.bind(this,function(H){var G="text/xml";/\.png$/i.test(H)?G="image/png":/\.jpe?g$/i.test(H)?G="image/jpg":/\.gif$/i.test(H)?G="image/gif":/\.pdf$/i.test(H)&&(G="application/pdf");return G});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){F(d.drive)},m):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},m,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){F(d.oneDrive)},m):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){F(d.dropbox)},m):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},m,null,!1);t.addSeparator(m);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){F(d.gitHub)},m);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){F(d.gitLab)},m);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){F(d.trello)},m):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);t.addSeparator(m);isLocalStorage&&"0"!=urlParams.browser&&
-t.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},m);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},m);d.isOffline()||(t.addSeparator(m),t.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(d,"",mxResources.get("import"),function(G){if(null!=G&&0<G.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var E=/(\.png)($|\?)/i.test(G)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(G),function(P){J(P,E,G)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==E)}},mxResources.get("url"));d.showDialog(H.container,300,80,!0,!0);H.init()},m))}))).isEnabled=x;this.put("theme",new Menu(mxUtils.bind(this,function(t,m){var F="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=t.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},m);"kennedy"!=F&&"atlas"!=F&&"dark"!=F&&"min"!=F&&"sketch"!=
-F&&t.addCheckmark(J,Editor.checkmarkImage);t.addSeparator(m);J=t.addItem(mxResources.get("default"),null,function(){d.setCurrentTheme("kennedy")},m);"kennedy"!=F&&"dark"!=F||t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},m);"min"==F&&t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},m);"atlas"==F&&t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("sketch"),
-null,function(){d.setCurrentTheme("sketch")},m);"sketch"==F&&t.addCheckmark(J,Editor.checkmarkImage);t.addSeparator(m);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(t,["toggleDarkMode"],m)})));e=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==LocalFile&&null!=t.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(F,J){t.invalidFileHandle=null;t.fileHandle=
-F;t.title=J.name;t.desc=J;d.save(J.name)}),null,d.createFileSystemOptions(t.getTitle()));else{var m=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename;m=new FilenameDialog(this.editorUi,m,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=t&&F!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(F,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,
-null!=J?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!=F&&0<F.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(m.container,340,96,!0,!0);m.init()}}));e.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};e.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",
-mxUtils.bind(this,function(){var t=d.getCurrentFile();if(null!=t){var m=d.getCopyFilename(t);t.constructor==DriveFile?(m=new CreateDialog(d,m,mxUtils.bind(this,function(F,J){"_blank"==J?d.editor.editAsNew(d.getFileData(),F):("download"==J&&(J=App.MODE_GOOGLE),null!=F&&0<F.length&&(J==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&t.saveAs(F,mxUtils.bind(this,function(M){t.desc=M;t.save(!1,mxUtils.bind(this,function(){d.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}),
-mxUtils.bind(this,function(H){d.handleError(H)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(F,d.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(m.container,420,380,!0,!0),m.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),m)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+
-"...",function(t,m){d.appIconClicked(m)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=d.getCurrentFile();if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var m=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var F=0;F<t.desc.parents.length;F++)if(t.desc.parents[F].isRoot){m=!0;break}d.pickFolder(t.getMode(),mxUtils.bind(this,function(J){d.spinner.spin(document.body,mxResources.get("moving"))&&t.move(J,mxUtils.bind(this,function(M){d.spinner.stop()}),
-mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,m)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t,m){this.addMenuItems(t,["publishLink"],m)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var t=d.getCurrentFile();null!=t&&t.share()}catch(m){d.handleError(m)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,m){var F=
-d.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())||this.addMenuItems(t,["liveImage","-"],m);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],m);navigator.standalone||d.isOffline()||this.addMenuItems(t,["embedIframe"],m);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(t,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),m)})));d.addInsertItem=function(t,m,F,J){("plantUml"!=J||
-EditorUi.enablePlantUml&&!d.isOffline())&&t.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var M=new ParseDialog(d,F,J);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(d,F,J),d.showDialog(M.container,620,420,!0,!1);M.init()}),m,null,x())};var C=function(t){v.getModel().beginUpdate();try{t=v.addCell(t),v.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{v.getModel().endUpdate()}v.scrollCellToVisible(t);
-v.setSelectionCell(t);v.container.focus();v.editAfterInsert&&v.startEditing(t);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(v.view.getState(t))},0);return t},u=function(t,m,F,J,M){t=new mxCell(t,new mxGeometry(0,0,m,F),J);t.vertex=!0;null==M&&(M=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([t],!0)));t.geometry.x=M.x;t.geometry.y=M.y;return C(t)};d.actions.put("insertText",new Action(mxResources.get("text"),function(t){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&
+v.scrollCellToVisible(v.getSelectionCell())})}),M=mxUtils.bind(this,function(H){var G="text/xml";/\.png$/i.test(H)?G="image/png":/\.jpe?g$/i.test(H)?G="image/jpg":/\.gif$/i.test(H)?G="image/gif":/\.pdf$/i.test(H)&&(G="application/pdf");return G});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){F(d.drive)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},p,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){F(d.oneDrive)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){F(d.dropbox)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
+function(){},p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){F(d.gitHub)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){F(d.gitLab)},p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){F(d.trello)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&
+t.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},p);d.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(d,"",mxResources.get("import"),function(G){if(null!=G&&0<G.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var E=/(\.png)($|\?)/i.test(G)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+
+"?url="+encodeURIComponent(G),function(P){J(P,E,G)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==E)}},mxResources.get("url"));d.showDialog(H.container,300,80,!0,!0);H.init()},p))}))).isEnabled=x;this.put("theme",new Menu(mxUtils.bind(this,function(t,p){var F="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=t.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},p);"kennedy"!=F&&"atlas"!=F&&"dark"!=F&&"min"!=F&&"sketch"!=
+F&&t.addCheckmark(J,Editor.checkmarkImage);t.addSeparator(p);J=t.addItem(mxResources.get("default"),null,function(){d.setCurrentTheme("kennedy")},p);"kennedy"!=F&&"dark"!=F||t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},p);"min"==F&&t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},p);"atlas"==F&&t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("sketch"),
+null,function(){d.setCurrentTheme("sketch")},p);"sketch"==F&&t.addCheckmark(J,Editor.checkmarkImage);t.addSeparator(p);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(t,["toggleDarkMode"],p)})));e=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==LocalFile&&null!=t.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(F,J){t.invalidFileHandle=null;t.fileHandle=
+F;t.title=J.name;t.desc=J;d.save(J.name)}),null,d.createFileSystemOptions(t.getTitle()));else{var p=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename;p=new FilenameDialog(this.editorUi,p,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=t&&F!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(F,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,
+null!=J?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!=F&&0<F.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(p.container,340,96,!0,!0);p.init()}}));e.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};e.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",
+mxUtils.bind(this,function(){var t=d.getCurrentFile();if(null!=t){var p=d.getCopyFilename(t);t.constructor==DriveFile?(p=new CreateDialog(d,p,mxUtils.bind(this,function(F,J){"_blank"==J?d.editor.editAsNew(d.getFileData(),F):("download"==J&&(J=App.MODE_GOOGLE),null!=F&&0<F.length&&(J==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&t.saveAs(F,mxUtils.bind(this,function(M){t.desc=M;t.save(!1,mxUtils.bind(this,function(){d.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}),
+mxUtils.bind(this,function(H){d.handleError(H)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(F,d.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(p.container,420,380,!0,!0),p.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),p)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+
+"...",function(t,p){d.appIconClicked(p)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=d.getCurrentFile();if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var p=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var F=0;F<t.desc.parents.length;F++)if(t.desc.parents[F].isRoot){p=!0;break}d.pickFolder(t.getMode(),mxUtils.bind(this,function(J){d.spinner.spin(document.body,mxResources.get("moving"))&&t.move(J,mxUtils.bind(this,function(M){d.spinner.stop()}),
+mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,p)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,["publishLink"],p)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var t=d.getCurrentFile();null!=t&&t.share()}catch(p){d.handleError(p)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,p){var F=
+d.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())||this.addMenuItems(t,["liveImage","-"],p);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],p);navigator.standalone||d.isOffline()||this.addMenuItems(t,["embedIframe"],p);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(t,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),p)})));d.addInsertItem=function(t,p,F,J){("plantUml"!=J||
+EditorUi.enablePlantUml&&!d.isOffline())&&t.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var M=new ParseDialog(d,F,J);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(d,F,J),d.showDialog(M.container,620,420,!0,!1);M.init()}),p,null,x())};var C=function(t){v.getModel().beginUpdate();try{t=v.addCell(t),v.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{v.getModel().endUpdate()}v.scrollCellToVisible(t);
+v.setSelectionCell(t);v.container.focus();v.editAfterInsert&&v.startEditing(t);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(v.view.getState(t))},0);return t},u=function(t,p,F,J,M){t=new mxCell(t,new mxGeometry(0,0,p,F),J);t.vertex=!0;null==M&&(M=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([t],!0)));t.geometry.x=M.x;t.geometry.y=M.y;return C(t)};d.actions.put("insertText",new Action(mxResources.get("text"),function(t){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&
v.startEditingAtCell(u("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:v.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=x;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(t){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&u("",120,60,"whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||
mxEvent.isMetaDown(t)?null:v.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action(mxResources.get("note"),function(t){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&u("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?
null:v.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(t){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&u("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:v.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(t){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&u("",80,80,"rhombus;whiteSpace=wrap;html=1;",
-null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:v.getInsertPoint())})).isEnabled=x;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(t){if(v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())){var m=v.defaultEdgeLength;t=null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:v.getInsertPoint();null==t&&(t=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,m,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-F.geometry.setTerminalPoint(t,!0);F.geometry.setTerminalPoint(new mxPoint(t.x+F.geometry.width,t.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled=x;d.addInsertMenuItems=mxUtils.bind(this,function(t,m,F){for(var J=0;J<F.length;J++)"-"==F[J]?t.addSeparator(m):d.addInsertItem(t,m,mxResources.get(F[J])+"...",F[J])});this.put("insert",new Menu(mxUtils.bind(this,function(t,m){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
-m);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(t,["insertTemplate"],m);t.addSeparator(m);this.addSubmenu("insertLayout",t,m,mxResources.get("layout"));this.addSubmenu("insertAdvanced",t,m,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,m){d.addInsertMenuItems(t,m,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,m){d.addInsertMenuItems(t,
-m,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},m,null,x())})));this.put("openRecent",new Menu(function(t,m){var F=d.getRecent();if(null!=F){for(var J=0;J<F.length;J++)(function(M){var H=M.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");t.addItem(M.title+" ("+mxResources.get(H)+")",null,function(){d.loadFile(M.id)},m)})(F[J]);t.addSeparator(m)}t.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},
-m)}));this.put("openFrom",new Menu(function(t,m){null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},m):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},m):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},m):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);t.addSeparator(m);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},m);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+
-"...",null,function(){d.pickFile(App.MODE_GITLAB)},m);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},m):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);t.addSeparator(m);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},m);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+
-"...",null,function(){d.pickFile(App.MODE_DEVICE)},m);d.isOffline()||(t.addSeparator(m),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));d.showDialog(F.container,300,
-80,!0,!0);F.init()},m))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(t,m){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},m):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+
-"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},m):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},m):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
-m,null,!1);t.addSeparator(m);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},m);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},m);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},m):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);t.addSeparator(m);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},m);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},m)})),this.put("openLibraryFrom",new Menu(function(t,m){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},m):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},m):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},m,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},m):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);t.addSeparator(m);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},m);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},
-m);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},m):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},m,null,!1);t.addSeparator(m);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},m);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},
-m);d.isOffline()||(t.addSeparator(m),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=J;d.editor.isCorsEnabledForUrl(J)||(M=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(M,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,H.getText(),J))}catch(G){d.handleError(G,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),
-d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(F.container,300,80,!0,!0);F.init()},m));"1"==urlParams.confLib&&(t.addSeparator(m),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},m))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,m){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:v.getInsertPoint())})).isEnabled=x;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(t){if(v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())){var p=v.defaultEdgeLength;t=null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:v.getInsertPoint();null==t&&(t=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,p,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+F.geometry.setTerminalPoint(t,!0);F.geometry.setTerminalPoint(new mxPoint(t.x+F.geometry.width,t.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled=x;d.addInsertMenuItems=mxUtils.bind(this,function(t,p,F){for(var J=0;J<F.length;J++)"-"==F[J]?t.addSeparator(p):d.addInsertItem(t,p,mxResources.get(F[J])+"...",F[J])});this.put("insert",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
+p);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(t,["insertTemplate"],p);t.addSeparator(p);this.addSubmenu("insertLayout",t,p,mxResources.get("layout"));this.addSubmenu("insertAdvanced",t,p,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,p){d.addInsertMenuItems(t,p,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,p){d.addInsertMenuItems(t,
+p,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},p,null,x())})));this.put("openRecent",new Menu(function(t,p){var F=d.getRecent();if(null!=F){for(var J=0;J<F.length;J++)(function(M){var H=M.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");t.addItem(M.title+" ("+mxResources.get(H)+")",null,function(){d.loadFile(M.id)},p)})(F[J]);t.addSeparator(p)}t.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},
+p)}));this.put("openFrom",new Menu(function(t,p){null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+
+"...",null,function(){d.pickFile(App.MODE_GITLAB)},p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+
+"...",null,function(){d.pickFile(App.MODE_DEVICE)},p);d.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));d.showDialog(F.container,300,
+80,!0,!0);F.init()},p))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+
+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
+p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+
+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},p)})),this.put("openLibraryFrom",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
+(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},
+p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},
+p);d.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=J;d.editor.isCorsEnabledForUrl(J)||(M=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(M,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,H.getText(),J))}catch(G){d.handleError(G,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),
+d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(F.container,300,80,!0,!0);F.init()},p));"1"==urlParams.confLib&&(t.addSeparator(p),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},p))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
e=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var t=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(t);this.commentsWindow.refreshCommentsTime();t&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));e=this.get("viewPanels");var y=e.funct;e.funct=
-function(t,m){y.apply(this,arguments);d.menus.addMenuItems(t,["tags"],m);d.commentsSupported()&&d.menus.addMenuItems(t,["comments"],m)};this.put("view",new Menu(mxUtils.bind(this,function(t,m){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],m);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(t,"scratchpad",m);(!d.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(t,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",t,m);this.addMenuItems(t,"- scrollbars tooltips ruler - grid guides".split(" "),m);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(t,"shadowVisible",m);this.addMenuItems(t,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),m);"1"!=urlParams.sketch&&this.addMenuItems(t,
-["-","fullscreen"],m)})));if(EditorUi.isElectronApp){var I="1"==urlParams.enableSpellCheck;e=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();I=!I;d.alert(mxResources.get("restartForChangeRequired"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return I});var N="1"==urlParams.enableStoreBkp;e=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();N=!N});e.setToggleAction(!0);e.setSelectedCallback(function(){return N});d.actions.addAction("openDevTools",function(){d.openDevTools()});
-d.actions.addAction("drafts...",function(){var t=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);0<=m&&(EditorUi.draftSaveDelay=1E3*m,EditorUi.enableDrafts=0<m,mxSettings.setDraftSaveDelay(m),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(t.container,320,80,!0,!0);t.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,m){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",
-t,m),t.addSeparator(m));"1"!=urlParams.embed&&(this.addSubmenu("theme",t,m),t.addSeparator(m));if("undefined"!==typeof MathJax){var F=this.addMenuItem(t,"mathematicalTypesetting",m);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck","autoBkp","drafts"],m);this.addMenuItems(t,["copyConnect","collapseExpand","-"],m);"1"!=urlParams.embed&&(F=d.getCurrentFile(),
-null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()&&this.addMenuItems(t,["showRemoteCursors","shareCursor"],m),this.addMenuItems(t,["autosave"],m));t.addSeparator(m);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",m);this.addMenuItems(t,["-","editDiagram"],m);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(m);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],m);this.addMenuItems(t,["configuration"],
-m);t.addSeparator(m);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function J(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var M=new TemplatesDialog(d,function(H){console.log(arguments)},null,null,null,"user",function(H,G,E){var P=new Date;P.setDate(P.getDate()-7);d.drive.listFiles(null,P,E?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(J(T.items[U]));H(W)},
-G)},function(H,G,E,P){d.drive.listFiles(H,null,P?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(J(T.items[U]));G(W)},E)},function(H,G,E){d.drive.getFile(H.id,function(P){G(P.data)},E)},null,function(H){H({Test:[]},1)},!0,!1);d.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",m))})));this.put("file",new Menu(mxUtils.bind(this,function(t,m){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,m),this.addSubmenu("exportAs",
-t,m),this.addSubmenu("embed",t,m),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],m),this.addSubmenu("newLibrary",t,m),this.addSubmenu("openLibraryFrom",t,m)),d.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],m),this.addMenuItems(t,["-","pageSetup","print","-","rename"],m),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],m):(this.addMenuItems(t,["save"],m),"1"==urlParams.saveAndExit&&this.addMenuItems(t,
-["saveAndExit"],m))),"1"!=urlParams.noExitBtn&&this.addMenuItems(t,["exit"],m);else{var F=this.editorUi.getCurrentFile();if(null!=F&&F.constructor==DriveFile){F.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],m);this.addMenuItems(t,["save","-","share"],m);var J=this.addMenuItem(t,"synchronize",m);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(m)}else this.addMenuItems(t,["new"],m);this.addSubmenu("openFrom",
-t,m);isLocalStorage&&this.addSubmenu("openRecent",t,m);null!=F&&F.constructor==DriveFile?this.addMenuItems(t,"new - rename makeCopy openFolder moveToFolder".split(" "),m):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(t.addSeparator(m),J=this.addMenuItem(t,"synchronize",m),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs",
-"-"],m),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==F||this.addMenuItems(t,["share","-"],m),this.addMenuItems(t,["rename"],m),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],m):(this.addMenuItems(t,["makeCopy"],m),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],m)));t.addSeparator(m);this.addSubmenu("importFrom",t,m);this.addSubmenu("exportAs",t,m);
-t.addSeparator(m);this.addSubmenu("embed",t,m);this.addSubmenu("publish",t,m);t.addSeparator(m);this.addSubmenu("newLibrary",t,m);this.addSubmenu("openLibraryFrom",t,m);d.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],m);null!=F&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(J=null!=F.getTitle()?F.getTitle():d.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(t,["-","properties"]));
-this.addMenuItems(t,["-","pageSetup"],m);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],m);this.addMenuItems(t,["-","close"])}})));k.prototype.execute=function(){var t=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var m=t.extFonts,F=0;null!=m&&F<m.length;F++){var J=document.getElementById("extFont_"+
-m[F].name);null!=J&&J.parentNode.removeChild(J)}t.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=m};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,m){for(var F=mxUtils.bind(this,function(U,V,l,A,L){var Q=d.editor.graph;A=this.styleChange(t,A||U,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],null,m,function(){"1"!=urlParams["ext-fonts"]?Q.setFont(U,V):(document.execCommand("fontname",!1,U),Q.addExtFont(U,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],"cells",[Q.cellEditor.getEditingCell()]))},function(){Q.updateLabelElements(Q.getSelectionCells(),
+function(t,p){y.apply(this,arguments);d.menus.addMenuItems(t,["tags"],p);d.commentsSupported()&&d.menus.addMenuItems(t,["comments"],p)};this.put("view",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],p);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(t,"scratchpad",p);(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(t,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",t,p);this.addMenuItems(t,"- scrollbars tooltips ruler - grid guides".split(" "),p);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(t,"shadowVisible",p);this.addMenuItems(t,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),p);"1"!=urlParams.sketch&&this.addMenuItems(t,
+["-","fullscreen"],p)})));if(EditorUi.isElectronApp){var I="1"==urlParams.enableSpellCheck;e=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();I=!I;d.alert(mxResources.get("restartForChangeRequired"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return I});var N="1"==urlParams.enableStoreBkp;e=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();N=!N});e.setToggleAction(!0);e.setSelectedCallback(function(){return N});d.actions.addAction("openDevTools",function(){d.openDevTools()});
+d.actions.addAction("drafts...",function(){var t=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(p){p=parseInt(p);0<=p&&(EditorUi.draftSaveDelay=1E3*p,EditorUi.enableDrafts=0<p,mxSettings.setDraftSaveDelay(p),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(t.container,320,80,!0,!0);t.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,p){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",
+t,p),t.addSeparator(p));"1"!=urlParams.embed&&(this.addSubmenu("theme",t,p),t.addSeparator(p));if("undefined"!==typeof MathJax){var F=this.addMenuItem(t,"mathematicalTypesetting",p);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck","autoBkp","drafts"],p);this.addMenuItems(t,["copyConnect","collapseExpand","-"],p);"1"!=urlParams.embed&&(F=d.getCurrentFile(),
+null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()&&this.addMenuItems(t,["showRemoteCursors","shareCursor"],p),this.addMenuItems(t,["autosave"],p));t.addSeparator(p);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",p);this.addMenuItems(t,["-","editDiagram"],p);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(p);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],p);this.addMenuItems(t,["configuration"],
+p);t.addSeparator(p);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function J(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var M=new TemplatesDialog(d,function(H){console.log(arguments)},null,null,null,"user",function(H,G,E){var P=new Date;P.setDate(P.getDate()-7);d.drive.listFiles(null,P,E?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(J(T.items[U]));H(W)},
+G)},function(H,G,E,P){d.drive.listFiles(H,null,P?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(J(T.items[U]));G(W)},E)},function(H,G,E){d.drive.getFile(H.id,function(P){G(P.data)},E)},null,function(H){H({Test:[]},1)},!0,!1);d.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",p))})));this.put("file",new Menu(mxUtils.bind(this,function(t,p){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,p),this.addSubmenu("exportAs",
+t,p),this.addSubmenu("embed",t,p),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],p),this.addSubmenu("newLibrary",t,p),this.addSubmenu("openLibraryFrom",t,p)),d.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p),this.addMenuItems(t,["-","pageSetup","print","-","rename"],p),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],p):(this.addMenuItems(t,["save"],p),"1"==urlParams.saveAndExit&&this.addMenuItems(t,
+["saveAndExit"],p))),"1"!=urlParams.noExitBtn&&this.addMenuItems(t,["exit"],p);else{var F=this.editorUi.getCurrentFile();if(null!=F&&F.constructor==DriveFile){F.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],p);this.addMenuItems(t,["save","-","share"],p);var J=this.addMenuItem(t,"synchronize",p);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(p)}else this.addMenuItems(t,["new"],p);this.addSubmenu("openFrom",
+t,p);isLocalStorage&&this.addSubmenu("openRecent",t,p);null!=F&&F.constructor==DriveFile?this.addMenuItems(t,"new - rename makeCopy openFolder moveToFolder".split(" "),p):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(t.addSeparator(p),J=this.addMenuItem(t,"synchronize",p),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs",
+"-"],p),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==F||this.addMenuItems(t,["share","-"],p),this.addMenuItems(t,["rename"],p),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],p):(this.addMenuItems(t,["makeCopy"],p),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],p)));t.addSeparator(p);this.addSubmenu("importFrom",t,p);this.addSubmenu("exportAs",t,p);
+t.addSeparator(p);this.addSubmenu("embed",t,p);this.addSubmenu("publish",t,p);t.addSeparator(p);this.addSubmenu("newLibrary",t,p);this.addSubmenu("openLibraryFrom",t,p);d.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p);null!=F&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(J=null!=F.getTitle()?F.getTitle():d.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(t,["-","properties"]));
+this.addMenuItems(t,["-","pageSetup"],p);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],p);this.addMenuItems(t,["-","close"])}})));k.prototype.execute=function(){var t=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var p=t.extFonts,F=0;null!=p&&F<p.length;F++){var J=document.getElementById("extFont_"+
+p[F].name);null!=J&&J.parentNode.removeChild(J)}t.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=p};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,p){for(var F=mxUtils.bind(this,function(U,V,l,A,L){var Q=d.editor.graph;A=this.styleChange(t,A||U,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
+"1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],null,p,function(){"1"!=urlParams["ext-fonts"]?Q.setFont(U,V):(document.execCommand("fontname",!1,U),Q.addExtFont(U,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],"cells",[Q.cellEditor.getEditingCell()]))},function(){Q.updateLabelElements(Q.getSelectionCells(),
function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&Q.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&Q.addExtFont(U,V)});l&&(l=document.createElement("span"),l.className="geSprite geSprite-delete",l.style.cursor="pointer",l.style.display="inline-block",A.firstChild.nextSibling.nextSibling.appendChild(l),mxEvent.addListener(l,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[U.toLowerCase()];
for(var R=0;R<this.customFonts.length;R++)if(this.customFonts[R].name==U&&this.customFonts[R].url==V){this.customFonts.splice(R,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(R=0;R<S.length;R++)if(S[R].name==U){S.splice(R,1);break}var X=mxUtils.clone(this.customFonts);for(R=0;R<X.length;R++)if(X[R].name==U){X.splice(R,1);break}R=new k(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(R)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(O)})));Graph.addFont(U,V);A.firstChild.nextSibling.style.fontFamily=U;null!=L&&A.setAttribute("title",L)}),J={},M=0;M<this.defaultFonts.length;M++){var H=this.defaultFonts[M];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(J[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}t.addSeparator(m);if("1"!=urlParams["ext-fonts"]){H=function(U){var V=encodeURIComponent(U.name)+(null==U.url?"":"@"+encodeURIComponent(U.url));if(!J[V]){for(var l=
-U.name,A=0;null!=E[l.toLowerCase()];)l=U.name+" ("+ ++A+")";null==G[V]&&(P.push({name:U.name,url:U.url,label:l,title:U.url}),E[l.toLowerCase()]=U,G[V]=U)}};var G={},E={},P=[];for(M=0;M<this.customFonts.length;M++)H(this.customFonts[M]);for(var T in Graph.recentCustomFonts)H(Graph.recentCustomFonts[T]);P.sort(function(U,V){return U.label<V.label?-1:U.label>V.label?1:0});if(0<P.length){for(M=0;M<P.length;M++)F(P[M].name,P[M].url,!0,P[M].label,P[M].url);t.addSeparator(m)}t.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),m);t.addSeparator(m)}else{T=this.editorUi.editor.graph.extFonts;if(null!=T&&0<T.length){H={};var W=!1;for(M=0;M<this.customFonts.length;M++)H[this.customFonts[M].name]=!0;for(M=0;M<T.length;M++)H[T[M].name]||(this.customFonts.push(T[M]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=
-0;M<this.customFonts.length;M++)T=this.customFonts[M].name,H=this.customFonts[M].url,F(T,H,!0),this.editorUi.editor.graph.addExtFont(T,H,!0);t.addSeparator(m);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var U=new k(this.editorUi,[],[]);d.editor.graph.model.execute(U)}),m);t.addSeparator(m)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var U=this.editorUi.editor.graph,V=U.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],l=
+mxEvent.consume(O)})));Graph.addFont(U,V);A.firstChild.nextSibling.style.fontFamily=U;null!=L&&A.setAttribute("title",L)}),J={},M=0;M<this.defaultFonts.length;M++){var H=this.defaultFonts[M];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(J[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}t.addSeparator(p);if("1"!=urlParams["ext-fonts"]){H=function(U){var V=encodeURIComponent(U.name)+(null==U.url?"":"@"+encodeURIComponent(U.url));if(!J[V]){for(var l=
+U.name,A=0;null!=E[l.toLowerCase()];)l=U.name+" ("+ ++A+")";null==G[V]&&(P.push({name:U.name,url:U.url,label:l,title:U.url}),E[l.toLowerCase()]=U,G[V]=U)}};var G={},E={},P=[];for(M=0;M<this.customFonts.length;M++)H(this.customFonts[M]);for(var T in Graph.recentCustomFonts)H(Graph.recentCustomFonts[T]);P.sort(function(U,V){return U.label<V.label?-1:U.label>V.label?1:0});if(0<P.length){for(M=0;M<P.length;M++)F(P[M].name,P[M].url,!0,P[M].label,P[M].url);t.addSeparator(p)}t.addItem(mxResources.get("reset"),
+null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),p);t.addSeparator(p)}else{T=this.editorUi.editor.graph.extFonts;if(null!=T&&0<T.length){H={};var W=!1;for(M=0;M<this.customFonts.length;M++)H[this.customFonts[M].name]=!0;for(M=0;M<T.length;M++)H[T[M].name]||(this.customFonts.push(T[M]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=
+0;M<this.customFonts.length;M++)T=this.customFonts[M].name,H=this.customFonts[M].url,F(T,H,!0),this.editorUi.editor.graph.addExtFont(T,H,!0);t.addSeparator(p);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var U=new k(this.editorUi,[],[]);d.editor.graph.model.execute(U)}),p);t.addSeparator(p)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var U=this.editorUi.editor.graph,V=U.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],l=
"s",A=null;if("1"!=urlParams["ext-fonts"]&&U.isEditing()){var L=U.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&(V=Graph.stripQuotes(L.fontFamily),A=Graph.getFontUrl(V,null),null!=A&&(Graph.isGoogleFontUrl(A)?(A=null,l="g"):l="w")))}else L=U.getView().getState(U.getSelectionCell()),null!=L&&(V=L.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(L=L.style.fontSource,null!=L&&(L=decodeURIComponent(L),Graph.isGoogleFontUrl(L)?l="g":(l="w",A=L))):(l=L.style.FType||
l,"w"==l&&(A=this.editorUi.editor.graph.extFonts,L=null,null!=A&&(L=A.find(function(O){return O.name==V})),A=null!=L?L.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=A&&A.substring(0,PROXY_URL.length)==PROXY_URL&&(A=decodeURIComponent(A.substr((PROXY_URL+"?url=").length)));var Q=null;document.activeElement==U.cellEditor.textarea&&(Q=U.cellEditor.saveSelection());l=new FontDialog(this.editorUi,V,A,l,mxUtils.bind(this,function(O,R,S){null!=Q&&(U.cellEditor.restoreSelection(Q),Q=null);
if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&U.isEditing())U.setFont(O,R);else{U.getModel().beginUpdate();try{U.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),U.setCellStyles("fontSource",null!=R?encodeURIComponent(R):null),U.setCellStyles("FType",null)):(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(U.setCellStyles("FType",S),0==R.indexOf("http://")&&(R=PROXY_URL+"?url="+encodeURIComponent(R)),this.editorUi.editor.graph.addExtFont(O,
-R)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:R}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(l.container,380,Editor.enableWebFonts?250:180,!0,!0);l.init()}),m,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+R)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:R}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(l.container,380,Editor.enableWebFonts?250:180,!0,!0);l.init()}),p,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.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)};function RenamePage(b,f,k){this.ui=b;this.page=f;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,f,k){this.ui=b;this.oldIndex=f;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,f,k){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=k&&(f.viewState=k,this.neverShown=!1))}
@@ -12751,7 +12751,7 @@ EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.s
this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(k){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return f};
EditorUi.prototype.createControlTab=function(b,f,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=f;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
-var v=new mxPopupMenu(mxUtils.bind(this,function(D,K){var c=mxUtils.bind(this,function(){for(var n=0;n<this.pages.length;n++)mxUtils.bind(this,function(p){var z=D.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),K),C=this.pages[p].getId();z.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=C?" ["+C+"]":""));this.pages[p]==this.currentPage&&D.addCheckmark(z,Editor.checkmarkImage)})(n)}),e=mxUtils.bind(this,
+var v=new mxPopupMenu(mxUtils.bind(this,function(D,K){var c=mxUtils.bind(this,function(){for(var n=0;n<this.pages.length;n++)mxUtils.bind(this,function(m){var z=D.addItem(this.getShortPageName(this.pages[m]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[m])}),K),C=this.pages[m].getId();z.setAttribute("title",this.pages[m].getName()+" ("+(m+1)+"/"+this.pages.length+")"+(null!=C?" ["+C+"]":""));this.pages[m]==this.currentPage&&D.addCheckmark(z,Editor.checkmarkImage)})(n)}),e=mxUtils.bind(this,
function(){D.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),K)});f||c();if(this.editor.graph.isEnabled()){f||(D.addSeparator(K),e());var g=this.currentPage;if(null!=g){D.addSeparator(K);var q=this.getShortPageName(g);D.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(g)}),K);D.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),K);f||D.addSeparator(K);D.addItem(mxResources.get("duplicateIt",
[q]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),K)}}f&&(D.addSeparator(K),e(),D.addSeparator(K),c())}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});var x=mxEvent.getClientX(d),B=mxEvent.getClientY(d);v.popup(x,B,null,d);this.setCurrentMenu(v);mxEvent.consume(d)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
@@ -12770,31 +12770,31 @@ d));return d};b.beforeDecode=function(f,k,d){d.ui=f.ui;d.relatedPage=d.ui.getPag
!1),d=v.nextSibling,v.parentNode.removeChild(v),v=d;null!=v;){d=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var x=v.getAttribute("id");null==f.lookup(x)&&f.decodeCell(v)}v.parentNode.removeChild(v);v=d}}return k};b.afterDecode=function(f,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,v,x,B,D){v=null!=v?v:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var K=x.slice(),c=0;c<x.length;c++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[c]),"treeFolding","0")&&this.foldTreeCell(d,x[c]);x=K;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell=
function(d,v){this.model.beginUpdate();try{var x=[];this.traverse(v,!0,mxUtils.bind(this,function(D,K){var c=null!=K&&this.isTreeEdge(K);c&&x.push(K);D==v||null!=K&&!c||x.push(D);return(null==K||c)&&(D==v||!this.model.isCollapsed(D))}));this.model.setCollapsed(v,d);for(var B=0;B<x.length;B++)this.model.setVisible(x[B],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,v,x,B,D,K){return this.model.filterCells(this.getEdges(d,
v,x,B,D,K),mxUtils.bind(this,function(c){return this.isTreeEdge(c)}))};Graph.prototype.getIncomingTreeEdges=function(d,v){return this.getTreeEdges(d,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,v){return this.getTreeEdges(d,v,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(E){return z.isVertex(E)&&x(E)}function v(E){var P=
-!1;null!=E&&(P="1"==p.getCurrentCellStyle(E).treeMoving);return P}function x(E){var P=!1;null!=E&&(E=z.getParent(E),P=p.view.getState(E),P="tree"==(null!=P?P.style:p.getCellStyle(E)).containerType);return P}function B(E){var P=!1;null!=E&&(E=z.getParent(E),P=p.view.getState(E),p.view.getState(E),P=null!=(null!=P?P.style:p.getCellStyle(E)).childLayout);return P}function D(E){E=p.view.getState(E);if(null!=E){var P=p.getIncomingTreeEdges(E.cell);if(0<P.length&&(P=p.view.getState(P[0]),null!=P&&(P=P.absolutePoints,
-null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==E.y&&Math.abs(P.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==E.y+E.height&&Math.abs(P.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>E.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function K(E,P){P=null!=P?P:!0;p.model.beginUpdate();try{var T=p.model.getParent(E),W=p.getIncomingTreeEdges(E),U=p.cloneCells([W[0],E]);p.model.setTerminal(U[0],p.model.getTerminal(W[0],
-!0),!0);var V=D(E),l=T.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=P?E.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=P?E.geometry.height+10:-U[1].geometry.height-10;p.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var A=p.view.getState(E),L=p.view.scale;if(null!=A){var Q=mxRectangle.fromRectangle(A);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?Q.x+=(P?E.geometry.width+10:-U[1].geometry.width-10)*L:Q.y+=(P?
-E.geometry.height+10:-U[1].geometry.height-10)*L;var O=p.getOutgoingTreeEdges(p.model.getTerminal(W[0],!0));if(null!=O){for(var R=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,S=l=W=0;S<O.length;S++){var X=p.model.getTerminal(O[S],!1);if(V==D(X)){var aa=p.view.getState(X);X!=E&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY())&&mxUtils.intersects(Q,aa)&&(W=10+Math.max(W,(Math.min(Q.x+Q.width,aa.x+aa.width)-Math.max(Q.x,aa.x))/L),l=10+Math.max(l,
-(Math.min(Q.y+Q.height,aa.y+aa.height)-Math.max(Q.y,aa.y))/L))}}R?l=0:W=0;for(S=0;S<O.length;S++)if(X=p.model.getTerminal(O[S],!1),V==D(X)&&(aa=p.view.getState(X),X!=E&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY()))){var Y=[];p.traverse(aa.cell,!0,function(Z,ca){var fa=null!=ca&&p.isTreeEdge(ca);fa&&Y.push(ca);(null==ca||fa)&&Y.push(Z);return null==ca||fa});p.moveCells(Y,(P?1:-1)*W,(P?1:-1)*l)}}}return p.addCells(U,T)}finally{p.model.endUpdate()}}function c(E){p.model.beginUpdate();
-try{var P=D(E),T=p.getIncomingTreeEdges(E),W=p.cloneCells([T[0],E]);p.model.setTerminal(T[0],W[1],!1);p.model.setTerminal(W[0],W[1],!0);p.model.setTerminal(W[0],E,!1);var U=p.model.getParent(E),V=U.geometry,l=[];p.view.currentRoot!=U&&(W[1].geometry.x-=V.x,W[1].geometry.y-=V.y);p.traverse(E,!0,function(Q,O){var R=null!=O&&p.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(Q);return null==O||R});var A=E.geometry.width+40,L=E.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?A=0:P==mxConstants.DIRECTION_NORTH?
-(A=0,L=-L):P==mxConstants.DIRECTION_WEST?(A=-A,L=0):P==mxConstants.DIRECTION_EAST&&(L=0);p.moveCells(l,A,L);return p.addCells(W,U)}finally{p.model.endUpdate()}}function e(E,P){p.model.beginUpdate();try{var T=p.model.getParent(E),W=p.getIncomingTreeEdges(E),U=D(E);0==W.length&&(W=[p.createEdge(T,null,"",null,null,p.createCurrentEdgeStyle())],U=P);var V=p.cloneCells([W[0],E]);p.model.setTerminal(V[0],E,!0);if(null==p.model.getTerminal(V[0],!1)){p.model.setTerminal(V[0],V[1],!1);var l=p.getCellStyle(V[1]).newEdgeStyle;
-if(null!=l)try{var A=JSON.parse(l),L;for(L in A)p.setCellStyles(L,A[L],[V[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==A[L]&&p.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(aa){}}W=p.getOutgoingTreeEdges(E);var Q=T.geometry;P=[];p.view.currentRoot==T&&(Q=new mxRectangle);for(l=0;l<W.length;l++){var O=p.model.getTerminal(W[l],!1);null!=O&&P.push(O)}var R=p.view.getBounds(P),S=p.view.translate,X=p.view.scale;U==mxConstants.DIRECTION_SOUTH?
+!1;null!=E&&(P="1"==m.getCurrentCellStyle(E).treeMoving);return P}function x(E){var P=!1;null!=E&&(E=z.getParent(E),P=m.view.getState(E),P="tree"==(null!=P?P.style:m.getCellStyle(E)).containerType);return P}function B(E){var P=!1;null!=E&&(E=z.getParent(E),P=m.view.getState(E),m.view.getState(E),P=null!=(null!=P?P.style:m.getCellStyle(E)).childLayout);return P}function D(E){E=m.view.getState(E);if(null!=E){var P=m.getIncomingTreeEdges(E.cell);if(0<P.length&&(P=m.view.getState(P[0]),null!=P&&(P=P.absolutePoints,
+null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==E.y&&Math.abs(P.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==E.y+E.height&&Math.abs(P.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>E.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function K(E,P){P=null!=P?P:!0;m.model.beginUpdate();try{var T=m.model.getParent(E),W=m.getIncomingTreeEdges(E),U=m.cloneCells([W[0],E]);m.model.setTerminal(U[0],m.model.getTerminal(W[0],
+!0),!0);var V=D(E),l=T.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=P?E.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=P?E.geometry.height+10:-U[1].geometry.height-10;m.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var A=m.view.getState(E),L=m.view.scale;if(null!=A){var Q=mxRectangle.fromRectangle(A);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?Q.x+=(P?E.geometry.width+10:-U[1].geometry.width-10)*L:Q.y+=(P?
+E.geometry.height+10:-U[1].geometry.height-10)*L;var O=m.getOutgoingTreeEdges(m.model.getTerminal(W[0],!0));if(null!=O){for(var R=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,S=l=W=0;S<O.length;S++){var X=m.model.getTerminal(O[S],!1);if(V==D(X)){var aa=m.view.getState(X);X!=E&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY())&&mxUtils.intersects(Q,aa)&&(W=10+Math.max(W,(Math.min(Q.x+Q.width,aa.x+aa.width)-Math.max(Q.x,aa.x))/L),l=10+Math.max(l,
+(Math.min(Q.y+Q.height,aa.y+aa.height)-Math.max(Q.y,aa.y))/L))}}R?l=0:W=0;for(S=0;S<O.length;S++)if(X=m.model.getTerminal(O[S],!1),V==D(X)&&(aa=m.view.getState(X),X!=E&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY()))){var Y=[];m.traverse(aa.cell,!0,function(Z,ca){var fa=null!=ca&&m.isTreeEdge(ca);fa&&Y.push(ca);(null==ca||fa)&&Y.push(Z);return null==ca||fa});m.moveCells(Y,(P?1:-1)*W,(P?1:-1)*l)}}}return m.addCells(U,T)}finally{m.model.endUpdate()}}function c(E){m.model.beginUpdate();
+try{var P=D(E),T=m.getIncomingTreeEdges(E),W=m.cloneCells([T[0],E]);m.model.setTerminal(T[0],W[1],!1);m.model.setTerminal(W[0],W[1],!0);m.model.setTerminal(W[0],E,!1);var U=m.model.getParent(E),V=U.geometry,l=[];m.view.currentRoot!=U&&(W[1].geometry.x-=V.x,W[1].geometry.y-=V.y);m.traverse(E,!0,function(Q,O){var R=null!=O&&m.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(Q);return null==O||R});var A=E.geometry.width+40,L=E.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?A=0:P==mxConstants.DIRECTION_NORTH?
+(A=0,L=-L):P==mxConstants.DIRECTION_WEST?(A=-A,L=0):P==mxConstants.DIRECTION_EAST&&(L=0);m.moveCells(l,A,L);return m.addCells(W,U)}finally{m.model.endUpdate()}}function e(E,P){m.model.beginUpdate();try{var T=m.model.getParent(E),W=m.getIncomingTreeEdges(E),U=D(E);0==W.length&&(W=[m.createEdge(T,null,"",null,null,m.createCurrentEdgeStyle())],U=P);var V=m.cloneCells([W[0],E]);m.model.setTerminal(V[0],E,!0);if(null==m.model.getTerminal(V[0],!1)){m.model.setTerminal(V[0],V[1],!1);var l=m.getCellStyle(V[1]).newEdgeStyle;
+if(null!=l)try{var A=JSON.parse(l),L;for(L in A)m.setCellStyles(L,A[L],[V[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==A[L]&&m.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(aa){}}W=m.getOutgoingTreeEdges(E);var Q=T.geometry;P=[];m.view.currentRoot==T&&(Q=new mxRectangle);for(l=0;l<W.length;l++){var O=m.model.getTerminal(W[l],!1);null!=O&&P.push(O)}var R=m.view.getBounds(P),S=m.view.translate,X=m.view.scale;U==mxConstants.DIRECTION_SOUTH?
(V[1].geometry.x=null==R?E.geometry.x+(E.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x-Q.x+10,V[1].geometry.y+=V[1].geometry.height-Q.y+40):U==mxConstants.DIRECTION_NORTH?(V[1].geometry.x=null==R?E.geometry.x+(E.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x+-Q.x+10,V[1].geometry.y-=V[1].geometry.height+Q.y+40):(V[1].geometry.x=U==mxConstants.DIRECTION_WEST?V[1].geometry.x-(V[1].geometry.width+Q.x+40):V[1].geometry.x+(V[1].geometry.width-Q.x+40),V[1].geometry.y=null==R?E.geometry.y+
-(E.geometry.height-V[1].geometry.height)/2:(R.y+R.height)/X-S.y+-Q.y+10);return p.addCells(V,T)}finally{p.model.endUpdate()}}function g(E,P,T){E=p.getOutgoingTreeEdges(E);T=p.view.getState(T);var W=[];if(null!=T&&null!=E){for(var U=0;U<E.length;U++){var V=p.view.getState(p.model.getTerminal(E[U],!1));null!=V&&(!P&&Math.min(V.x+V.width,T.x+T.width)>=Math.max(V.x,T.x)||P&&Math.min(V.y+V.height,T.y+T.height)>=Math.max(V.y,T.y))&&W.push(V)}W.sort(function(l,A){return P?l.x+l.width-A.x-A.width:l.y+l.height-
-A.y-A.height})}return W}function q(E,P){var T=D(E),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==W&&T!=P?n.actions.get("selectParent").funct():T==P?(P=p.getOutgoingTreeEdges(E),null!=P&&0<P.length&&p.setSelectionCell(p.model.getTerminal(P[0],!1))):(T=p.getIncomingTreeEdges(E),null!=T&&0<T.length&&(W=g(p.model.getTerminal(T[0],!0),W,E),E=p.view.getState(E),null!=E&&(E=mxUtils.indexOf(W,E),0<=E&&(E+=P==mxConstants.DIRECTION_NORTH||
-P==mxConstants.DIRECTION_WEST?-1:1,0<=E&&E<=W.length-1&&p.setSelectionCell(W[E].cell)))))}var n=this,p=n.editor.graph,z=p.getModel(),C=n.menus.createPopupMenu;n.menus.createPopupMenu=function(E,P,T){C.apply(this,arguments);if(1==p.getSelectionCount()){P=p.getSelectionCell();var W=p.getOutgoingTreeEdges(P);E.addSeparator();0<W.length&&(d(p.getSelectionCell())&&this.addMenuItems(E,["selectChildren"],null,T),this.addMenuItems(E,["selectDescendants"],null,T));d(p.getSelectionCell())?(E.addSeparator(),
-0<p.getIncomingTreeEdges(P).length&&this.addMenuItems(E,["selectSiblings","selectParent"],null,T)):0<p.model.getEdgeCount(P)&&this.addMenuItems(E,["selectConnections"],null,T)}};n.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var E=p.getSelectionCell();E=p.getOutgoingTreeEdges(E);if(null!=E){for(var P=[],T=0;T<E.length;T++)P.push(p.model.getTerminal(E[T],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&
-1==p.getSelectionCount()){var E=p.getSelectionCell();E=p.getIncomingTreeEdges(E);if(null!=E&&0<E.length&&(E=p.getOutgoingTreeEdges(p.model.getTerminal(E[0],!0)),null!=E)){for(var P=[],T=0;T<E.length;T++)P.push(p.model.getTerminal(E[T],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var E=p.getSelectionCell();E=p.getIncomingTreeEdges(E);null!=E&&0<E.length&&p.setSelectionCell(p.model.getTerminal(E[0],
-!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(E,P){E=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(E)){if(null!=P&&mxEvent.isAltDown(P))p.setSelectionCells(p.model.getTreeEdges(E,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var T=[];p.traverse(E,!0,function(W,U){var V=null!=U&&p.isTreeEdge(U);V&&T.push(U);null!=U&&!V||null!=P&&mxEvent.isShiftDown(P)||T.push(W);return null==U||V})}p.setSelectionCells(T)}},null,null,"Alt+Shift+D");
-var u=p.removeCells;p.removeCells=function(E,P){P=null!=P?P:!0;null==E&&(E=this.getDeletableCells(this.getSelectionCells()));P&&(E=this.getDeletableCells(this.addAllEdges(E)));for(var T=[],W=0;W<E.length;W++){var U=E[W];z.isEdge(U)&&x(U)&&(T.push(U),U=z.getTerminal(U,!1));if(d(U)){var V=[];p.traverse(U,!0,function(l,A){var L=null!=A&&p.isTreeEdge(A);L&&V.push(A);(null==A||L)&&V.push(l);return null==A||L});0<V.length&&(T=T.concat(V),U=p.getIncomingTreeEdges(E[W]),E=E.concat(U))}else null!=U&&T.push(E[W])}E=
-T;return u.apply(this,arguments)};n.hoverIcons.getStateAt=function(E,P,T){return d(E.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,T))};var y=p.duplicateCells;p.duplicateCells=function(E,P){E=null!=E?E:this.getSelectionCells();for(var T=E.slice(0),W=0;W<T.length;W++){var U=p.view.getState(T[W]);if(null!=U&&d(U.cell)){var V=p.getIncomingTreeEdges(U.cell);for(U=0;U<V.length;U++)mxUtils.remove(V[U],E)}}this.model.beginUpdate();try{var l=y.call(this,E,P);if(l.length==E.length)for(W=0;W<E.length;W++)if(d(E[W])){var A=
-p.getIncomingTreeEdges(l[W]);V=p.getIncomingTreeEdges(E[W]);if(0==A.length&&0<V.length){var L=this.cloneCell(V[0]);this.addEdge(L,p.getDefaultParent(),this.model.getTerminal(V[0],!0),l[W])}}}finally{this.model.endUpdate()}return l};var I=p.moveCells;p.moveCells=function(E,P,T,W,U,V,l){var A=null;this.model.beginUpdate();try{var L=U,Q=this.getCurrentCellStyle(U);if(null!=E&&d(U)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var O=0;O<E.length;O++)if(d(E[O])||p.model.isEdge(E[O])&&null==p.model.getTerminal(E[O],
-!0)){U=p.model.getParent(E[O]);break}if(null!=L&&U!=L&&null!=this.view.getState(E[0])){var R=p.getIncomingTreeEdges(E[0]);if(0<R.length){var S=p.view.getState(p.model.getTerminal(R[0],!0));if(null!=S){var X=p.view.getState(L);null!=X&&(P=(X.getCenterX()-S.getCenterX())/p.view.scale,T=(X.getCenterY()-S.getCenterY())/p.view.scale)}}}}A=I.apply(this,arguments);if(null!=A&&null!=E&&A.length==E.length)for(O=0;O<A.length;O++)if(this.model.isEdge(A[O]))d(L)&&0>mxUtils.indexOf(A,this.model.getTerminal(A[O],
-!0))&&this.model.setTerminal(A[O],L,!0);else if(d(E[O])&&(R=p.getIncomingTreeEdges(E[O]),0<R.length))if(!W)d(L)&&0>mxUtils.indexOf(E,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],L,!0);else if(0==p.getIncomingTreeEdges(A[O]).length){Q=L;if(null==Q||Q==p.model.getParent(E[O]))Q=p.model.getTerminal(R[0],!0);W=this.cloneCell(R[0]);this.addEdge(W,p.getDefaultParent(),Q,A[O])}}finally{this.model.endUpdate()}return A};if(null!=n.sidebar){var N=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=
-function(E,P,T,W){var U=p.model,V=null;U.beginUpdate();try{if(V=N.apply(this,arguments),d(E))for(var l=0;l<V.length;l++)if(U.isEdge(V[l])&&null==U.getTerminal(V[l],!0)){U.setTerminal(V[l],E,!0);var A=p.getCellGeometry(V[l]);A.points=null;null!=A.getTerminalPoint(!0)&&A.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return V}}var t={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},m=n.onKeyDown;n.onKeyDown=function(E){try{if(p.isEnabled()&&
-!p.isEditing()&&d(p.getSelectionCell())&&1==p.getSelectionCount()){var P=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==E.which?P=mxEvent.isShiftDown(E)?c(p.getSelectionCell()):e(p.getSelectionCell()):13==E.which&&(P=K(p.getSelectionCell(),!mxEvent.isShiftDown(E))));if(null!=P&&0<P.length)1==P.length&&p.model.isEdge(P[0])?p.setSelectionCell(p.model.getTerminal(P[0],!1)):p.setSelectionCell(P[P.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(p.view.getState(p.getSelectionCell())),
-p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(E);else if(mxEvent.isAltDown(E)&&mxEvent.isShiftDown(E)){var T=t[E.keyCode];null!=T&&(T.funct(E),mxEvent.consume(E))}else 37==E.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(E)):38==E.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(E)):39==E.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(E)):40==E.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(E))}}catch(W){n.handleError(W)}mxEvent.isConsumed(E)||m.apply(this,arguments)};var F=p.connectVertex;p.connectVertex=function(E,P,T,W,U,V,l){var A=p.getIncomingTreeEdges(E);if(d(E)){var L=D(E),Q=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return L==P||0==A.length?e(E,P):Q==O?c(E):K(E,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};p.getSubtree=function(E){var P=
-[E];!v(E)&&!d(E)||B(E)||p.traverse(E,!0,function(T,W){var U=null!=W&&p.isTreeEdge(W);U&&0>mxUtils.indexOf(P,W)&&P.push(W);(null==W||U)&&0>mxUtils.indexOf(P,T)&&P.push(T);return null==W||U});return P};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.apply(this,arguments);(v(this.state.cell)||d(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+(E.geometry.height-V[1].geometry.height)/2:(R.y+R.height)/X-S.y+-Q.y+10);return m.addCells(V,T)}finally{m.model.endUpdate()}}function g(E,P,T){E=m.getOutgoingTreeEdges(E);T=m.view.getState(T);var W=[];if(null!=T&&null!=E){for(var U=0;U<E.length;U++){var V=m.view.getState(m.model.getTerminal(E[U],!1));null!=V&&(!P&&Math.min(V.x+V.width,T.x+T.width)>=Math.max(V.x,T.x)||P&&Math.min(V.y+V.height,T.y+T.height)>=Math.max(V.y,T.y))&&W.push(V)}W.sort(function(l,A){return P?l.x+l.width-A.x-A.width:l.y+l.height-
+A.y-A.height})}return W}function q(E,P){var T=D(E),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==W&&T!=P?n.actions.get("selectParent").funct():T==P?(P=m.getOutgoingTreeEdges(E),null!=P&&0<P.length&&m.setSelectionCell(m.model.getTerminal(P[0],!1))):(T=m.getIncomingTreeEdges(E),null!=T&&0<T.length&&(W=g(m.model.getTerminal(T[0],!0),W,E),E=m.view.getState(E),null!=E&&(E=mxUtils.indexOf(W,E),0<=E&&(E+=P==mxConstants.DIRECTION_NORTH||
+P==mxConstants.DIRECTION_WEST?-1:1,0<=E&&E<=W.length-1&&m.setSelectionCell(W[E].cell)))))}var n=this,m=n.editor.graph,z=m.getModel(),C=n.menus.createPopupMenu;n.menus.createPopupMenu=function(E,P,T){C.apply(this,arguments);if(1==m.getSelectionCount()){P=m.getSelectionCell();var W=m.getOutgoingTreeEdges(P);E.addSeparator();0<W.length&&(d(m.getSelectionCell())&&this.addMenuItems(E,["selectChildren"],null,T),this.addMenuItems(E,["selectDescendants"],null,T));d(m.getSelectionCell())?(E.addSeparator(),
+0<m.getIncomingTreeEdges(P).length&&this.addMenuItems(E,["selectSiblings","selectParent"],null,T)):0<m.model.getEdgeCount(P)&&this.addMenuItems(E,["selectConnections"],null,T)}};n.actions.addAction("selectChildren",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var E=m.getSelectionCell();E=m.getOutgoingTreeEdges(E);if(null!=E){for(var P=[],T=0;T<E.length;T++)P.push(m.model.getTerminal(E[T],!1));m.setSelectionCells(P)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(m.isEnabled()&&
+1==m.getSelectionCount()){var E=m.getSelectionCell();E=m.getIncomingTreeEdges(E);if(null!=E&&0<E.length&&(E=m.getOutgoingTreeEdges(m.model.getTerminal(E[0],!0)),null!=E)){for(var P=[],T=0;T<E.length;T++)P.push(m.model.getTerminal(E[T],!1));m.setSelectionCells(P)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var E=m.getSelectionCell();E=m.getIncomingTreeEdges(E);null!=E&&0<E.length&&m.setSelectionCell(m.model.getTerminal(E[0],
+!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(E,P){E=m.getSelectionCell();if(m.isEnabled()&&m.model.isVertex(E)){if(null!=P&&mxEvent.isAltDown(P))m.setSelectionCells(m.model.getTreeEdges(E,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var T=[];m.traverse(E,!0,function(W,U){var V=null!=U&&m.isTreeEdge(U);V&&T.push(U);null!=U&&!V||null!=P&&mxEvent.isShiftDown(P)||T.push(W);return null==U||V})}m.setSelectionCells(T)}},null,null,"Alt+Shift+D");
+var u=m.removeCells;m.removeCells=function(E,P){P=null!=P?P:!0;null==E&&(E=this.getDeletableCells(this.getSelectionCells()));P&&(E=this.getDeletableCells(this.addAllEdges(E)));for(var T=[],W=0;W<E.length;W++){var U=E[W];z.isEdge(U)&&x(U)&&(T.push(U),U=z.getTerminal(U,!1));if(d(U)){var V=[];m.traverse(U,!0,function(l,A){var L=null!=A&&m.isTreeEdge(A);L&&V.push(A);(null==A||L)&&V.push(l);return null==A||L});0<V.length&&(T=T.concat(V),U=m.getIncomingTreeEdges(E[W]),E=E.concat(U))}else null!=U&&T.push(E[W])}E=
+T;return u.apply(this,arguments)};n.hoverIcons.getStateAt=function(E,P,T){return d(E.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,T))};var y=m.duplicateCells;m.duplicateCells=function(E,P){E=null!=E?E:this.getSelectionCells();for(var T=E.slice(0),W=0;W<T.length;W++){var U=m.view.getState(T[W]);if(null!=U&&d(U.cell)){var V=m.getIncomingTreeEdges(U.cell);for(U=0;U<V.length;U++)mxUtils.remove(V[U],E)}}this.model.beginUpdate();try{var l=y.call(this,E,P);if(l.length==E.length)for(W=0;W<E.length;W++)if(d(E[W])){var A=
+m.getIncomingTreeEdges(l[W]);V=m.getIncomingTreeEdges(E[W]);if(0==A.length&&0<V.length){var L=this.cloneCell(V[0]);this.addEdge(L,m.getDefaultParent(),this.model.getTerminal(V[0],!0),l[W])}}}finally{this.model.endUpdate()}return l};var I=m.moveCells;m.moveCells=function(E,P,T,W,U,V,l){var A=null;this.model.beginUpdate();try{var L=U,Q=this.getCurrentCellStyle(U);if(null!=E&&d(U)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var O=0;O<E.length;O++)if(d(E[O])||m.model.isEdge(E[O])&&null==m.model.getTerminal(E[O],
+!0)){U=m.model.getParent(E[O]);break}if(null!=L&&U!=L&&null!=this.view.getState(E[0])){var R=m.getIncomingTreeEdges(E[0]);if(0<R.length){var S=m.view.getState(m.model.getTerminal(R[0],!0));if(null!=S){var X=m.view.getState(L);null!=X&&(P=(X.getCenterX()-S.getCenterX())/m.view.scale,T=(X.getCenterY()-S.getCenterY())/m.view.scale)}}}}A=I.apply(this,arguments);if(null!=A&&null!=E&&A.length==E.length)for(O=0;O<A.length;O++)if(this.model.isEdge(A[O]))d(L)&&0>mxUtils.indexOf(A,this.model.getTerminal(A[O],
+!0))&&this.model.setTerminal(A[O],L,!0);else if(d(E[O])&&(R=m.getIncomingTreeEdges(E[O]),0<R.length))if(!W)d(L)&&0>mxUtils.indexOf(E,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],L,!0);else if(0==m.getIncomingTreeEdges(A[O]).length){Q=L;if(null==Q||Q==m.model.getParent(E[O]))Q=m.model.getTerminal(R[0],!0);W=this.cloneCell(R[0]);this.addEdge(W,m.getDefaultParent(),Q,A[O])}}finally{this.model.endUpdate()}return A};if(null!=n.sidebar){var N=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=
+function(E,P,T,W){var U=m.model,V=null;U.beginUpdate();try{if(V=N.apply(this,arguments),d(E))for(var l=0;l<V.length;l++)if(U.isEdge(V[l])&&null==U.getTerminal(V[l],!0)){U.setTerminal(V[l],E,!0);var A=m.getCellGeometry(V[l]);A.points=null;null!=A.getTerminalPoint(!0)&&A.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return V}}var t={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},p=n.onKeyDown;n.onKeyDown=function(E){try{if(m.isEnabled()&&
+!m.isEditing()&&d(m.getSelectionCell())&&1==m.getSelectionCount()){var P=null;0<m.getIncomingTreeEdges(m.getSelectionCell()).length&&(9==E.which?P=mxEvent.isShiftDown(E)?c(m.getSelectionCell()):e(m.getSelectionCell()):13==E.which&&(P=K(m.getSelectionCell(),!mxEvent.isShiftDown(E))));if(null!=P&&0<P.length)1==P.length&&m.model.isEdge(P[0])?m.setSelectionCell(m.model.getTerminal(P[0],!1)):m.setSelectionCell(P[P.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(m.view.getState(m.getSelectionCell())),
+m.startEditingAtCell(m.getSelectionCell()),mxEvent.consume(E);else if(mxEvent.isAltDown(E)&&mxEvent.isShiftDown(E)){var T=t[E.keyCode];null!=T&&(T.funct(E),mxEvent.consume(E))}else 37==E.keyCode?(q(m.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(E)):38==E.keyCode?(q(m.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(E)):39==E.keyCode?(q(m.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(E)):40==E.keyCode&&(q(m.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(E))}}catch(W){n.handleError(W)}mxEvent.isConsumed(E)||p.apply(this,arguments)};var F=m.connectVertex;m.connectVertex=function(E,P,T,W,U,V,l){var A=m.getIncomingTreeEdges(E);if(d(E)){var L=D(E),Q=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return L==P||0==A.length?e(E,P):Q==O?c(E):K(E,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};m.getSubtree=function(E){var P=
+[E];!v(E)&&!d(E)||B(E)||m.traverse(E,!0,function(T,W){var U=null!=W&&m.isTreeEdge(W);U&&0>mxUtils.indexOf(P,W)&&P.push(W);(null==W||U)&&0>mxUtils.indexOf(P,T)&&P.push(T);return null==W||U});return P};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.apply(this,arguments);(v(this.state.cell)||d(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(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.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(E){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(E),mxEvent.getClientY(E),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(E);
this.graph.isMouseDown=!0;n.hoverIcons.reset();mxEvent.consume(E)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);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 H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(E){H.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=E?"":"none")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(E,P){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),v=this.graph;return d.concat([this.addEntry("tree container",
@@ -12804,7 +12804,7 @@ x.vertex=!0;var B=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellip
D.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");K.geometry.relative=!0;K.edge=!0;B.insertEdge(K,!0);D.insertEdge(K,!1);var c=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};');
c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;B.insertEdge(e,!0);c.insertEdge(e,!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};');
g.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;B.insertEdge(q,!0);g.insertEdge(q,!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};');
-n.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;B.insertEdge(p,!0);n.insertEdge(p,!1);x.insert(K);x.insert(e);x.insert(q);x.insert(p);x.insert(B);x.insert(D);x.insert(c);x.insert(g);x.insert(n);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",
+n.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");m.geometry.relative=!0;m.edge=!0;B.insertEdge(m,!0);n.insertEdge(m,!1);x.insert(K);x.insert(e);x.insert(q);x.insert(m);x.insert(B);x.insert(D);x.insert(c);x.insert(g);x.insert(n);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
x.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.setTerminalPoint(new mxPoint(-40,40),!0);B.geometry.relative=!0;B.edge=!0;x.insertEdge(B,!1);return sb.createVertexTemplateFromCells([x,B],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,72,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};');
x.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.setTerminalPoint(new mxPoint(-40,40),!0);B.geometry.relative=!0;B.edge=!0;x.insertEdge(B,!1);return sb.createVertexTemplateFromCells([x,B],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -12817,9 +12817,9 @@ B.geometry.setTerminalPoint(new mxPoint(110,-40),!0);B.geometry.relative=!0;B.ed
!0;K.edge=!0;D.insertEdge(K,!1);return sb.createVertexTemplateFromCells([B,K,x,D],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(u,y){if(EditorUi.windowed){var I=u.editor.graph;I.popupMenuHandler.hideMenu();if(null==u.formatWindow){y="1"==urlParams.sketch?Math.max(10,u.diagramContainer.clientWidth-241):Math.max(10,u.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);u.formatWindow=new WrapperWindow(u,mxResources.get("format"),y,N,240,I,
function(t){t=u.createFormat(t);t.init();return t});u.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){u.formatWindow.window.fit()}));u.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else u.formatWindow.window.setVisible(null!=y?y:!u.formatWindow.window.isVisible())}else null==u.formatElt&&(u.formatElt=u.createSidebarContainer(),u.createFormat(u.formatElt).init(),u.formatElt.style.border="none",u.formatElt.style.width="240px",u.formatElt.style.borderLeft="1px solid gray",
-u.formatElt.style.right="0px"),I=u.diagramContainer.parentNode,null!=u.formatElt.parentNode?(u.formatElt.parentNode.removeChild(u.formatElt),I.style.right="0px"):(I.parentNode.appendChild(u.formatElt),I.style.right=u.formatElt.style.width)}function f(u,y){function I(F,J){var M=u.menus.get(F);F=m.addMenu(J,mxUtils.bind(this,function(){M.funct.apply(this,arguments)}));F.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+u.formatElt.style.right="0px"),I=u.diagramContainer.parentNode,null!=u.formatElt.parentNode?(u.formatElt.parentNode.removeChild(u.formatElt),I.style.right="0px"):(I.parentNode.appendChild(u.formatElt),I.style.right=u.formatElt.style.width)}function f(u,y){function I(F,J){var M=u.menus.get(F);F=p.addMenu(J,mxUtils.bind(this,function(){M.funct.apply(this,arguments)}));F.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
F.className="geTitle";y.appendChild(F);return F}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var t=document.createElement("span");t.style.fontSize="18px";t.style.marginRight="5px";t.innerHTML="+";N.appendChild(t);mxUtils.write(N,mxResources.get("moreShapes"));y.appendChild(N);mxEvent.addListener(N,"click",function(){u.actions.get("shapes").funct()});
-var m=new Menubar(u,y);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=u.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("newLibrary")),N.appendChild(t),
+var p=new Menubar(u,y);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=u.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("newLibrary")),N.appendChild(t),
y.appendChild(N),mxEvent.addListener(N,"click",u.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("openLibrary")),N.appendChild(t),y.appendChild(N),mxEvent.addListener(N,
"click",u.actions.get("openLibrary").funct)):(N=I("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=I("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");y.appendChild(u.sidebar.container);y.style.overflow="hidden"}
function k(u,y){if(EditorUi.windowed){var I=u.editor.graph;I.popupMenuHandler.hideMenu();if(null==u.sidebarWindow){y=Math.min(I.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);u.sidebarWindow=new WrapperWindow(u,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-N)/2):56,y-6,N-6,function(t){f(u,t)});u.sidebarWindow.window.addListener(mxEvent.SHOW,
@@ -12844,7 +12844,7 @@ u.smartSeparators=!0;e.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()
u?u:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),
this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=
null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);q.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(u){n.apply(this,arguments);if(u){var y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=y&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
-null!=this.formatWindow&&(1E3<=y||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var u=this.editorUi,y=u.editor.graph;u.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";u.actions.get("createShape").label=
+null!=this.formatWindow&&(1E3<=y||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var m=Menus.prototype.init;Menus.prototype.init=function(){m.apply(this,arguments);var u=this.editorUi,y=u.editor.graph;u.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";u.actions.get("createShape").label=
mxResources.get("shape")+"...";u.actions.get("outline").label=mxResources.get("outline")+"...";u.actions.get("layers").label=mxResources.get("layers")+"...";u.actions.get("tags").label=mxResources.get("tags")+"...";u.actions.get("comments").label=mxResources.get("comments")+"...";var I=u.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(H){u.setSketchMode(!Editor.sketchMode)}));I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.sketchMode});I=u.actions.put("togglePagesVisible",
new Action(mxResources.get("pages"),function(H){u.setPagesVisible(!Editor.pagesVisible)}));I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});u.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){y.popupMenuHandler.hideMenu();u.showImportCsvDialog()}));u.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var H=new ParseDialog(u,"Insert from Text");u.showDialog(H.container,620,420,!0,!1);H.init()}));u.actions.put("formatSql",
new Action(mxResources.get("formatSql")+"...",function(){var H=new ParseDialog(u,"Insert from Text","formatSql");u.showDialog(H.container,620,420,!0,!1);H.init()}));u.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(u)},null,null,Editor.ctrlKey+"+Shift+K"));u.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(u)})).shortcut=u.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!u.isOffline()&&
@@ -12858,88 +12858,88 @@ H,G),isLocalStorage&&this.addSubmenu("openRecent",H,G),H.addSeparator(G),null!=E
H,G);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!u.commentsSupported()||u.menus.addMenuItems(H,["-","comments"],G);u.menus.addMenuItems(H,"- findReplace layers tags - pageSetup".split(" "),G);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||u.menus.addMenuItems(H,["print"],G);"1"!=urlParams.sketch&&null!=E&&null!=u.fileNode&&"1"!=urlParams.embedInline&&(E=null!=E.getTitle()?E.getTitle():u.defaultFilename,/(\.html)$/i.test(E)||/(\.svg)$/i.test(E)||this.addMenuItems(H,
["-","properties"]));H.addSeparator(G);u.menus.addSubmenu("help",H,G);"1"==urlParams.embed||u.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||u.mode==App.MODE_ATLAS)&&u.menus.addMenuItems(H,["-","exit"],G):"1"!=urlParams.noFileMenu&&u.menus.addMenuItems(H,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(H,G){var E=u.getCurrentFile();null!=E&&E.constructor==DriveFile?u.menus.addMenuItems(H,["save","makeCopy","-","rename","moveToFolder"],G):(u.menus.addMenuItems(H,["save","saveAs",
"-","rename"],G),u.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(H,["upload"],G):u.menus.addMenuItems(H,["makeCopy"],G));u.menus.addMenuItems(H,["-","autosave"],G);null!=E&&E.isRevisionHistorySupported()&&u.menus.addMenuItems(H,["-","revisionHistory"],G)})));var t=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(H,G){t.funct(H,G);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.menus.addMenuItems(H,["publishLink"],G);
-u.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(H.addSeparator(G),u.menus.addSubmenu("embed",H,G))})));var m=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(H,G){u.menus.addInsertTableCellItem(H,G)})));var F=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(H,G){F.funct(H,G);this.addMenuItems(H,["-","pageScale","-","ruler"],G)})));this.put("extras",new Menu(mxUtils.bind(this,function(H,G){null!=m&&u.menus.addSubmenu("language",H,G);"1"!=urlParams.embed&&
+u.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(H.addSeparator(G),u.menus.addSubmenu("embed",H,G))})));var p=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(H,G){u.menus.addInsertTableCellItem(H,G)})));var F=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(H,G){F.funct(H,G);this.addMenuItems(H,["-","pageScale","-","ruler"],G)})));this.put("extras",new Menu(mxUtils.bind(this,function(H,G){null!=p&&u.menus.addSubmenu("language",H,G);"1"!=urlParams.embed&&
"1"!=urlParams.extAuth&&u.mode!=App.MODE_ATLAS&&u.menus.addSubmenu("theme",H,G);u.menus.addSubmenu("units",H,G);H.addSeparator(G);"1"!=urlParams.sketch&&u.menus.addMenuItems(H,["scrollbars","-","tooltips","copyConnect","collapseExpand"],G);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&u.mode!=App.MODE_ATLAS&&u.menus.addMenuItems(H,["-","showStartScreen","search","scratchpad"],G);H.addSeparator(G);"1"==urlParams.sketch&&u.menus.addMenuItems(H,
["copyConnect","collapseExpand","tooltips","-"],G);EditorUi.isElectronApp&&u.menus.addMenuItems(H,["-","spellCheck","autoBkp","drafts","-"],G);var E=u.getCurrentFile();null!=E&&E.isRealtimeEnabled()&&E.isRealtimeSupported()&&this.addMenuItems(H,["-","showRemoteCursors","shareCursor","-"],G);Graph.translateDiagram&&u.menus.addMenuItems(H,["diagramLanguage"],G);u.mode!=App.MODE_ATLAS&&u.menus.addMenuItem(H,"configuration",G);"1"!=urlParams.sketch&&!u.isOfflineApp()&&isLocalStorage&&u.mode!=App.MODE_ATLAS&&
u.menus.addMenuItem(H,"plugins",G);H.addSeparator(G)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(H,G){u.menus.addMenuItems(H,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),G)})));mxUtils.bind(this,function(){var H=this.get("insert"),G=H.funct;H.funct=function(E,P){"1"==urlParams.sketch?(u.menus.addMenuItems(E,["toggleShapes"],P),u.menus.addSubmenu("table",E,P),E.addSeparator(P),u.insertTemplateEnabled&&!u.isOffline()&&u.menus.addMenuItems(E,
["insertTemplate"],P),u.menus.addMenuItems(E,["insertImage","insertLink","-"],P),u.menus.addSubmenu("insertAdvanced",E,P,mxResources.get("advanced")),u.menus.addSubmenu("layout",E,P)):(G.apply(this,arguments),u.menus.addSubmenu("table",E,P))}})();var J="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),M=function(H,G,E,P){H.addItem(E,null,mxUtils.bind(this,function(){var T=new CreateGraphDialog(u,E,P);u.showDialog(T.container,620,420,!0,!1);T.init()}),
G)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(H,G){for(var E=0;E<J.length;E++)"-"==J[E]?H.addSeparator(G):M(H,G,mxResources.get(J[E])+"...",J[E])})))};EditorUi.prototype.installFormatToolbar=function(u){var y=this.editor.graph,I=document.createElement("div");I.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%;";y.getSelectionModel().addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(N,t){0<y.getSelectionCount()?(u.appendChild(I),I.innerHTML="Selected: "+y.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var u=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){u.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",
-this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function u(da,ba,na){var ea=m.menus.get(da),
-ha=H.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ea.funct.apply(this,arguments)}),M);ha.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ha.style.display="inline-block";ha.style.boxSizing="border-box";ha.style.top="6px";ha.style.marginRight="6px";ha.style.height="30px";ha.style.paddingTop="6px";ha.style.paddingBottom="6px";ha.style.cursor="pointer";ha.setAttribute("title",mxResources.get(da));m.menus.menuCreated(ea,ha,"geMenuItem");null!=na?(ha.style.backgroundImage="url("+
+this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function u(da,ba,na){var ea=p.menus.get(da),
+ha=H.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ea.funct.apply(this,arguments)}),M);ha.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ha.style.display="inline-block";ha.style.boxSizing="border-box";ha.style.top="6px";ha.style.marginRight="6px";ha.style.height="30px";ha.style.paddingTop="6px";ha.style.paddingBottom="6px";ha.style.cursor="pointer";ha.setAttribute("title",mxResources.get(da));p.menus.menuCreated(ea,ha,"geMenuItem");null!=na?(ha.style.backgroundImage="url("+
na+")",ha.style.backgroundPosition="center center",ha.style.backgroundRepeat="no-repeat",ha.style.backgroundSize="24px 24px",ha.style.width="34px",ha.innerText=""):ba||(ha.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ha.style.backgroundPosition="right 6px center",ha.style.backgroundRepeat="no-repeat",ha.style.paddingRight="22px");return ha}function y(da,ba,na,ea,ha,oa){var ma=document.createElement("a");ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display=
-"inline-block";ma.style.boxSizing="border-box";ma.style.height="30px";ma.style.padding="6px";ma.style.position="relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=m.statusContainer?J.insertBefore(ma,m.statusContainer):J.appendChild(ma);null!=oa?(ma.style.backgroundImage="url("+oa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",
+"inline-block";ma.style.boxSizing="border-box";ma.style.height="30px";ma.style.padding="6px";ma.style.position="relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=p.statusContainer?J.insertBefore(ma,p.statusContainer):J.appendChild(ma);null!=oa?(ma.style.backgroundImage="url("+oa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",
ma.style.backgroundSize="24px 24px",ma.style.width="34px"):mxUtils.write(ma,da);mxEvent.addListener(ma,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(va){va.preventDefault()}));mxEvent.addListener(ma,"click",function(va){"disabled"!=ma.getAttribute("disabled")&&ba(va);mxEvent.consume(va)});null==na&&(ma.style.marginRight="4px");null!=ea&&ma.setAttribute("title",ea);null!=ha&&(da=function(){ha.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled",
"disabled"),ma.style.cursor="default")},ha.addListener("stateChanged",da),F.addListener("enabledChanged",da),da());return ma}function I(da,ba,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var ea=0;ea<da.length;ea++)null!=da[ea]&&("1"==urlParams.sketch&&
-(da[ea].style.padding="10px 8px",da[ea].style.width="30px"),da[ea].style.margin="0px",da[ea].style.boxShadow="none",na.appendChild(da[ea]));null!=ba&&mxUtils.setOpacity(na,ba);null!=m.statusContainer&&"1"!=urlParams.sketch?J.insertBefore(na,m.statusContainer):J.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(A.style.left=58>l.offsetTop-l.offsetHeight/2?"70px":"10px");else{for(var da=J.firstChild;null!=da;){var ba=da.nextSibling;"geMenuItem"!=da.className&&
-"geItem"!=da.className||da.parentNode.removeChild(da);da=ba}M=J.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>d||"1"==urlParams.sketch;var na=null;da||(na=u("diagram"));ba=da?u("diagram",null,Editor.menuImage):null;null!=ba&&(na=ba);I([na,y(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),da?Editor.shapesImage:null),y(mxResources.get("format"),m.actions.get("toggleFormat").funct,
-null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ba=u("insert",!0,da?U:null);I([ba,y(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=d&&(I([Ea,za],60),520<=d&&I([Ba,640<=d?y("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ia,Editor.zoomInImage):null,640<=d?y("",qa.funct,!0,mxResources.get("zoomOut")+
-" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&m.appIconClicked(ea)}),null,null));ba=m.menus.get("language");null!=ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==wa&&(ba=H.addMenu("",ba.funct),ba.setAttribute("title",
-mxResources.get("language")),ba.className="geToolbarButton",ba.style.backgroundImage="url("+Editor.globeImage+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.position="absolute",ba.style.height="24px",ba.style.width="24px",ba.style.zIndex="1",ba.style.right="8px",ba.style.cursor="pointer",ba.style.top="1"==urlParams.embed?"12px":"11px",J.appendChild(ba),wa=ba),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight=
+(da[ea].style.padding="10px 8px",da[ea].style.width="30px"),da[ea].style.margin="0px",da[ea].style.boxShadow="none",na.appendChild(da[ea]));null!=ba&&mxUtils.setOpacity(na,ba);null!=p.statusContainer&&"1"!=urlParams.sketch?J.insertBefore(na,p.statusContainer):J.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(A.style.left=58>l.offsetTop-l.offsetHeight/2?"70px":"10px");else{for(var da=J.firstChild;null!=da;){var ba=da.nextSibling;"geMenuItem"!=da.className&&
+"geItem"!=da.className||da.parentNode.removeChild(da);da=ba}M=J.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>d||"1"==urlParams.sketch;var na=null;da||(na=u("diagram"));ba=da?u("diagram",null,Editor.menuImage):null;null!=ba&&(na=ba);I([na,y(mxResources.get("shapes"),p.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),p.actions.get("image"),da?Editor.shapesImage:null),y(mxResources.get("format"),p.actions.get("toggleFormat").funct,
+null,mxResources.get("format")+" ("+p.actions.get("formatPanel").shortcut+")",p.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ba=u("insert",!0,da?U:null);I([ba,y(mxResources.get("delete"),p.actions.get("delete").funct,null,mxResources.get("delete"),p.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=d&&(I([Ea,za],60),520<=d&&I([Ba,640<=d?y("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ia,Editor.zoomInImage):null,640<=d?y("",qa.funct,!0,mxResources.get("zoomOut")+
+" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&p.appIconClicked(ea)}),null,null));ba=p.menus.get("language");null!=ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==wa&&(ba=H.addMenu("",ba.funct),ba.setAttribute("title",
+mxResources.get("language")),ba.className="geToolbarButton",ba.style.backgroundImage="url("+Editor.globeImage+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.position="absolute",ba.style.height="24px",ba.style.width="24px",ba.style.zIndex="1",ba.style.right="8px",ba.style.cursor="pointer",ba.style.top="1"==urlParams.embed?"12px":"11px",J.appendChild(ba),wa=ba),p.buttonContainer.style.paddingRight="34px"):(p.buttonContainer.style.paddingRight=
"4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}C.apply(this,arguments);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(t);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
-0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var m=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==m.embedViewport)mxUtils.fit(this.div);
-else{var da=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),na=m.embedViewport.x+m.embedViewport.width,ea=parseInt(this.div.offsetTop),ha=parseInt(this.div.offsetHeight),oa=m.embedViewport.y+m.embedViewport.height;this.div.style.left=Math.max(m.embedViewport.x,Math.min(da,na-ba))+"px";this.div.style.top=Math.max(m.embedViewport.y,Math.min(ea,oa-ha))+"px";this.div.style.height=Math.min(m.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(m.embedViewport.width,
-parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>t)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));m=this;var F=m.editor.graph;
-m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var J=document.createElement("div");J.className="geMenubarContainer";var M=null,H=new Menubar(m,J);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var G=m.hideCurrentMenu;
-m.hideCurrentMenu=function(){G.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var E=m.descriptorChanged;m.descriptorChanged=function(){E.apply(this,arguments);var da=m.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ba=da.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);J.setAttribute("title",da.getTitle()+(null!=ba?" ("+ba+")":""))}else J.removeAttribute("title")};m.setStatusText(m.editor.getStatus());
-J.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";J.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-t=m.diagramContainer.parentNode;var P=document.createElement("div");P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";m.titlebar=document.createElement("div");m.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var T=document.createElement("div");
-T.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";m.titlebar.appendChild(T);t.appendChild(m.titlebar)}T=m.menus.get("viewZoom");var W=T.funct;T.funct=function(da,ba){W.apply(this,arguments);m.menus.addMenuItems(da,["outline","-","fullscreen","toggleDarkMode"],ba)};var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):
-null,l="1"==urlParams.sketch?document.createElement("div"):null,A="1"==urlParams.sketch?document.createElement("div"):null,L=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)A.style.left="10px",A.style.top="10px",l.style.left="10px",l.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top=
-"0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height="";else{var da=m.diagramContainer.getAttribute("data-bounds");if(null!=da){m.diagramContainer.style.background="transparent";m.diagramContainer.removeAttribute("data-bounds");var ba=F.getGraphBounds();da=da.split(" ");m.diagramContainer.style.top=da[0];m.diagramContainer.style.left=da[1];m.diagramContainer.style.width=
-ba.width+50+"px";m.diagramContainer.style.height=ba.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}A.style.left=m.diagramContainer.offsetLeft+"px";A.style.top=m.diagramContainer.offsetTop-A.offsetHeight-4+"px";l.style.display="";l.style.left=m.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=m.diagramContainer.offsetTop+
-"px";V.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=A.style.top;V.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/
-2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=m.bottomResizer.style.visibility;J.style.display="none";A.style.visibility="";V.style.visibility=""}),Q=m.actions.get("fullscreen"),O=y("",Q.funct,null,mxResources.get(""),Q,Editor.fullscreenImage),R=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?
-Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";L()});Q=mxUtils.bind(this,function(){b(m,!0);m.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);R()});m.addListener("inlineFullscreenChanged",R);m.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",
-Q);m.addListener("editInlineStop",mxUtils.bind(this,function(da){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}));if(null!=m.hoverIcons){var S=m.hoverIcons.update;m.hoverIcons.update=function(){F.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=F.freehand){var X=F.freehand.createStyle;
-F.freehand.createStyle=function(da){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){l.className="geToolbarContainer";V.className="geToolbarContainer";A.className="geToolbarContainer";J.className="geToolbarContainer";m.picker=l;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=m.getServiceName()&&(mxEvent.addListener(J,"mouseenter",function(){m.statusContainer.style.display="inline-block"}),mxEvent.addListener(J,"mouseleave",function(){aa||(m.statusContainer.style.display="none")}));
-var Y=mxUtils.bind(this,function(da){null!=m.notificationBtn&&(null!=da?m.notificationBtn.setAttribute("title",da):m.notificationBtn.removeAttribute("title"))});J.style.visibility=20>J.clientWidth?"hidden":"";m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=m.getServiceName())if(m.statusContainer.style.display="inline-block",aa=!0,1==m.statusContainer.children.length&&""==m.editor.getStatus())J.style.visibility=
-"hidden";else{if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var da=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();Y(da);var ba=m.getCurrentFile();ba=null!=ba?ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ba)+
-"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ba))+'..."src="'+Editor.tailSpin+'">',m.statusContainer.style.display="inline-block",aa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",aa=!1)}else m.statusContainer.style.display="inline-block",Y(null),aa=!0;J.style.visibility=20>J.clientWidth&&!aa?"hidden":""}}));ua=u("diagram",null,Editor.menuImage);ua.style.boxShadow="none";ua.style.padding="6px";ua.style.margin="0px";A.appendChild(ua);
-mxEvent.disableContextMenu(ua);mxEvent.addGestureListeners(ua,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display=
-"inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";
+0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var p=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==p.embedViewport)mxUtils.fit(this.div);
+else{var da=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),na=p.embedViewport.x+p.embedViewport.width,ea=parseInt(this.div.offsetTop),ha=parseInt(this.div.offsetHeight),oa=p.embedViewport.y+p.embedViewport.height;this.div.style.left=Math.max(p.embedViewport.x,Math.min(da,na-ba))+"px";this.div.style.top=Math.max(p.embedViewport.y,Math.min(ea,oa-ha))+"px";this.div.style.height=Math.min(p.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(p.embedViewport.width,
+parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>t)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));p=this;var F=p.editor.graph;
+p.toolbar=this.createToolbar(p.createDiv("geToolbar"));p.defaultLibraryName=mxResources.get("untitledLibrary");var J=document.createElement("div");J.className="geMenubarContainer";var M=null,H=new Menubar(p,J);p.statusContainer=p.createStatusContainer();p.statusContainer.style.position="relative";p.statusContainer.style.maxWidth="";p.statusContainer.style.marginTop="7px";p.statusContainer.style.marginLeft="6px";p.statusContainer.style.color="gray";p.statusContainer.style.cursor="default";var G=p.hideCurrentMenu;
+p.hideCurrentMenu=function(){G.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var E=p.descriptorChanged;p.descriptorChanged=function(){E.apply(this,arguments);var da=p.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ba=da.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);J.setAttribute("title",da.getTitle()+(null!=ba?" ("+ba+")":""))}else J.removeAttribute("title")};p.setStatusText(p.editor.getStatus());
+J.appendChild(p.statusContainer);p.buttonContainer=document.createElement("div");p.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";J.appendChild(p.buttonContainer);p.menubarContainer=p.buttonContainer;p.tabContainer=document.createElement("div");p.tabContainer.className="geTabContainer";p.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
+t=p.diagramContainer.parentNode;var P=document.createElement("div");P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";p.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";p.titlebar=document.createElement("div");p.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var T=document.createElement("div");
+T.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";p.titlebar.appendChild(T);t.appendChild(p.titlebar)}T=p.menus.get("viewZoom");var W=T.funct;T.funct=function(da,ba){W.apply(this,arguments);p.menus.addMenuItems(da,["outline","-","fullscreen","toggleDarkMode"],ba)};var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):
+null,l="1"==urlParams.sketch?document.createElement("div"):null,A="1"==urlParams.sketch?document.createElement("div"):null,L=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)A.style.left="10px",A.style.top="10px",l.style.left="10px",l.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",p.diagramContainer.setAttribute("data-bounds",p.diagramContainer.style.top+" "+p.diagramContainer.style.left+" "+p.diagramContainer.style.width+" "+p.diagramContainer.style.height),p.diagramContainer.style.top=
+"0px",p.diagramContainer.style.left="0px",p.diagramContainer.style.bottom="0px",p.diagramContainer.style.right="0px",p.diagramContainer.style.width="",p.diagramContainer.style.height="";else{var da=p.diagramContainer.getAttribute("data-bounds");if(null!=da){p.diagramContainer.style.background="transparent";p.diagramContainer.removeAttribute("data-bounds");var ba=F.getGraphBounds();da=da.split(" ");p.diagramContainer.style.top=da[0];p.diagramContainer.style.left=da[1];p.diagramContainer.style.width=
+ba.width+50+"px";p.diagramContainer.style.height=ba.height+46+"px";p.diagramContainer.style.bottom="";p.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:p.diagramContainer.getBoundingClientRect()}),"*");p.refresh()}A.style.left=p.diagramContainer.offsetLeft+"px";A.style.top=p.diagramContainer.offsetTop-A.offsetHeight-4+"px";l.style.display="";l.style.left=p.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=p.diagramContainer.offsetTop+
+"px";V.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=A.style.top;V.style.right="";p.bottomResizer.style.left=p.diagramContainer.offsetLeft+(p.diagramContainer.offsetWidth-p.bottomResizer.offsetWidth)/2+"px";p.bottomResizer.style.top=p.diagramContainer.offsetTop+p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight/2-1+"px";p.rightResizer.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-p.rightResizer.offsetWidth/
+2-1+"px";p.rightResizer.style.top=p.diagramContainer.offsetTop+(p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight)/2+"px"}p.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";p.rightResizer.style.visibility=p.bottomResizer.style.visibility;J.style.display="none";A.style.visibility="";V.style.visibility=""}),Q=p.actions.get("fullscreen"),O=y("",Q.funct,null,mxResources.get(""),Q,Editor.fullscreenImage),R=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?
+Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";L()});Q=mxUtils.bind(this,function(){b(p,!0);p.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);R()});p.addListener("inlineFullscreenChanged",R);p.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&p.addListener("darkModeChanged",
+Q);p.addListener("editInlineStop",mxUtils.bind(this,function(da){p.diagramContainer.style.width="10px";p.diagramContainer.style.height="10px";p.diagramContainer.style.border="";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}));if(null!=p.hoverIcons){var S=p.hoverIcons.update;p.hoverIcons.update=function(){F.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=F.freehand){var X=F.freehand.createStyle;
+F.freehand.createStyle=function(da){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){l.className="geToolbarContainer";V.className="geToolbarContainer";A.className="geToolbarContainer";J.className="geToolbarContainer";p.picker=l;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=p.getServiceName()&&(mxEvent.addListener(J,"mouseenter",function(){p.statusContainer.style.display="inline-block"}),mxEvent.addListener(J,"mouseleave",function(){aa||(p.statusContainer.style.display="none")}));
+var Y=mxUtils.bind(this,function(da){null!=p.notificationBtn&&(null!=da?p.notificationBtn.setAttribute("title",da):p.notificationBtn.removeAttribute("title"))});J.style.visibility=20>J.clientWidth?"hidden":"";p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=p.getServiceName())if(p.statusContainer.style.display="inline-block",aa=!0,1==p.statusContainer.children.length&&""==p.editor.getStatus())J.style.visibility=
+"hidden";else{if(0==p.statusContainer.children.length||1==p.statusContainer.children.length&&"function"===typeof p.statusContainer.firstChild.getAttribute&&null==p.statusContainer.firstChild.getAttribute("class")){var da=null!=p.statusContainer.firstChild&&"function"===typeof p.statusContainer.firstChild.getAttribute?p.statusContainer.firstChild.getAttribute("title"):p.editor.getStatus();Y(da);var ba=p.getCurrentFile();ba=null!=ba?ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ba)+
+"..."?(p.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ba))+'..."src="'+Editor.tailSpin+'">',p.statusContainer.style.display="inline-block",aa=!0):6<p.buttonContainer.clientWidth&&(p.statusContainer.style.display="none",aa=!1)}else p.statusContainer.style.display="inline-block",Y(null),aa=!0;J.style.visibility=20>J.clientWidth&&!aa?"hidden":""}}));ua=u("diagram",null,Editor.menuImage);ua.style.boxShadow="none";ua.style.padding="6px";ua.style.margin="0px";A.appendChild(ua);
+mxEvent.disableContextMenu(ua);mxEvent.addGestureListeners(ua,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),null,null);p.statusContainer.style.position="";p.statusContainer.style.display="none";p.statusContainer.style.margin="0px";p.statusContainer.style.padding="6px 0px";p.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";p.statusContainer.style.display=
+"inline-block";p.statusContainer.style.textOverflow="ellipsis";p.buttonContainer.style.position="";p.buttonContainer.style.paddingRight="0px";p.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";
Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var ca=!1,fa=mxUtils.bind(this,function(){l.innerText="";if(!ca){var da=function(ba,na,ea,ha){null!=na&&ba.setAttribute("title",na);ba.style.cursor=null!=ea?ea:"default";ba.style.margin="2px 0px";l.appendChild(ba);mxUtils.br(l);null!=ha&&(ba.style.position="relative",ba.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,
-ha),ba.appendChild(na));return ba};da(m.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ba=new mxCell("",new mxGeometry(0,0,F.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ba.geometry.setTerminalPoint(new mxPoint(0,0),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,0),!1);ba.geometry.points=[];ba.geometry.relative=!0;ba.edge=!0;da(m.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,ba.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ba=ba.clone();ba.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ba.geometry.width=F.defaultEdgeLength+20;ba.geometry.setTerminalPoint(new mxPoint(0,20),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,20),!1);da(m.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ba,na,ea,ha){ba=y("",ba.funct,null,na,ba,ea);ba.style.width="40px";ba.style.height="34px";ba.style.opacity="0.7";return da(ba,null,"pointer",ha)})(m.actions.get("insertFreehand"),mxResources.get("freehand")+
+ha),ba.appendChild(na));return ba};da(p.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(p.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(p.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(p.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ba=new mxCell("",new mxGeometry(0,0,F.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ba.geometry.setTerminalPoint(new mxPoint(0,0),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,0),!1);ba.geometry.points=[];ba.geometry.relative=!0;ba.edge=!0;da(p.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,ba.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ba=ba.clone();ba.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+ba.geometry.width=F.defaultEdgeLength+20;ba.geometry.setTerminalPoint(new mxPoint(0,20),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,20),!1);da(p.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ba,na,ea,ha){ba=y("",ba.funct,null,na,ba,ea);ba.style.width="40px";ba.style.height="34px";ba.style.opacity="0.7";return da(ba,null,"pointer",ha)})(p.actions.get("insertFreehand"),mxResources.get("freehand")+
" (X)",Editor.freehandImage,"X");ua=u("insert",null,Editor.plusImage);ua.style.boxShadow="none";ua.style.opacity="0.7";ua.style.padding="6px";ua.style.margin="0px";ua.style.height="34px";ua.style.width="37px";da(ua,null,"pointer")}"1"!=urlParams.embedInline&&l.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(l.style,"transform","translate(0, -50%)"),l.style.padding="8px 6px 4px",l.style.top="50%",l.style.bottom="",l.style.height="",Z.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ca=!1,fa()):(l.innerText="",l.appendChild(Z),mxUtils.setPrefixedStyle(l.style,"transform","translate(0, 0)"),l.style.top="",l.style.bottom="12px",l.style.padding="0px",l.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ca=!0)}));fa();m.addListener("darkModeChanged",
-fa);m.addListener("sketchModeChanged",fa)}else m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=T){var la=function(da){if(mxEvent.isAltDown(da))m.hideCurrentMenu(),m.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))m.hideCurrentMenu(),m.actions.get("smartFit").funct(),mxEvent.consume(da)},ia=m.actions.get("zoomIn"),qa=m.actions.get("zoomOut");Q=m.actions.get("resetView");
-var ka=m.actions.get("undo"),Da=m.actions.get("redo"),Ea=y("",ka.funct,null,mxResources.get("undo")+" ("+ka.shortcut+")",ka,Editor.undoImage),za=y("",Da.funct,null,mxResources.get("redo")+" ("+Da.shortcut+")",Da,Editor.redoImage);if(null!=V){Q=function(){ra.style.display=null!=m.pages&&("0"!=urlParams.pages||1<m.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Oa=function(){ra.innerText="";if(null!=m.currentPage){mxUtils.write(ra,m.currentPage.getName());var da=null!=m.pages?m.pages.length:
-1,ba=m.getPageIndex(m.currentPage);ba=null!=ba?ba+1:1;var na=m.currentPage.getId();ra.setAttribute("title",m.currentPage.getName()+" ("+ba+"/"+da+")"+(null!=na?" ["+na+"]":""))}},Aa=m.actions.get("delete"),Ga=y("",Aa.funct,null,mxResources.get("delete"),Aa,Editor.trashImage);Ga.style.opacity="0.1";A.appendChild(Ga);Aa.addListener("stateChanged",function(){Ga.style.opacity=Aa.enabled?"":"0.1"});var Ia=function(){Ea.style.display=0<m.editor.undoManager.history.length||F.isEditing()?"inline-block":"none";
+"url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ca=!1,fa()):(l.innerText="",l.appendChild(Z),mxUtils.setPrefixedStyle(l.style,"transform","translate(0, 0)"),l.style.top="",l.style.bottom="12px",l.style.padding="0px",l.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ca=!0)}));fa();p.addListener("darkModeChanged",
+fa);p.addListener("sketchModeChanged",fa)}else p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus())}));if(null!=T){var la=function(da){if(mxEvent.isAltDown(da))p.hideCurrentMenu(),p.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))p.hideCurrentMenu(),p.actions.get("smartFit").funct(),mxEvent.consume(da)},ia=p.actions.get("zoomIn"),qa=p.actions.get("zoomOut");Q=p.actions.get("resetView");
+var ka=p.actions.get("undo"),Da=p.actions.get("redo"),Ea=y("",ka.funct,null,mxResources.get("undo")+" ("+ka.shortcut+")",ka,Editor.undoImage),za=y("",Da.funct,null,mxResources.get("redo")+" ("+Da.shortcut+")",Da,Editor.redoImage);if(null!=V){Q=function(){ra.style.display=null!=p.pages&&("0"!=urlParams.pages||1<p.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Oa=function(){ra.innerText="";if(null!=p.currentPage){mxUtils.write(ra,p.currentPage.getName());var da=null!=p.pages?p.pages.length:
+1,ba=p.getPageIndex(p.currentPage);ba=null!=ba?ba+1:1;var na=p.currentPage.getId();ra.setAttribute("title",p.currentPage.getName()+" ("+ba+"/"+da+")"+(null!=na?" ["+na+"]":""))}},Aa=p.actions.get("delete"),Ga=y("",Aa.funct,null,mxResources.get("delete"),Aa,Editor.trashImage);Ga.style.opacity="0.1";A.appendChild(Ga);Aa.addListener("stateChanged",function(){Ga.style.opacity=Aa.enabled?"":"0.1"});var Ia=function(){Ea.style.display=0<p.editor.undoManager.history.length||F.isEditing()?"inline-block":"none";
za.style.display=Ea.style.display;Ea.style.opacity=ka.enabled?"":"0.1";za.style.opacity=Da.enabled?"":"0.1"};A.appendChild(Ea);A.appendChild(za);ka.addListener("stateChanged",Ia);Da.addListener("stateChanged",Ia);Ia();var ra=this.createPageMenuTab(!1,!0);ra.style.display="none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border=
-"";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";V.appendChild(ra);m.editor.addListener("pagesPatched",Oa);m.editor.addListener("pageSelected",Oa);m.editor.addListener("pageRenamed",Oa);m.editor.addListener("fileLoaded",Oa);Oa();m.addListener("fileDescriptorChanged",Q);m.addListener("pagesVisibleChanged",Q);m.editor.addListener("pagesPatched",
+"";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";V.appendChild(ra);p.editor.addListener("pagesPatched",Oa);p.editor.addListener("pageSelected",Oa);p.editor.addListener("pageRenamed",Oa);p.editor.addListener("fileLoaded",Oa);Oa();p.addListener("fileDescriptorChanged",Q);p.addListener("pagesVisibleChanged",Q);p.editor.addListener("pagesPatched",
Q);Q();Q=y("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",qa,Editor.zoomOutImage);V.appendChild(Q);var ua=H.addMenu("100%",T.funct);ua.setAttribute("title",mxResources.get("zoom"));ua.innerHTML="100%";ua.style.display="inline-block";ua.style.color="inherit";ua.style.cursor="pointer";ua.style.textAlign="center";ua.style.whiteSpace="nowrap";ua.style.paddingRight="10px";ua.style.textDecoration="none";ua.style.verticalAlign="top";ua.style.padding="6px 0";ua.style.fontSize=
-"14px";ua.style.width="40px";ua.style.opacity="0.4";V.appendChild(ua);T=y("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ia,Editor.zoomInImage);V.appendChild(T);"1"==urlParams.embedInline?(V.appendChild(O),T=m.actions.get("exit"),V.appendChild(y("",T.funct,null,mxResources.get("exit"),T,Editor.closeImage))):O.parentNode.removeChild(O);m.tabContainer.style.visibility="hidden";J.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+"14px";ua.style.width="40px";ua.style.opacity="0.4";V.appendChild(ua);T=y("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ia,Editor.zoomInImage);V.appendChild(T);"1"==urlParams.embedInline?(V.appendChild(O),T=p.actions.get("exit"),V.appendChild(y("",T.funct,null,mxResources.get("exit"),T,Editor.closeImage))):O.parentNode.removeChild(O);p.tabContainer.style.visibility="hidden";J.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
A.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(A);P.appendChild(V);l.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
mxClient.IS_POINTER&&(l.style.touchAction="none");P.appendChild(l);window.setTimeout(function(){mxUtils.setPrefixedStyle(l.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var Ba=y("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);J.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ua=H.addMenu("100%",
-T.funct);ua.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ua.style.whiteSpace="nowrap";ua.style.paddingRight="10px";ua.style.textDecoration="none";ua.style.textDecoration="none";ua.style.overflow="hidden";ua.style.visibility="hidden";ua.style.textAlign="center";ua.style.cursor="pointer";ua.style.height=parseInt(m.tabContainerHeight)-1+"px";ua.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px";ua.style.position="absolute";ua.style.display="block";ua.style.fontSize="12px";ua.style.width=
-"59px";ua.style.right="0px";ua.style.bottom="0px";ua.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ua.style.backgroundPosition="right 6px center";ua.style.backgroundRepeat="no-repeat";P.appendChild(ua)}(function(da){mxEvent.addListener(da,"click",la);var ba=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*m.editor.graph.view.scale)+"%")});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ba);m.editor.addListener("resetGraphView",ba);m.editor.addListener("pageSelected",
-ba)})(ua);var Fa=m.setGraphEnabled;m.setGraphEnabled=function(){Fa.apply(this,arguments);null!=this.tabContainer&&(ua.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}P.appendChild(J);P.appendChild(m.diagramContainer);t.appendChild(P);m.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&P.appendChild(m.tabContainer);
-var wa=null;N();mxEvent.addListener(window,"resize",function(){N();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";l.style.transform="";mxEvent.addGestureListeners(m.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==m.diagramContainer.parentNode&&(m.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),m.sendEmbeddedSvgExport())});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";m.diagramContainer.parentNode.appendChild(t);m.bottomResizer=t;var La=null,ja=null,xa=null,sa=null;mxEvent.addGestureListeners(t,function(da){sa=parseInt(m.diagramContainer.style.height);ja=mxEvent.getClientY(da);F.popupMenuHandler.hideMenu();mxEvent.consume(da)});t=t.cloneNode(!1);t.style.cursor="col-resize";m.diagramContainer.parentNode.appendChild(t);m.rightResizer=t;mxEvent.addGestureListeners(t,function(da){xa=parseInt(m.diagramContainer.style.width);La=mxEvent.getClientX(da);F.popupMenuHandler.hideMenu();
-mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ba=!1;null!=La&&(m.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(da)-La)+"px",ba=!0);null!=ja&&(m.diagramContainer.style.height=Math.max(20,sa+mxEvent.getClientY(da)-ja)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:m.diagramContainer.getBoundingClientRect()}),"*"),L(),m.refresh())},function(da){null==La&&null==
-ja||mxEvent.consume(da);ja=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}"1"==urlParams.prefetchFonts&&m.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,v,x,B){var D=v.y,K=v.x,c=!1,e=!1;if(null!=this.states&&null!=d&&null!=v){var g=this,q=new mxCellState,n=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);q.x=d.x+K;q.y=d.y+D;q.width=d.width;q.height=d.height;for(var z=[],C=[],u=0;u<this.states.length;u++){var y=this.states[u];y instanceof mxCellState&&(B||!this.graph.isCellSelected(y.cell))&&((q.x>=y.x&&q.x<=y.x+y.width||y.x>=q.x&&y.x<=q.x+q.width)&&(q.y>
-y.y+y.height+4||q.y+q.height+4<y.y)?z.push(y):(q.y>=y.y&&q.y<=y.y+y.height||y.y>=q.y&&y.y<=q.y+q.height)&&(q.x>y.x+y.width+4||q.x+q.width+4<y.x)&&C.push(y))}var I=0,N=0,t=y=0,m=0,F=0,J=0,M=0,H=5*n;if(1<z.length){z.push(q);z.sort(function(T,W){return T.y-W.y});var G=!1;u=q==z[0];n=q==z[z.length-1];if(!u&&!n)for(u=1;u<z.length-1;u++)if(q==z[u]){n=z[u-1];u=z[u+1];y=N=t=(u.y-n.y-n.height-q.height)/2;break}for(u=0;u<z.length-1;u++){n=z[u];var E=z[u+1],P=q==n||q==E;E=E.y-n.y-n.height;G|=q==n;if(0==N&&0==
-I)N=E,I=1;else if(Math.abs(N-E)<=(P||1==u&&G?p:0))I+=1;else if(1<I&&G){z=z.slice(0,u+1);break}else if(3<=z.length-u&&!G)I=0,y=N=0!=t?t:0,z.splice(0,0==u?1:u),u=-1;else break;0!=y||P||(N=y=E)}3==z.length&&z[1]==q&&(y=0)}if(1<C.length){C.push(q);C.sort(function(T,W){return T.x-W.x});G=!1;u=q==C[0];n=q==C[C.length-1];if(!u&&!n)for(u=1;u<C.length-1;u++)if(q==C[u]){n=C[u-1];u=C[u+1];J=F=M=(u.x-n.x-n.width-q.width)/2;break}for(u=0;u<C.length-1;u++){n=C[u];E=C[u+1];P=q==n||q==E;E=E.x-n.x-n.width;G|=q==n;
-if(0==F&&0==m)F=E,m=1;else if(Math.abs(F-E)<=(P||1==u&&G?p:0))m+=1;else if(1<m&&G){C=C.slice(0,u+1);break}else if(3<=C.length-u&&!G)m=0,J=F=0!=M?M:0,C.splice(0,0==u?1:u),u=-1;else break;0!=J||P||(F=J=E)}3==C.length&&C[1]==q&&(J=0)}p=function(T,W,U,V){var l=[];if(V){V=H;var A=0}else V=0,A=H;l.push(new mxPoint(T.x-V,T.y-A));l.push(new mxPoint(T.x+V,T.y+A));l.push(T);l.push(W);l.push(new mxPoint(W.x-V,W.y-A));l.push(new mxPoint(W.x+V,W.y+A));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};F=function(T,W){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(W&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<m&&m==C.length-1){m=[];M=g.guidesArrHor;c=[];K=0;u=C[0]==q?1:0;G=C[u].y+C[u].height;if(0<J)for(u=0;u<C.length-1;u++)n=
-C[u],E=C[u+1],q==n?(K=E.x-n.width-J,c.push(new mxPoint(K+n.width+H,G)),c.push(new mxPoint(E.x-H,G))):q==E?(c.push(new mxPoint(n.x+n.width+H,G)),K=n.x+n.width+J,c.push(new mxPoint(K-H,G))):(c.push(new mxPoint(n.x+n.width+H,G)),c.push(new mxPoint(E.x-H,G)));else n=C[0],u=C[2],K=n.x+n.width+(u.x-n.x-n.width-q.width)/2,c.push(new mxPoint(n.x+n.width+H,G)),c.push(new mxPoint(K-H,G)),c.push(new mxPoint(K+q.width+H,G)),c.push(new mxPoint(u.x-H,G));for(u=0;u<c.length;u+=2)C=c[u],J=c[u+1],C=p(C,J,null!=M?
-M[u/2]:null),C.node.style.visibility="visible",C.redraw(),m.push(C);for(u=c.length/2;null!=M&&u<M.length;u++)M[u].destroy();g.guidesArrHor=m;K-=d.x;c=!0}else F(!0);if(1<I&&I==z.length-1){m=[];M=g.guidesArrVer;e=[];D=0;u=z[0]==q?1:0;I=z[u].x+z[u].width;if(0<y)for(u=0;u<z.length-1;u++)n=z[u],E=z[u+1],q==n?(D=E.y-n.height-y,e.push(new mxPoint(I,D+n.height+H)),e.push(new mxPoint(I,E.y-H))):q==E?(e.push(new mxPoint(I,n.y+n.height+H)),D=n.y+n.height+y,e.push(new mxPoint(I,D-H))):(e.push(new mxPoint(I,n.y+
-n.height+H)),e.push(new mxPoint(I,E.y-H)));else n=z[0],u=z[2],D=n.y+n.height+(u.y-n.y-n.height-q.height)/2,e.push(new mxPoint(I,n.y+n.height+H)),e.push(new mxPoint(I,D-H)),e.push(new mxPoint(I,D+q.height+H)),e.push(new mxPoint(I,u.y-H));for(u=0;u<e.length;u+=2)C=e[u],J=e[u+1],C=p(C,J,null!=M?M[u/2]:null,!0),C.node.style.visibility="visible",C.redraw(),m.push(C);for(u=e.length/2;null!=M&&u<M.length;u++)M[u].destroy();g.guidesArrVer=m;D-=d.y;e=!0}else F(!1,!0)}if(c||e)return q=new mxPoint(K,D),z=b.call(this,
+T.funct);ua.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ua.style.whiteSpace="nowrap";ua.style.paddingRight="10px";ua.style.textDecoration="none";ua.style.textDecoration="none";ua.style.overflow="hidden";ua.style.visibility="hidden";ua.style.textAlign="center";ua.style.cursor="pointer";ua.style.height=parseInt(p.tabContainerHeight)-1+"px";ua.style.lineHeight=parseInt(p.tabContainerHeight)+1+"px";ua.style.position="absolute";ua.style.display="block";ua.style.fontSize="12px";ua.style.width=
+"59px";ua.style.right="0px";ua.style.bottom="0px";ua.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ua.style.backgroundPosition="right 6px center";ua.style.backgroundRepeat="no-repeat";P.appendChild(ua)}(function(da){mxEvent.addListener(da,"click",la);var ba=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*p.editor.graph.view.scale)+"%")});p.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ba);p.editor.addListener("resetGraphView",ba);p.editor.addListener("pageSelected",
+ba)})(ua);var Fa=p.setGraphEnabled;p.setGraphEnabled=function(){Fa.apply(this,arguments);null!=this.tabContainer&&(ua.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}P.appendChild(J);P.appendChild(p.diagramContainer);t.appendChild(P);p.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&P.appendChild(p.tabContainer);
+var wa=null;N();mxEvent.addListener(window,"resize",function(){N();null!=p.sidebarWindow&&p.sidebarWindow.window.fit();null!=p.formatWindow&&p.formatWindow.window.fit();null!=p.actions.outlineWindow&&p.actions.outlineWindow.window.fit();null!=p.actions.layersWindow&&p.actions.layersWindow.window.fit();null!=p.menus.tagsWindow&&p.menus.tagsWindow.window.fit();null!=p.menus.findWindow&&p.menus.findWindow.window.fit();null!=p.menus.findReplaceWindow&&p.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";l.style.transform="";mxEvent.addGestureListeners(p.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==p.diagramContainer.parentNode&&(p.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),p.sendEmbeddedSvgExport())});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";p.diagramContainer.parentNode.appendChild(t);p.bottomResizer=t;var La=null,ja=null,xa=null,sa=null;mxEvent.addGestureListeners(t,function(da){sa=parseInt(p.diagramContainer.style.height);ja=mxEvent.getClientY(da);F.popupMenuHandler.hideMenu();mxEvent.consume(da)});t=t.cloneNode(!1);t.style.cursor="col-resize";p.diagramContainer.parentNode.appendChild(t);p.rightResizer=t;mxEvent.addGestureListeners(t,function(da){xa=parseInt(p.diagramContainer.style.width);La=mxEvent.getClientX(da);F.popupMenuHandler.hideMenu();
+mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ba=!1;null!=La&&(p.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(da)-La)+"px",ba=!0);null!=ja&&(p.diagramContainer.style.height=Math.max(20,sa+mxEvent.getClientY(da)-ja)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:p.diagramContainer.getBoundingClientRect()}),"*"),L(),p.refresh())},function(da){null==La&&null==
+ja||mxEvent.consume(da);ja=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}"1"==urlParams.prefetchFonts&&p.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,v,x,B){var D=v.y,K=v.x,c=!1,e=!1;if(null!=this.states&&null!=d&&null!=v){var g=this,q=new mxCellState,n=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);q.x=d.x+K;q.y=d.y+D;q.width=d.width;q.height=d.height;for(var z=[],C=[],u=0;u<this.states.length;u++){var y=this.states[u];y instanceof mxCellState&&(B||!this.graph.isCellSelected(y.cell))&&((q.x>=y.x&&q.x<=y.x+y.width||y.x>=q.x&&y.x<=q.x+q.width)&&(q.y>
+y.y+y.height+4||q.y+q.height+4<y.y)?z.push(y):(q.y>=y.y&&q.y<=y.y+y.height||y.y>=q.y&&y.y<=q.y+q.height)&&(q.x>y.x+y.width+4||q.x+q.width+4<y.x)&&C.push(y))}var I=0,N=0,t=y=0,p=0,F=0,J=0,M=0,H=5*n;if(1<z.length){z.push(q);z.sort(function(T,W){return T.y-W.y});var G=!1;u=q==z[0];n=q==z[z.length-1];if(!u&&!n)for(u=1;u<z.length-1;u++)if(q==z[u]){n=z[u-1];u=z[u+1];y=N=t=(u.y-n.y-n.height-q.height)/2;break}for(u=0;u<z.length-1;u++){n=z[u];var E=z[u+1],P=q==n||q==E;E=E.y-n.y-n.height;G|=q==n;if(0==N&&0==
+I)N=E,I=1;else if(Math.abs(N-E)<=(P||1==u&&G?m:0))I+=1;else if(1<I&&G){z=z.slice(0,u+1);break}else if(3<=z.length-u&&!G)I=0,y=N=0!=t?t:0,z.splice(0,0==u?1:u),u=-1;else break;0!=y||P||(N=y=E)}3==z.length&&z[1]==q&&(y=0)}if(1<C.length){C.push(q);C.sort(function(T,W){return T.x-W.x});G=!1;u=q==C[0];n=q==C[C.length-1];if(!u&&!n)for(u=1;u<C.length-1;u++)if(q==C[u]){n=C[u-1];u=C[u+1];J=F=M=(u.x-n.x-n.width-q.width)/2;break}for(u=0;u<C.length-1;u++){n=C[u];E=C[u+1];P=q==n||q==E;E=E.x-n.x-n.width;G|=q==n;
+if(0==F&&0==p)F=E,p=1;else if(Math.abs(F-E)<=(P||1==u&&G?m:0))p+=1;else if(1<p&&G){C=C.slice(0,u+1);break}else if(3<=C.length-u&&!G)p=0,J=F=0!=M?M:0,C.splice(0,0==u?1:u),u=-1;else break;0!=J||P||(F=J=E)}3==C.length&&C[1]==q&&(J=0)}m=function(T,W,U,V){var l=[];if(V){V=H;var A=0}else V=0,A=H;l.push(new mxPoint(T.x-V,T.y-A));l.push(new mxPoint(T.x+V,T.y+A));l.push(T);l.push(W);l.push(new mxPoint(W.x-V,W.y-A));l.push(new mxPoint(W.x+V,W.y+A));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};F=function(T,W){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(W&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<p&&p==C.length-1){p=[];M=g.guidesArrHor;c=[];K=0;u=C[0]==q?1:0;G=C[u].y+C[u].height;if(0<J)for(u=0;u<C.length-1;u++)n=
+C[u],E=C[u+1],q==n?(K=E.x-n.width-J,c.push(new mxPoint(K+n.width+H,G)),c.push(new mxPoint(E.x-H,G))):q==E?(c.push(new mxPoint(n.x+n.width+H,G)),K=n.x+n.width+J,c.push(new mxPoint(K-H,G))):(c.push(new mxPoint(n.x+n.width+H,G)),c.push(new mxPoint(E.x-H,G)));else n=C[0],u=C[2],K=n.x+n.width+(u.x-n.x-n.width-q.width)/2,c.push(new mxPoint(n.x+n.width+H,G)),c.push(new mxPoint(K-H,G)),c.push(new mxPoint(K+q.width+H,G)),c.push(new mxPoint(u.x-H,G));for(u=0;u<c.length;u+=2)C=c[u],J=c[u+1],C=m(C,J,null!=M?
+M[u/2]:null),C.node.style.visibility="visible",C.redraw(),p.push(C);for(u=c.length/2;null!=M&&u<M.length;u++)M[u].destroy();g.guidesArrHor=p;K-=d.x;c=!0}else F(!0);if(1<I&&I==z.length-1){p=[];M=g.guidesArrVer;e=[];D=0;u=z[0]==q?1:0;I=z[u].x+z[u].width;if(0<y)for(u=0;u<z.length-1;u++)n=z[u],E=z[u+1],q==n?(D=E.y-n.height-y,e.push(new mxPoint(I,D+n.height+H)),e.push(new mxPoint(I,E.y-H))):q==E?(e.push(new mxPoint(I,n.y+n.height+H)),D=n.y+n.height+y,e.push(new mxPoint(I,D-H))):(e.push(new mxPoint(I,n.y+
+n.height+H)),e.push(new mxPoint(I,E.y-H)));else n=z[0],u=z[2],D=n.y+n.height+(u.y-n.y-n.height-q.height)/2,e.push(new mxPoint(I,n.y+n.height+H)),e.push(new mxPoint(I,D-H)),e.push(new mxPoint(I,D+q.height+H)),e.push(new mxPoint(I,u.y-H));for(u=0;u<e.length;u+=2)C=e[u],J=e[u+1],C=m(C,J,null!=M?M[u/2]:null,!0),C.node.style.visibility="visible",C.redraw(),p.push(C);for(u=e.length/2;null!=M&&u<M.length;u++)M[u].destroy();g.guidesArrVer=p;D-=d.y;e=!0}else F(!1,!0)}if(c||e)return q=new mxPoint(K,D),z=b.call(this,
d,q,x,B),c&&!e?q.y=z.y:e&&!c&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;F(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var v=this.guidesArrVer,x=this.guidesArrHor;if(null!=v)for(var B=0;B<v.length;B++)v[B].node.style.visibility=d?"visible":"hidden";if(null!=
-x)for(B=0;B<x.length;B++)x[B].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,v=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=v){for(x=0;x<v.length;x++)v[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function v(){var I=b.diagramContainer;g.style.top=I.offsetTop-K+"px";g.style.left=I.offsetLeft-K+"px";g.style.width=(k?0:I.offsetWidth)+K+"px";g.style.height=(k?I.offsetHeight:0)+K+"px"}function x(I,N,t){if(null!=B)return I;var m;return function(){var F=this,J=arguments,M=t&&!m;clearTimeout(m);m=setTimeout(function(){m=null;t||I.apply(F,J)},N);M&&I.apply(F,J)}}var B=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+x)for(B=0;B<x.length;B++)x[B].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,v=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=v){for(x=0;x<v.length;x++)v[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function v(){var I=b.diagramContainer;g.style.top=I.offsetTop-K+"px";g.style.left=I.offsetLeft-K+"px";g.style.width=(k?0:I.offsetWidth)+K+"px";g.style.height=(k?I.offsetHeight:0)+K+"px"}function x(I,N,t){if(null!=B)return I;var p;return function(){var F=this,J=arguments,M=t&&!p;clearTimeout(p);p=setTimeout(function(){p=null;t||I.apply(F,J)},N);M&&I.apply(F,J)}}var B=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,K=this.RULER_THICKNESS,c=this;this.unit=f;var e=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},g=document.createElement("div");g.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){e=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};g.style.background=e.bkgClr;g.style[k?"borderRight":"borderBottom"]="0.5px solid "+e.strokeClr;g.style.borderLeft="0.5px solid "+e.strokeClr});this.updateStyle();document.body.appendChild(g);mxEvent.disableContextMenu(g);this.editorUiRefresh=b.refresh;b.refresh=
-function(I){c.editorUiRefresh.apply(b,arguments);v()};v();var q=document.createElement("canvas");q.width=g.offsetWidth;q.height=g.offsetHeight;g.style.overflow="hidden";q.style.position="relative";g.appendChild(q);var n=q.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=g;this.canvas=q;var z=function(I,N,t,m,F){I=Math.round(I);N=Math.round(N);t=Math.round(t);m=Math.round(m);n.beginPath();n.moveTo(I+.5,N+.5);n.lineTo(t+.5,m+.5);n.stroke();F&&(k?(n.save(),n.translate(I,N),
-n.rotate(-Math.PI/2),n.fillText(F,0,0),n.restore()):n.fillText(F,I,N))},C=function(){n.clearRect(0,0,q.width,q.height);n.beginPath();n.lineWidth=.7;n.strokeStyle=e.strokeClr;n.setLineDash([]);n.font="9px Arial";n.textAlign="center";var I=p.view.scale,N=p.view.getBackgroundPageBounds(),t=p.view.translate,m=p.pageVisible;t=m?K+(k?N.y-p.container.scrollTop:N.x-p.container.scrollLeft):K+(k?t.y*I-p.container.scrollTop:t.x*I-p.container.scrollLeft);var F=0;m&&(F=p.getPageLayout(),F=k?F.y*p.pageFormat.height:
-F.x*p.pageFormat.width);var J;switch(c.unit){case mxConstants.POINTS:var M=J=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:J=10;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:J=20;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:J=.5>=I||4<=I?8:16,M=mxConstants.PIXELS_PER_INCH/J,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var G=M;2<=I?G=M/(2*Math.floor(I/2)):.5>=I&&(G=M*Math.floor(1/I/2)*(c.unit==
-mxConstants.MILLIMETERS?2:1));M=null;N=m?Math.min(t+(k?N.height:N.width),k?q.height:q.width):k?q.height:q.width;if(m)if(n.fillStyle=e.outBkgClr,k){var E=t-K;0<E&&n.fillRect(0,K,K,E);N<q.height&&n.fillRect(0,N,K,q.height)}else E=t-K,0<E&&n.fillRect(K,0,E,K),N<q.width&&n.fillRect(N,0,q.width,K);n.fillStyle=e.fontClr;for(m=m?t:t%(G*I);m<=N;m+=G*I)if(E=Math.round((m-t)/I/G),!(m<K||E==M)){M=E;var P=null;0==E%J&&(P=c.formatText(F+E*G)+"");k?z(K-H[Math.abs(E)%J],m,K,m,P):z(m,K-H[Math.abs(E)%J],m,K,P)}n.lineWidth=
-1;z(k?0:K,k?K:0,K,K);n.fillStyle=e.cornerClr;n.fillRect(0,0,K,K)},u=-1,y=function(){null!=B?(null!=D&&D(u),u=B(C)):C()};this.drawRuler=y;this.sizeListener=f=x(function(){var I=p.container;k?(I=I.offsetHeight+K,q.height!=I&&(q.height=I,g.style.height=I+"px",y())):(I=I.offsetWidth+K,q.width!=I&&(q.width=I,g.style.width=I+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=x(function(){var I=k?p.container.scrollTop:p.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,y())},10);
-this.unitListener=function(I,N){c.setUnit(N.getProperty("unit"))};p.addListener(mxEvent.SIZE,f);p.container.addEventListener("scroll",d);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){e=I;g.style.background=e.bkgClr;C()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,N,t,m){if(k&&4<I.height||
+function(I){c.editorUiRefresh.apply(b,arguments);v()};v();var q=document.createElement("canvas");q.width=g.offsetWidth;q.height=g.offsetHeight;g.style.overflow="hidden";q.style.position="relative";g.appendChild(q);var n=q.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=g;this.canvas=q;var z=function(I,N,t,p,F){I=Math.round(I);N=Math.round(N);t=Math.round(t);p=Math.round(p);n.beginPath();n.moveTo(I+.5,N+.5);n.lineTo(t+.5,p+.5);n.stroke();F&&(k?(n.save(),n.translate(I,N),
+n.rotate(-Math.PI/2),n.fillText(F,0,0),n.restore()):n.fillText(F,I,N))},C=function(){n.clearRect(0,0,q.width,q.height);n.beginPath();n.lineWidth=.7;n.strokeStyle=e.strokeClr;n.setLineDash([]);n.font="9px Arial";n.textAlign="center";var I=m.view.scale,N=m.view.getBackgroundPageBounds(),t=m.view.translate,p=m.pageVisible;t=p?K+(k?N.y-m.container.scrollTop:N.x-m.container.scrollLeft):K+(k?t.y*I-m.container.scrollTop:t.x*I-m.container.scrollLeft);var F=0;p&&(F=m.getPageLayout(),F=k?F.y*m.pageFormat.height:
+F.x*m.pageFormat.width);var J;switch(c.unit){case mxConstants.POINTS:var M=J=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:J=10;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:J=20;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:J=.5>=I||4<=I?8:16,M=mxConstants.PIXELS_PER_INCH/J,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var G=M;2<=I?G=M/(2*Math.floor(I/2)):.5>=I&&(G=M*Math.floor(1/I/2)*(c.unit==
+mxConstants.MILLIMETERS?2:1));M=null;N=p?Math.min(t+(k?N.height:N.width),k?q.height:q.width):k?q.height:q.width;if(p)if(n.fillStyle=e.outBkgClr,k){var E=t-K;0<E&&n.fillRect(0,K,K,E);N<q.height&&n.fillRect(0,N,K,q.height)}else E=t-K,0<E&&n.fillRect(K,0,E,K),N<q.width&&n.fillRect(N,0,q.width,K);n.fillStyle=e.fontClr;for(p=p?t:t%(G*I);p<=N;p+=G*I)if(E=Math.round((p-t)/I/G),!(p<K||E==M)){M=E;var P=null;0==E%J&&(P=c.formatText(F+E*G)+"");k?z(K-H[Math.abs(E)%J],p,K,p,P):z(p,K-H[Math.abs(E)%J],p,K,P)}n.lineWidth=
+1;z(k?0:K,k?K:0,K,K);n.fillStyle=e.cornerClr;n.fillRect(0,0,K,K)},u=-1,y=function(){null!=B?(null!=D&&D(u),u=B(C)):C()};this.drawRuler=y;this.sizeListener=f=x(function(){var I=m.container;k?(I=I.offsetHeight+K,q.height!=I&&(q.height=I,g.style.height=I+"px",y())):(I=I.offsetWidth+K,q.width!=I&&(q.width=I,g.style.width=I+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=x(function(){var I=k?m.container.scrollTop:m.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,y())},10);
+this.unitListener=function(I,N){c.setUnit(N.getProperty("unit"))};m.addListener(mxEvent.SIZE,f);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){e=I;g.style.background=e.bkgClr;C()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,N,t,p){if(k&&4<I.height||
!k&&4<I.width){if(null!=c.guidePart)try{n.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),n.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),n.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3)}catch(V){}var F=c.origGuideMove.apply(this,arguments);try{n.lineWidth=.5;n.strokeStyle=e.guideClr;n.setLineDash([2]);if(k){var J=I.y+F.y+K-this.graph.container.scrollTop;var M=0;var H=J+I.height/2;var G=K/2;var E=J+I.height;var P=0;var T=n.getImageData(M,J-1,K,
3);z(M,J,K,J);J--;var W=n.getImageData(G,H-1,K,3);z(G,H,K,H);H--;var U=n.getImageData(P,E-1,K,3);z(P,E,K,E);E--}else J=0,M=I.x+F.x+K-this.graph.container.scrollLeft,H=K/2,G=M+I.width/2,E=0,P=M+I.width,T=n.getImageData(M-1,J,3,K),z(M,J,M,K),M--,W=n.getImageData(G-1,H,3,K),z(G,H,G,K),G--,U=n.getImageData(P-1,E,3,K),z(P,E,P,K),P--;if(null==c.guidePart||c.guidePart.x1!=M||c.guidePart.y1!=J)c.guidePart={imgData1:T,x1:M,y1:J,imgData2:W,x2:G,y2:H,imgData3:U,x3:P,y3:E}}catch(V){}}else F=c.origGuideMove.apply(this,
arguments);return F};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=c.origGuideDestroy.apply(this,arguments);if(null!=c.guidePart)try{n.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),n.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),n.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3),c.guidePart=null}catch(N){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
@@ -12949,14 +12949,14 @@ this.pageListener);null!=this.container&&this.container.parentNode.removeChild(t
function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var v=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
function(x){v=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!v){var B=new mxPopupMenu(mxUtils.bind(this,function(c,e){b.menus.addMenuItems(c,["points","inches","millimeters","meters"],e)}));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=
!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);b.resetCurrentMenu();B.destroy()});var D=mxEvent.getClientX(x),K=mxEvent.getClientY(x);B.popup(D,K,null,x);b.setCurrentMenu(B,d)}mxEvent.consume(x)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,v=[],x,B=[],D,K=!1,c=!0,e=!0,g=!0,q=!0,n=[],p=!1,z=!0,C=!1,u={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(H){K=H};this.setAutoClose=function(H){c=H};this.setAutoInsert=
-function(H){e=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){q=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){C=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){y=H};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(H){u.size=H};this.getBrushSize=function(){return u.size};var I=function(H){p=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);
-b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return p};var N=mxUtils.bind(this,function(H){if(d){var G=D.length,E=z&&0<B.length&&null!=D&&2>D.length;E||B.push.apply(B,D);D=[];B.push(null);v.push(d);d=null;(E||e)&&this.stopDrawing();e&&2<=G&&this.startDrawing();mxEvent.consume(H)}}),t=new mxCell;t.edge=!0;var m=function(){var H=b.getCurrentCellStyle(t);H=mxUtils.getValue(b.currentVertexStyle,
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,v=[],x,B=[],D,K=!1,c=!0,e=!0,g=!0,q=!0,n=[],m=!1,z=!0,C=!1,u={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(H){K=H};this.setAutoClose=function(H){c=H};this.setAutoInsert=
+function(H){e=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){q=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){C=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){y=H};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(H){u.size=H};this.getBrushSize=function(){return u.size};var I=function(H){m=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);
+b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return m};var N=mxUtils.bind(this,function(H){if(d){var G=D.length,E=z&&0<B.length&&null!=D&&2>D.length;E||B.push.apply(B,D);D=[];B.push(null);v.push(d);d=null;(E||e)&&this.stopDrawing();e&&2<=G&&this.startDrawing();mxEvent.consume(H)}}),t=new mxCell;t.edge=!0;var p=function(){var H=b.getCurrentCellStyle(t);H=mxUtils.getValue(b.currentVertexStyle,
mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var G=";fillColor=none;";y&&(G=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+G};this.stopDrawing=function(){if(0<v.length){if(y){for(var H=[],G=0;G<B.length;G++)null!=B[G]&&H.push([B[G].x,B[G].y]);H=PerfectFreehand.getStroke(H,u);B=[];for(G=0;G<H.length;G++)B.push({x:H[G][0],y:H[G][1]});B.push(null)}H=B[0].x;var E=B[0].x,P=
B[0].y,T=B[0].y;for(G=1;G<B.length;G++)null!=B[G]&&(H=Math.max(H,B[G].x),E=Math.min(E,B[G].x),P=Math.max(P,B[G].y),T=Math.min(T,B[G].y));H-=E;P-=T;if(0<H&&0<P){var W=100/H,U=100/P;B.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-E)*W;Q.y=(Q.y-T)*U;return Q});var V='<shape strokewidth="inherit"><foreground>',l=0;for(G=0;G<B.length;G++){var A=B[G];if(null==A){A=!1;l=B[l];var L=B[G-1];!K&&c&&(A=l.x-L.x,L=l.y-L.y,A=Math.sqrt(A*A+L*L)<=b.tolerance);if(K||A)V+='<line x="'+l.x.toFixed(2)+'" y="'+l.y.toFixed(2)+
'"/>';V+="</path>"+(q||K||A?"<fillstroke/>":"<stroke/>");l=G+1}else V=G==l?V+('<path><move x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>'):V+('<line x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){G=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;l=b.view.translate;G=new mxCell("",new mxGeometry(E/V-l.x,T/V-l.y,H/V,P/V),G);G.vertex=1;b.model.beginUpdate();try{G=b.addCell(G),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[G])),b.fireEvent(new mxEventObject("freehandInserted","cell",G))}finally{b.model.endUpdate()}C&&b.setSelectionCells([G])}}for(G=0;G<v.length;G++)v[G].parentNode.removeChild(v[G]);d=null;v=[];B=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,G){H=G.getProperty("eventName");G=G.getProperty("event");H==mxEvent.MOUSE_MOVE&&p&&(null!=G.sourceState&&G.sourceState.setCursor("crosshair"),G.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,G){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())&&(H=G.getEvent(),p&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var E=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);E=Math.max(1,E*b.view.scale);var P=m();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",y?P:"none");d.setAttribute("stroke",P);d.setAttribute("stroke-width",E);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+"cells",[G])),b.fireEvent(new mxEventObject("freehandInserted","cell",G))}finally{b.model.endUpdate()}C&&b.setSelectionCells([G])}}for(G=0;G<v.length;G++)v[G].parentNode.removeChild(v[G]);d=null;v=[];B=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,G){H=G.getProperty("eventName");G=G.getProperty("event");H==mxEvent.MOUSE_MOVE&&m&&(null!=G.sourceState&&G.sourceState.setCursor("crosshair"),G.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,G){if(b.isEnabled()&&
+!b.isCellLocked(b.getDefaultParent())&&(H=G.getEvent(),m&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var E=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);E=Math.max(1,E*b.view.scale);var P=p();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",y?P:"none");d.setAttribute("stroke",P);d.setAttribute("stroke-width",E);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
P=P.split(" ").map(function(T){return parseFloat(T)*E}).join(" "),d.setAttribute("stroke-dasharray",P));n=[];H=F(H);J(H);x="M"+H.x+" "+H.y;B.push(H);D=[];d.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],u):x);f.appendChild(d);G.consume()}}),mouseMove:mxUtils.bind(this,function(H,G){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=G.getEvent();H=F(H);J(H);var E=M(0);if(E)if(B.push(E),y){var P=[];for(E=0;E<B.length;E++)P.push([B[E].x,B[E].y]);D=[];for(var T=2;T<n.length;T+=
2)E=M(T),P.push([E.x,E.y]),D.push(E);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,u))}else{x+=" L"+E.x+" "+E.y;P="";D=[];for(T=2;T<n.length;T+=2)E=M(T),P+=" L"+E.x+" "+E.y,D.push(E);d.setAttribute("d",x+P)}g&&(E=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-E.x,H.y-E.y)).grow(20)));G.consume()}}),mouseUp:mxUtils.bind(this,function(H,G){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(G.getEvent()),G.consume())})});var F=function(H){return mxUtils.convertPoint(b.container,
mxEvent.getClientX(H),mxEvent.getClientY(H))},J=function(H){for(n.push(H);n.length>k;)n.shift()},M=function(H){var G=n.length;if(1===G%2||G>=k){var E=0,P=0,T,W=0;for(T=H;T<G;T++)W++,H=n[T],E+=H.x,P+=H.y;return{x:E/W,y:P/W}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,k,d,v){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=d;this.locale=v};DrawioComment=function(b,f,k,d,v,x,B){this.file=b;this.id=f;this.content=k;this.modifiedDate=d;this.createdDate=v;this.isResolved=x;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,d,v){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 8d1c5432..76b2021f 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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:"undefined"!==typeof InstallTrigger,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||"[object SVGForeignObjectElement]"!==
@@ -2008,90 +2008,90 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(m,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,D){m=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<m.length){b.getModel();D=[];for(var p=0;p<m.length;p++)null!=
b.view.getState(m[p])&&D.push(m[p]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,D,p,E,K,Q,d,f){var g=Q?57:0,x=k,z=m,u=Q?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var L=H.height,C=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((L-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,L-u);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=L+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";C+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-G+=b.embedViewport.y,C+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var V=b.createDiv(Q?"geTransDialog":"geDialog");D=this.getPosition(C,G,k,m);C=D.x;G=D.y;V.style.width=k+"px";V.style.height=m+"px";V.style.left=C+"px";V.style.top=G+"px";V.style.zIndex=this.zIndex;V.appendChild(e);document.body.appendChild(V);!K&&e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+function Dialog(b,e,k,m,D,p,E,L,Q,d,f){var g=Q?57:0,x=k,z=m,u=Q?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var K=H.height,C=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((K-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,K-u);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=K+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";C+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+G+=b.embedViewport.y,C+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var V=b.createDiv(Q?"geTransDialog":"geDialog");D=this.getPosition(C,G,k,m);C=D.x;G=D.y;V.style.width=k+"px";V.style.height=m+"px";V.style.left=C+"px";V.style.top=G+"px";V.style.zIndex=this.zIndex;V.appendChild(e);document.body.appendChild(V);!L&&e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=C+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var U=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Y){U=!0}),null,mxUtils.bind(this,function(Y){U&&(b.hideDialog(!0),U=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Y=d();
-null!=Y&&(x=k=Y.w,z=m=Y.h)}Y=mxUtils.getDocumentSize();L=Y.height;this.bg.style.height=L+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((Y.width-k-u)/2));G=Math.max(1,Math.round((L-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(z,L-u);Y=this.getPosition(C,G,k,m);C=Y.x;G=Y.y;V.style.left=C+"px";V.style.top=G+"px";V.style.width=k+"px";V.style.height=m+"px";!K&&
+null!=Y&&(x=k=Y.w,z=m=Y.h)}Y=mxUtils.getDocumentSize();K=Y.height;this.bg.style.height=K+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((Y.width-k-u)/2));G=Math.max(1,Math.round((K-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(z,K-u);Y=this.getPosition(C,G,k,m);C=Y.x;G=Y.y;V.style.left=C+"px";V.style.top=G+"px";V.style.width=k+"px";V.style.height=m+"px";!L&&
e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=C+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=V;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,D,p,E,K,Q,d,f){Q=null!=Q?Q:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
+var ErrorDialog=function(b,e,k,m,D,p,E,L,Q,d,f){Q=null!=Q?Q:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var z=mxUtils.button(m,function(){Q&&b.hideDialog();null!=D&&D()});
-z.className="geBtn";k.appendChild(z);null!=E&&(m=mxUtils.button(E,function(){Q&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){z.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(z){var u=E.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var L=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(u){var G=E.checked?1:parseInt(f.value);isNaN(G)||(C=mxUtils.getScaleForPageCount(G,k,L))}k.getGraphBounds();var V=G=0;L=mxRectangle.fromRectangle(L);L.width=Math.ceil(L.width*H);L.height=Math.ceil(L.height*H);C*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*L.width,V-=H.y*L.height):
-u=!0;u=PrintDialog.createPrintPreview(k,C,L,0,G,V,u);u.open();z&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(E);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage"));
-K.appendChild(Q);mxEvent.addListener(Q,"click",function(z){E.checked=!E.checked;d.checked=!E.checked;mxEvent.consume(z)});mxEvent.addListener(E,"change",function(){d.checked=!E.checked});p.appendChild(K);D.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");K.appendChild(Q);mxEvent.addListener(Q,
-"click",function(z){d.checked=!d.checked;E.checked=!d.checked;mxEvent.consume(z)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);D.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");E.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);D.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
-K.style.paddingTop="20px";K.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&K.appendChild(Q);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst||
-K.appendChild(Q);p.appendChild(K);D.appendChild(p);m.appendChild(D);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,D,p,E){e=new mxPrintPreview(b,e,k,m,D,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(Q){K.apply(this,arguments);Q.writeln('<style type="text/css">');Q.writeln("@media screen {");Q.writeln(" body > div { padding:30px;box-sizing:content-box; }");Q.writeln("}");Q.writeln("</style>")};return e};
+z.className="geBtn";k.appendChild(z);null!=E&&(m=mxUtils.button(E,function(){Q&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){z.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(z){var u=E.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var K=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(u){var G=E.checked?1:parseInt(f.value);isNaN(G)||(C=mxUtils.getScaleForPageCount(G,k,K))}k.getGraphBounds();var V=G=0;K=mxRectangle.fromRectangle(K);K.width=Math.ceil(K.width*H);K.height=Math.ceil(K.height*H);C*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*K.width,V-=H.y*K.height):
+u=!0;u=PrintDialog.createPrintPreview(k,C,K,0,G,V,u);u.open();z&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(E);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage"));
+L.appendChild(Q);mxEvent.addListener(Q,"click",function(z){E.checked=!E.checked;d.checked=!E.checked;mxEvent.consume(z)});mxEvent.addListener(E,"change",function(){d.checked=!E.checked});p.appendChild(L);D.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");L.appendChild(Q);mxEvent.addListener(Q,
+"click",function(z){d.checked=!d.checked;E.checked=!d.checked;mxEvent.consume(z)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);D.appendChild(p);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");E.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);D.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
+L.style.paddingTop="20px";L.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&L.appendChild(Q);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
+L.appendChild(Q);p.appendChild(L);D.appendChild(p);m.appendChild(D);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,m,D,p,E){e=new mxPrintPreview(b,e,k,m,D,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(Q){L.apply(this,arguments);Q.writeln('<style type="text/css">');Q.writeln("@media screen {");Q.writeln(" body > div { padding:30px;box-sizing:content-box; }");Q.writeln("}");Q.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var L=u;null!=L&&Graph.isPageLink(L.src)&&(L=b.createImageForPageLink(L.src,null));null!=L&&null!=L.src?(z.setAttribute("src",L.src),z.style.display=""):(z.removeAttribute("src"),z.style.display="none")}var m=b.editor.graph,D=document.createElement("table");D.style.width=
-"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");E.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var Q=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td");
-mxUtils.write(K,mxResources.get("background")+":");E.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(L){b.pickColor(f||"none",function(C){f=C;e()});mxEvent.consume(L)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var L=parseInt(g.value);g.value=Math.max(1,isNaN(L)?m.getGridSize():L)});E.appendChild(K);p.appendChild(E);E=document.createElement("tr");
-K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");E.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var z=document.createElement("img");z.setAttribute("valign","middle");z.style.verticalAlign="middle";z.style.border="1px solid lightGray";z.style.borderRadius="4px";z.style.marginRight="14px";z.style.maxWidth="100px";z.style.cursor="pointer";z.style.height=
-"60px";z.style.padding="4px";var u=m.backgroundImage,H=function(L){b.showBackgroundImageDialog(function(C,G){G||(u=C,k())},u);mxEvent.consume(L)};mxEvent.addListener(x,"click",H);mxEvent.addListener(z,"click",H);k();K.appendChild(z);K.appendChild(x);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var L=parseInt(g.value);isNaN(L)||m.gridSize===L||m.setGridSize(L);L=new ChangePageSetup(b,f,u,Q.get());L.ignoreColor=m.background==f;L.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==L.previousFormat.width&&m.pageFormat.height==L.previousFormat.height&&L.ignoreColor&&L.ignoreImage||m.model.execute(L)});H.className="geBtn gePrimaryBtn";
-K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);E.appendChild(K);p.appendChild(E);D.appendChild(p);this.container=D};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function D(Y,O,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Y=!1;for(O=0;O<u.length;O++)qa=u[O],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,Y=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,Y=E.checked=!0));Y?(Q.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),K.value="custom",Q.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px";
+var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var K=u;null!=K&&Graph.isPageLink(K.src)&&(K=b.createImageForPageLink(K.src,null));null!=K&&null!=K.src?(z.setAttribute("src",K.src),z.style.display=""):(z.removeAttribute("src"),z.style.display="none")}var m=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");E.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var Q=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);E.appendChild(L);p.appendChild(E);E=document.createElement("tr");L=document.createElement("td");
+mxUtils.write(L,mxResources.get("background")+":");E.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
+"click",function(K){b.pickColor(f||"none",function(C){f=C;e()});mxEvent.consume(K)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var K=parseInt(g.value);g.value=Math.max(1,isNaN(K)?m.getGridSize():K)});E.appendChild(L);p.appendChild(E);E=document.createElement("tr");
+L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");E.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var z=document.createElement("img");z.setAttribute("valign","middle");z.style.verticalAlign="middle";z.style.border="1px solid lightGray";z.style.borderRadius="4px";z.style.marginRight="14px";z.style.maxWidth="100px";z.style.cursor="pointer";z.style.height=
+"60px";z.style.padding="4px";var u=m.backgroundImage,H=function(K){b.showBackgroundImageDialog(function(C,G){G||(u=C,k())},u);mxEvent.consume(K)};mxEvent.addListener(x,"click",H);mxEvent.addListener(z,"click",H);k();L.appendChild(z);L.appendChild(x);E.appendChild(L);p.appendChild(E);E=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
+b.editor.cancelFirst&&L.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var K=parseInt(g.value);isNaN(K)||m.gridSize===K||m.setGridSize(K);K=new ChangePageSetup(b,f,u,Q.get());K.ignoreColor=m.background==f;K.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==K.previousFormat.width&&m.pageFormat.height==K.previousFormat.height&&K.ignoreColor&&K.ignoreImage||m.model.execute(K)});H.className="geBtn gePrimaryBtn";
+L.appendChild(H);b.editor.cancelFirst||L.appendChild(x);E.appendChild(L);p.appendChild(E);D.appendChild(p);this.container=D};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function D(Y,O,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Y=!1;for(O=0;O<u.length;O++)qa=u[O],G?"custom"==qa.key&&(L.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
+qa.format.width&&k.height==qa.format.height?(L.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,Y=!0):k.width==qa.format.height&&k.height==qa.format.width&&(L.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,Y=E.checked=!0));Y?(Q.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
+"checked"),L.value="custom",Q.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
var Q=document.createElement("div");Q.style.marginLeft="4px";Q.style.width="210px";Q.style.height="24px";p.style.marginRight="6px";Q.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));Q.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";Q.appendChild(E);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));Q.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");Q.style.display="none";f.style.display="none";for(var z={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var L=u[H];z[L.key]=L;var C=document.createElement("option");C.setAttribute("value",
-L.key);mxUtils.write(C,L.title);K.appendChild(C)}var G=!1;D();b.appendChild(K);mxUtils.br(b);b.appendChild(Q);b.appendChild(f);var V=k,U=function(Y,O){Y=z[K.value];null!=Y.format?(g.value=Y.format.width/100,x.value=Y.format.height/100,f.style.display="none",Q.style.display=""):(Q.style.display="none",f.style.display="");Y=parseFloat(g.value);if(isNaN(Y)||0>=Y)g.value=k.width/100;Y=parseFloat(x.value);if(isNaN(Y)||0>=Y)x.value=k.height/100;Y=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&E.checked&&(Y=new mxRectangle(0,0,Y.height,Y.width));O&&G||Y.width==V.width&&Y.height==V.height||(V=Y,null!=m&&m(V))};mxEvent.addListener(e,"click",function(Y){p.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(d,"click",function(Y){E.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(g,"blur",U);mxEvent.addListener(g,"click",U);mxEvent.addListener(x,"blur",U);mxEvent.addListener(x,"click",U);mxEvent.addListener(E,"change",U);mxEvent.addListener(p,
-"change",U);mxEvent.addListener(K,"change",function(Y){G="custom"==K.value;U(Y,!0)});U();return{set:function(Y){k=Y;D(null,null,!0)},get:function(){return V},widthInput:g,heightInput:x}};
+"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");Q.style.display="none";f.style.display="none";for(var z={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var K=u[H];z[K.key]=K;var C=document.createElement("option");C.setAttribute("value",
+K.key);mxUtils.write(C,K.title);L.appendChild(C)}var G=!1;D();b.appendChild(L);mxUtils.br(b);b.appendChild(Q);b.appendChild(f);var V=k,U=function(Y,O){Y=z[L.value];null!=Y.format?(g.value=Y.format.width/100,x.value=Y.format.height/100,f.style.display="none",Q.style.display=""):(Q.style.display="none",f.style.display="");Y=parseFloat(g.value);if(isNaN(Y)||0>=Y)g.value=k.width/100;Y=parseFloat(x.value);if(isNaN(Y)||0>=Y)x.value=k.height/100;Y=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
+Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&E.checked&&(Y=new mxRectangle(0,0,Y.height,Y.width));O&&G||Y.width==V.width&&Y.height==V.height||(V=Y,null!=m&&m(V))};mxEvent.addListener(e,"click",function(Y){p.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(d,"click",function(Y){E.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(g,"blur",U);mxEvent.addListener(g,"click",U);mxEvent.addListener(x,"blur",U);mxEvent.addListener(x,"click",U);mxEvent.addListener(E,"change",U);mxEvent.addListener(p,
+"change",U);mxEvent.addListener(L,"change",function(Y){G="custom"==L.value;U(Y,!0)});U();return{set:function(Y){k=Y;D(null,null,!0)},get:function(){return V},widthInput:g,heightInput:x}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,D,p,E,K,Q,d,f,g,x){Q=null!=Q?Q:!0;var z=document.createElement("table"),u=document.createElement("tbody");z.style.position="absolute";z.style.top="30px";z.style.left="20px";var H=document.createElement("tr");var L=document.createElement("td");L.style.textOverflow="ellipsis";L.style.textAlign="right";L.style.maxWidth=(x?x+15:100)+"px";L.style.fontSize="10pt";L.style.width=(x?x:84)+"px";mxUtils.write(L,(D||mxResources.get("filename"))+":");H.appendChild(L);var C=
+var FilenameDialog=function(b,e,k,m,D,p,E,L,Q,d,f,g,x){Q=null!=Q?Q:!0;var z=document.createElement("table"),u=document.createElement("tbody");z.style.position="absolute";z.style.top="30px";z.style.left="20px";var H=document.createElement("tr");var K=document.createElement("td");K.style.textOverflow="ellipsis";K.style.textAlign="right";K.style.maxWidth=(x?x+15:100)+"px";K.style.fontSize="10pt";K.style.width=(x?x:84)+"px";mxUtils.write(K,(D||mxResources.get("filename"))+":");H.appendChild(K);var C=
document.createElement("input");C.setAttribute("value",e||"");C.style.marginLeft="4px";C.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(C.value))Q&&b.hideDialog(),m(C.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var V=z.parentNode;if(null!=V){var U=null;mxEvent.addListener(V,"dragleave",
function(Y){null!=U&&(U.style.backgroundColor="",U=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=C,U.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=U&&(U.style.backgroundColor="",U=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")),
-G.click());Y.stopPropagation();Y.preventDefault()}))}}};L=document.createElement("td");L.style.whiteSpace="nowrap";L.appendChild(C);H.appendChild(L);if(null!=D||null==E)u.appendChild(H),null!=f&&(L.appendChild(FilenameDialog.createTypeHint(b,C,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),L=document.createElement("td"),L.style.textOverflow="ellipsis",L.style.textAlign="right",L.style.maxWidth="100px",L.style.fontSize="10pt",L.style.width="84px",mxUtils.write(L,mxResources.get("type")+
-":"),H.appendChild(L),L=document.createElement("td"),L.style.whiteSpace="nowrap",H.appendChild(L),e=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",L.appendChild(e),C.style.width=null!=g?g-40+"px":"190px",H.appendChild(L),u.appendChild(H)));null!=E&&(H=document.createElement("tr"),L=document.createElement("td"),L.colSpan=2,L.appendChild(E),H.appendChild(L),u.appendChild(H));H=document.createElement("tr");L=document.createElement("td");L.colSpan=
-2;L.style.paddingTop=null!=f?"12px":"20px";L.style.whiteSpace="nowrap";L.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&L.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",L.appendChild(g));mxEvent.addListener(C,"keypress",function(V){13==V.keyCode&&G.click()});L.appendChild(G);b.editor.cancelFirst||L.appendChild(f);
-H.appendChild(L);u.appendChild(H);z.appendChild(u);this.container=z};FilenameDialog.filenameHelpLink=null;
+G.click());Y.stopPropagation();Y.preventDefault()}))}}};K=document.createElement("td");K.style.whiteSpace="nowrap";K.appendChild(C);H.appendChild(K);if(null!=D||null==E)u.appendChild(H),null!=f&&(K.appendChild(FilenameDialog.createTypeHint(b,C,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),K=document.createElement("td"),K.style.textOverflow="ellipsis",K.style.textAlign="right",K.style.maxWidth="100px",K.style.fontSize="10pt",K.style.width="84px",mxUtils.write(K,mxResources.get("type")+
+":"),H.appendChild(K),K=document.createElement("td"),K.style.whiteSpace="nowrap",H.appendChild(K),e=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",K.appendChild(e),C.style.width=null!=g?g-40+"px":"190px",H.appendChild(K),u.appendChild(H)));null!=E&&(H=document.createElement("tr"),K=document.createElement("td"),K.colSpan=2,K.appendChild(E),H.appendChild(K),u.appendChild(H));H=document.createElement("tr");K=document.createElement("td");K.colSpan=
+2;K.style.paddingTop=null!=f?"12px":"20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&K.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",K.appendChild(g));mxEvent.addListener(C,"keypress",function(V){13==V.keyCode&&G.click()});K.appendChild(G);b.editor.cancelFirst||K.appendChild(f);
+H.appendChild(K);u.appendChild(H);z.appendChild(u);this.container=z};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var D=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(m,"click",function(p){var E=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
D();return m};
FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(D)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,K=0;K<k.length;K++){var Q=k[K].extension,d=null;"drawio"!=Q&&(d=Q,Q=".drawio."+Q);if(p.substring(p.length-Q.length-1)=="."+Q||null!=d&&p.substring(p.length-d.length-1)=="."+d){E=K;break}}m.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,D,p,E){var K=b.createSidebarContainer();E(K);this.window=new mxWindow(e,K,k,m,D,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&b.isSelectionAllowed(Q)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=E.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,L=0;L<k.length;L++){var Q=k[L].extension,d=null;"drawio"!=Q&&(d=Q,Q=".drawio."+Q);if(p.substring(p.length-Q.length-1)=="."+Q||null!=d&&p.substring(p.length-d.length-1)=="."+d){E=L;break}}m.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+var WrapperWindow=function(b,e,k,m,D,p,E){var L=b.createSidebarContainer();E(L);this.window=new mxWindow(e,L,k,m,D,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&b.isSelectionAllowed(Q)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=E.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),Q.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,Q),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){E.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(d)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,K=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,Q=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(E.isGridEnabled()||E.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(Q))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=E.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=Q=0;null!=E.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),Q=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-Q,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}Q=E.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=f,E.view.backgroundPageShape.node.style.backgroundImage=d,E.view.backgroundPageShape.node.style.backgroundColor=K,E.view.backgroundPageShape.node.style.borderColor=
-E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",Q.style.backgroundImage="none",Q.style.backgroundColor=""):(E.container.className="geDiagramContainer",Q.style.backgroundPosition=f,Q.style.backgroundColor=K,Q.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(E){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var Q=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+Q+" "+g+" M "+g+" 0 L "+g+
-" "+Q)}return'<svg width="'+Q+'" height="'+Q+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+Q+'" height="'+Q+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+Q+" 0 L 0 0 0 "+Q+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+E,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";Q.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,z=this.view.getBackgroundPageBounds();
-K=z.width;Q=z.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(E=E&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(Q/u.height)-1:0,L=E?Math.ceil(K/u.width)-1:0,C=z.x+K,G=z.y+Q;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<L&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(V){if(null!=V){for(var U=V==this.horizontalPageBreaks?H:L,Y=0;Y<=U;Y++){var O=V==this.horizontalPageBreaks?[new mxPoint(Math.round(z.x),
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(d)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,L=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,Q=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(E.isGridEnabled()||E.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(Q))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=E.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
+")";var g=Q=0;null!=E.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),Q=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-Q,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}Q=E.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=f,E.view.backgroundPageShape.node.style.backgroundImage=d,E.view.backgroundPageShape.node.style.backgroundColor=L,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",Q.style.backgroundImage="none",Q.style.backgroundColor=""):(E.container.className="geDiagramContainer",Q.style.backgroundPosition=f,Q.style.backgroundColor=L,Q.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(E){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var Q=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+Q+" "+g+" M "+g+" 0 L "+g+
+" "+Q)}return'<svg width="'+Q+'" height="'+Q+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+Q+'" height="'+Q+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+Q+" 0 L 0 0 0 "+Q+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,L){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+E,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";Q.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(E,L,Q){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,z=this.view.getBackgroundPageBounds();
+L=z.width;Q=z.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(E=E&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(Q/u.height)-1:0,K=E?Math.ceil(L/u.width)-1:0,C=z.x+L,G=z.y+Q;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<K&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(V){if(null!=V){for(var U=V==this.horizontalPageBreaks?H:K,Y=0;Y<=U;Y++){var O=V==this.horizontalPageBreaks?[new mxPoint(Math.round(z.x),
Math.round(z.y+(Y+1)*u.height)),new mxPoint(Math.round(C),Math.round(z.y+(Y+1)*u.height))]:[new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(z.y)),new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(G))];null!=V[Y]?(V[Y].points=O,V[Y].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),V[Y]=O)}for(Y=U;Y<V.length;Y++)V[Y].destroy();V.splice(U,V.length-U)}});E(this.horizontalPageBreaks);
-E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,Q){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
-k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,Q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,Q=0<E.height?E.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,Q)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,Q+E.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,Q,d,f,g){var x=D.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(z){mxEvent.consume(z)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(E,K,Q){var d=this.graph.model.getParent(E);if(K){var f=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(E)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(E))}else if(f=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(Q.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),Q=K.getParent(E),d=this.graph.view.getState(Q),f=this.graph.isCellSelected(E);null!=d&&(K.isVertex(Q)||K.isEdge(Q));){var g=this.graph.isCellSelected(Q);f=f||g;if(g||!f&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=Q;Q=K.getParent(Q)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var D=m.getGraphBounds;m.getGraphBounds=function(){var P=D.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ja=this.view.translate,ka=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((ja.x+da.x)*ka,(ja.y+da.y)*ka,da.width*ka,da.height*ka))}return P};m.useCssTransforms&&
+E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,L,Q){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
+k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(L,Q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),L=0<E.width?E.x/this.scale-this.translate.x:0,Q=0<E.height?E.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
+f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,Q)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+E.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,Q+E.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,L,Q,d,f,g){var x=D.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(z){mxEvent.consume(z)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(E,L,Q){var d=this.graph.model.getParent(E);if(L){var f=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(E)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(E))}else if(f=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(Q.getEvent())||
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var L=this.graph.getModel(),Q=L.getParent(E),d=this.graph.view.getState(Q),f=this.graph.isCellSelected(E);null!=d&&(L.isVertex(Q)||L.isEdge(Q));){var g=this.graph.isCellSelected(Q);f=f||g;if(g||!f&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=Q;Q=L.getParent(Q)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var D=m.getGraphBounds;m.getGraphBounds=function(){var P=D.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ja=this.view.translate,ka=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((ja.x+da.x)*ka,(ja.y+da.y)*ka,da.width*ka,da.height*ka))}return P};m.useCssTransforms&&
(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(P,da){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(P){return!mxEvent.isPopupTrigger(P.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),Q=!1,d=!1;this.setDefaultStyle=function(P){try{var da=m.getCellStyle(P,!1),ja=[],ka=[],q;for(q in da)ja.push(da[q]),ka.push(q);m.getModel().isEdge(P)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[P]));m.getModel().isEdge(P)?d=!0:Q=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){m.currentEdgeStyle=
+L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),Q=!1,d=!1;this.setDefaultStyle=function(P){try{var da=m.getCellStyle(P,!1),ja=[],ka=[],q;for(q in da)ja.push(da[q]),ka.push(q);m.getModel().isEdge(P)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[P]));m.getModel().isEdge(P)?d=!0:Q=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){m.currentEdgeStyle=
mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);Q=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);var z=function(P,da,ja,ka,q,F,R){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;F=null!=F?F:!0;ja=null!=ja?ja:m.getModel();if(R){R=[];for(var W=0;W<P.length;W++)R=R.concat(ja.getDescendants(P[W]));P=R}ja.beginUpdate();try{for(W=0;W<P.length;W++){var T=
P[W];if(da)var ba=["fontSize","fontFamily","fontColor"];else{var ia=ja.getStyle(T),ra=null!=ia?ia.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var ma=ra[ta],pa=ma.indexOf("=");if(0<=pa){var za=ma.substring(0,pa),Ba=mxUtils.indexOf(ba,za);0<=Ba&&ba.splice(Ba,1);for(R=0;R<x.length;R++){var Ia=x[R];if(0<=mxUtils.indexOf(Ia,za))for(var Aa=0;Aa<Ia.length;Aa++){var Ka=mxUtils.indexOf(ba,Ia[Aa]);0<=Ka&&ba.splice(Ka,1)}}}}}var Da=ja.isEdge(T);R=Da?q:ka;var Ra=ja.getStyle(T);for(ta=0;ta<ba.length;ta++){za=
-ba[ta];var Qa=R[za];null!=Qa&&"edgeStyle"!=za&&("shape"!=za||Da)&&(!Da||F||0>mxUtils.indexOf(K,za))&&(Ra=mxUtils.setStyle(Ra,za,Qa))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ja.setStyle(T,Ra)}}finally{ja.endUpdate()}return P};m.addListener("cellsInserted",function(P,da){z(da.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(P,da){z(da.getProperty("cells"),!0)});this.insertHandler=z;this.createDivs();this.createUi();
+ba[ta];var Qa=R[za];null!=Qa&&"edgeStyle"!=za&&("shape"!=za||Da)&&(!Da||F||0>mxUtils.indexOf(L,za))&&(Ra=mxUtils.setStyle(Ra,za,Qa))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ja.setStyle(T,Ra)}}finally{ja.endUpdate()}return P};m.addListener("cellsInserted",function(P,da){z(da.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(P,da){z(da.getProperty("cells"),!0)});this.insertHandler=z;this.createDivs();this.createUi();
this.refresh();var u=mxUtils.bind(this,function(P){null==P&&(P=window.event);return m.isEditing()||null!=P&&this.isSelectionAllowed(P)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown=u,this.formatContainer.onselectstart=u,
this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(P){if(null!=P){var da=mxEvent.getSource(P);if("A"==da.nodeName)for(;null!=da;){if("geHint"==da.className)return!0;da=da.parentNode}}return u(P)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=ca.hoverIcons&&ca.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(P){var da=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(P)-da.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(P)-da.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var L=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(P,da){return L||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(P){32!=P.which||m.isEditing()?mxEvent.isConsumed(P)||
-27!=P.keyCode||this.hideDialog(null,!0):(L=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(P)!=m.container||mxEvent.consume(P))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(P){m.container.style.cursor="";L=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(P){return G.apply(this,arguments)||L||mxEvent.isMouseEvent(P.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(P.getEvent()))&&(!mxEvent.isControlDown(P.getEvent())&&mxEvent.isRightMouseButton(P.getEvent())||mxEvent.isMiddleMouseButton(P.getEvent()))};var V=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(P){return V.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var U=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return L||
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(P)-da.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(P)-da.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var K=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(P,da){return K||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(P){32!=P.which||m.isEditing()?mxEvent.isConsumed(P)||
+27!=P.keyCode||this.hideDialog(null,!0):(K=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(P)!=m.container||mxEvent.consume(P))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(P){m.container.style.cursor="";K=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(P){return G.apply(this,arguments)||K||mxEvent.isMouseEvent(P.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(P.getEvent()))&&(!mxEvent.isControlDown(P.getEvent())&&mxEvent.isRightMouseButton(P.getEvent())||mxEvent.isMiddleMouseButton(P.getEvent()))};var V=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(P){return V.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var U=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return K||
U.apply(this,arguments)};var Y=!1,O=null,qa=null,oa=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&Y!=m.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,da=[];null!=P;){var ja=P.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,P)&&(P.parentNode.removeChild(P),da.push(P));P=ja}P=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]);this.toolbar.fontMenu=
O;this.toolbar.sizeMenu=qa}Y=m.cellEditor.isContentEditing();O=P;qa=ja;oa=da}}),ca=this,fa=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){fa.apply(this,arguments);aa();if(m.cellEditor.isContentEditing()){var P=!1,da=function(){P||(P=!0,window.setTimeout(function(){var ja=m.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=ca.toolbar&&(ca.toolbar.setFontName(Graph.stripQuotes(ja.fontFamily)),ca.toolbar.setFontSize(parseInt(ja.fontSize))));P=!1},0))};
mxEvent.addListener(m.cellEditor.textarea,"input",da);mxEvent.addListener(m.cellEditor.textarea,"touchend",da);mxEvent.addListener(m.cellEditor.textarea,"mouseup",da);mxEvent.addListener(m.cellEditor.textarea,"keyup",da);da()}};var J=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(P,da){try{J.apply(this,arguments),aa()}catch(ja){ca.handleError(ja)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(P){}var Z=
@@ -2105,7 +2105,7 @@ da=String(m.currentVertexStyle.fontSize||"12"),ja=m.getView().getState(m.getSele
m.getModel().isLayer(da)&&!m.isCellVisible(da)&&null!=P&&0<P.length&&m.getModel().setVisible(da,!0)});this.gestureHandler=mxUtils.bind(this,function(P){null!=this.currentMenu&&mxEvent.getSource(P)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});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(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(K,Q){var d=p;p+=Q;return K.substring(d,p)}function D(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=D(b);var E=m(b,4);if(null!=e&&e(p-8,E,k))break;value=m(b,k);m(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function m(L,Q){var d=p;p+=Q;return L.substring(d,p)}function D(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=D(b);var E=m(b,4);if(null!=e&&e(p-8,E,k))break;value=m(b,k);m(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2113,7 +2113,7 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,D=0;D<e.length;D++){var p=b.getCurrentCellStyle(e[D]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[D],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
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,rounded:!0,autoSize:!1,image:!0,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){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),D=k.getParent(m),p=m.getIndex(e[0]),E=D.getIndex(m),K=null,Q=1,d=1,f=0,g=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&Q!=K||(K=Q,Q=0,d++,m=k.getParent(g),g=E+d<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+d),p):null);var z=this.editor.graph.view.getState(x);
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),D=k.getParent(m),p=m.getIndex(e[0]),E=D.getIndex(m),L=null,Q=1,d=1,f=0,g=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&Q!=L||(L=Q,Q=0,d++,m=k.getParent(g),g=E+d<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+d),p):null);var z=this.editor.graph.view.getState(x);
if(x==k.getChildAt(m,p+Q)&&null!=z&&1==mxUtils.getValue(z.style,"colspan",1)&&1==mxUtils.getValue(z.style,"rowspan",1))Q++;else break}f==d*Q-1&&(b.mergeCell=e[0],b.colspan=Q,b.rowspan=d)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var p=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
@@ -2121,15 +2121,15 @@ b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.wid
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(Q,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(Q)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q));mxEvent.consume(Q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(Q,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?E.apply(this,arguments):this.graph.connectVertex(Q.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,z,u){var H=b.getCompositeParent(Q.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell=
-H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(L){u(L);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(L))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var z=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-z.x;z=b.container.scrollTop+f.y-z.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),L=e.showShapePicker(u,z,H,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,V,U){U(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},
-function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(L,f,u,z,g);mxUtils.setOpacity(L,30);mxEvent.addListener(L,"mouseenter",function(){mxUtils.setOpacity(L,100)});mxEvent.addListener(L,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K)}))}};
+H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(K){u(K);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(K))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
+d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var z=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-z.x;z=b.container.scrollTop+f.y-z.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),K=e.showShapePicker(u,z,H,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,V,U){U(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},
+function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(K,f,u,z,g);mxUtils.setOpacity(K,30);mxEvent.addListener(K,"mouseenter",function(){mxUtils.setOpacity(K,100)});mxEvent.addListener(K,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,d){null!=L&&window.clearTimeout(L)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,m,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,m,D,p){b=this.createShapePicker(b,e,k,m,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,D,p,E,K){var Q=null;if(null!=E&&0<E.length){var d=this,f=this.editor.graph;Q=document.createElement("div");D=f.view.getState(k);var g=null==k||null!=D&&f.isTransparentState(D)?null:f.copyStyle(k);k=6>E.length?35*E.length:140;Q.className="geToolbarContainer geSidebarContainer";Q.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(Q.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(Q.style.backgroundColor=f.background);f.container.appendChild(Q);k=mxUtils.bind(this,function(x){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";Q.appendChild(z);null!=g&&"1"!=urlParams.sketch?
+EditorUi.prototype.createShapePicker=function(b,e,k,m,D,p,E,L){var Q=null;if(null!=E&&0<E.length){var d=this,f=this.editor.graph;Q=document.createElement("div");D=f.view.getState(k);var g=null==k||null!=D&&f.isTransparentState(D)?null:f.copyStyle(k);k=6>E.length?35*E.length:140;Q.className="geToolbarContainer geSidebarContainer";Q.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(Q.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(Q.style.backgroundColor=f.background);f.container.appendChild(Q);k=mxUtils.bind(this,function(x){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";Q.appendChild(z);null!=g&&"1"!=urlParams.sketch?
this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,z,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(z,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u);
-f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(D=0;D<(K?Math.min(E.length,4):E.length);D++)k(E[D]);E=Q.offsetTop+Q.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<E&&(Q.style.top=Math.max(f.container.scrollTop+22,e-E)+"px");E=Q.offsetLeft+Q.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<E&&(Q.style.left=Math.max(f.container.scrollLeft+22,b-E)+"px")}return Q};
+f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(D=0;D<(L?Math.min(E.length,4):E.length);D++)k(E[D]);E=Q.offsetTop+Q.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<E&&(Q.style.top=Math.max(f.container.scrollTop+22,e-E)+"px");E=Q.offsetLeft+Q.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<E&&(Q.style.left=Math.max(f.container.scrollLeft+22,b-E)+"px")}return Q};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,D,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,D||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2144,8 +2144,8 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.
"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var K={},Q=p.createCellLookup(E),d=p.cloneCells(E,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var z=p.view.getState(E[x]);if(null!=z){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(E[x])&&null==Q[mxObjectIdentity.get(f.getParent(E[x]))]&&(u.offset=null,u.relative=!1,u.x=z.x/z.view.scale-z.view.translate.x,u.y=z.y/z.view.scale-z.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,Q),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var L={},Q=p.createCellLookup(E),d=p.cloneCells(E,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),x=0;x<d.length;x++){f.add(g,d[x]);var z=p.view.getState(E[x]);if(null!=z){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(E[x])&&null==Q[mxObjectIdentity.get(f.getParent(E[x]))]&&(u.offset=null,u.relative=!1,u.x=z.x/z.view.scale-z.view.translate.x,u.y=z.y/z.view.scale-z.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,Q),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;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 P=this.graph.getPageLayout(),da=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*da.width),this.scale*(this.translate.y+P.y*da.height),this.scale*P.width*da.width,
@@ -2156,14 +2156,14 @@ ra||q.height<ia)b.view.scaleAndTranslate(P,Math.floor(da-T.x),Math.floor(ta-T.y)
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(P,da,ja){E++;
var ka=document.createElement("span");ka.style.paddingLeft="8px";ka.style.paddingRight="8px";ka.style.cursor="pointer";mxEvent.addListener(ka,"click",P);null!=ja&&ka.setAttribute("title",ja);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",da);P.style.width="36px";P.style.filter="invert(100%)";ka.appendChild(P);this.chromelessToolbar.appendChild(ka);return ka});null!=D.backBtn&&p(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
-Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var K=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),Q=document.createElement("div");Q.style.fontFamily=Editor.defaultHtmlFont;Q.style.display="inline-block";Q.style.verticalAlign="top";Q.style.fontWeight="bold";Q.style.marginTop="8px";Q.style.fontSize="14px";Q.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(Q);var d=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(Q.innerText="",mxUtils.write(Q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});K.style.paddingLeft="0px";K.style.paddingRight="4px";d.style.paddingLeft="4px";d.style.paddingRight="0px";var g=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(d.style.display="",K.style.display="",Q.style.display="inline-block"):(d.style.display="none",K.style.display="none",Q.style.display="none");f()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",f)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var L=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),Q=document.createElement("div");Q.style.fontFamily=Editor.defaultHtmlFont;Q.style.display="inline-block";Q.style.verticalAlign="top";Q.style.fontWeight="bold";Q.style.marginTop="8px";Q.style.fontSize="14px";Q.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
+this.chromelessToolbar.appendChild(Q);var d=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(Q.innerText="",mxUtils.write(Q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});L.style.paddingLeft="0px";L.style.paddingRight="4px";d.style.paddingLeft="4px";d.style.paddingRight="0px";var g=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(d.style.display="",L.style.display="",Q.style.display="inline-block"):(d.style.display="none",L.style.display="none",Q.style.display="none");f()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",f)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var x=null,z=null,u=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);x=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);x=null;z=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";z=null}),600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var da=L.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+0);x=null;z=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";z=null}),600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var K=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var da=K.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
"4px 2px 4px 2px";this.layersDialog.style.left=da.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));da=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=da.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){L.style.display=1<C.getChildCount(C.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=
+this.layersDialog.style.zIndex=da.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){K.style.display=1<C.getChildCount(C.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var G=this.lightboxToolbarActions[g];G.elem=p(G.fn,G.icon,G.tooltip)}null!=D.refreshBtn&&p(mxUtils.bind(this,function(P){D.refreshBtn.url?window.location.href=D.refreshBtn.url:
window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,
function(P){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||(mxEvent.isShiftDown(P)||
@@ -2198,7 +2198,7 @@ b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Ma
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,D=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,D=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-D);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(D,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),d=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-Q));p=Math.max(0,Math.min(p,K-d));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,d)};var m=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),d=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-Q));p=Math.max(0,Math.min(p,L-d));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,d)};var m=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,k,m,D){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
@@ -2208,7 +2208,7 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(E,K){p.apply(this,arguments);m()};m()};
+this.editor.graph.cellEditor.stopEditing=function(E,L){p.apply(this,arguments);m()};m()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<m.length;D++)this.actions.get(m[D]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
@@ -2218,9 +2218,9 @@ this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEn
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+m;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
-this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
+this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2231,19 +2231,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function D(g){if(null!=E){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-E.x:E.y-x.y)-k));mxEvent.consume(g);K!=f()&&(Q=!0,d=null)}}function p(g){D(g);E=K=null}var E=null,K=null,Q=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){E=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));K=f();Q=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!Q&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,m){function D(g){if(null!=E){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-E.x:E.y-x.y)-k));mxEvent.consume(g);L!=f()&&(Q=!0,d=null)}}function p(g){D(g);E=L=null}var E=null,L=null,Q=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){E=new mxPoint(mxEvent.getClientX(g),
+mxEvent.getClientY(g));L=f();Q=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!Q&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,m,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(e,D,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,D,p,E,K,Q,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,D,p,E,g,K,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,D,p,E,K,Q,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,D,p,E,K,Q,d);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,m,D,p,E,L,Q,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,D,p,E,g,L,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,D,p,E,L,Q,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,D,p,E,L,Q,d);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],D=0;D<e.length;D++){var p=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(E){this.handleError(E)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,D,!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.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=E.lastIndexOf("%3E");
-0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(f){}try{var Q=p.getElementsByTagName("span"),d=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(E);this.isCompatibleString(d)&&(E=d)}catch(f){}}catch(f){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=E.lastIndexOf("%3E");
+0<=L&&L<E.length-3&&(E=E.substring(0,L+3))}catch(f){}try{var Q=p.getElementsByTagName("span"),d=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(E);this.isCompatibleString(d)&&(E=d)}catch(f){}}catch(f){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2259,11 +2259,11 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,z){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(z){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var L=m.getCellGeometry(u[H]);null!=L&&(L=L.clone(),37==g?L.width=Math.max(0,L.width-x):38==g?L.height=Math.max(0,L.height-x):39==g?L.width+=x:40==g&&(L.height+=x),m.getModel().setGeometry(u[H],
-L))}}finally{m.getModel().endUpdate()}}else{L=m.model.getParent(H);var C=m.getView().scale;z=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(z=m.layoutManager.getLayout(L));if(null!=z&&z.constructor==mxStackLayout)x=L.getIndex(H),37==g||38==g?m.model.add(L,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(L,H,Math.min(m.model.getChildCount(L),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
+EditorUi.prototype.createKeyHandler=function(b){function e(g,x,z){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(z){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var K=m.getCellGeometry(u[H]);null!=K&&(K=K.clone(),37==g?K.width=Math.max(0,K.width-x):38==g?K.height=Math.max(0,K.height-x):39==g?K.width+=x:40==g&&(K.height+=x),m.getModel().setGeometry(u[H],
+K))}}finally{m.getModel().endUpdate()}}else{K=m.model.getParent(H);var C=m.getView().scale;z=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(z=m.layoutManager.getLayout(K));if(null!=z&&z.constructor==mxStackLayout)x=K.getIndex(H),37==g||38==g?m.model.add(K,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(K,H,Math.min(m.model.getChildCount(K),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*C,G.currentDy+=H*C,G.checkPreview(),G.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=G.first){var V=G.roundLength(G.currentDx/C),U=G.roundLength(G.currentDy/C);G.moveCells(G.cells,V,U);G.reset()}},400))}}}}var k=this,m=this.editor.graph,D=new mxKeyHandler(m),p=D.isEventIgnored;D.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var E=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=D.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var z=m.connectVertex(m.getSelectionCell(),K[g.keyCode],
+89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var E=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=D.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var z=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
m.defaultEdgeLength,g,!0);null!=z&&0<z.length&&(1==z.length&&m.model.isEdge(z[0])?m.setSelectionCell(m.model.getTerminal(z[0],!1)):m.setSelectionCell(z[z.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return Q.apply(this,arguments)};D.bindAction=mxUtils.bind(this,
function(g,x,z,u){var H=this.actions.get(z);null!=H&&(z=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?D.bindControlShiftKey(g,z):D.bindControlKey(g,z):u?D.bindShiftKey(g,z):D.bindKey(g,z))});var d=this,f=D.escape;D.escape=function(g){f.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){m.exitGroup()});D.bindControlShiftKey(35,function(){m.enterGroup()});D.bindShiftKey(36,function(){m.home()});D.bindKey(35,function(){m.refresh()});D.bindAction(107,!0,"zoomIn");
D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),D.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),D.bindControlKey(13,function(){d.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
@@ -2276,33 +2276,33 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var D=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var K=Number(D.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var Q=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=D[d],Q[d]=p?"undefined"===typeof E?p(f,d):p.call(E,f,d):f,d+=1;Q.length=K;return Q}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var L=Number(D.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var Q=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=D[d],Q[d]=p?"undefined"===typeof E?p(f,d):p.call(E,f,d):f,d+=1;Q.length=L;return Q}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,e,k,m,D,p){mxGraph.call(this,b,e,k,m);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(J){J=this.getCurrentCellStyle(J);
-return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,K=null,Q=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){J=Z.getProperty("event");var P=J.getState();Z=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),f=this.isCellSelected(P.cell),Q=P,K=J,null!=P.text&&null!=
+return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,L=null,Q=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){J=Z.getProperty("event");var P=J.getState();Z=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),f=this.isCellSelected(P.cell),Q=P,L=J,null!=P.text&&null!=
P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,J.getGraphX(),J.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var da=this.selectionCellsHandler.getHandler(P.cell);null!=da&&null!=da.bends&&0<da.bends.length&&(d=da.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(da=this.selectionCellsHandler.getHandler(P.cell),null==da||null==da.getHandleForEvent(J))){var ja=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),ka=mxEvent.isTouchEvent(J.getEvent())?
mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;da=ka+2;ja.grow(ka);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,J.getGraphX()-da,J.getGraphY()-da)&&mxUtils.contains(P,J.getGraphX()-da,J.getGraphY()+da)&&mxUtils.contains(P,J.getGraphX()+da,J.getGraphY()+da)&&mxUtils.contains(P,J.getGraphX()+da,J.getGraphY()-da))){var q=this.model.getParent(P.cell);da=this.model.getParent(q);if(!this.isCellSelected(da)){ka*=Z;var F=2*ka;if(this.model.getChildAt(da,
0)!=q&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y-ka,P.width,F))||this.model.getChildAt(q,0)!=P.cell&&mxUtils.intersects(ja,new mxRectangle(P.x-ka,P.y,F,P.height))||mxUtils.intersects(ja,new mxRectangle(P.x,P.y+P.height-ka,P.width,F))||mxUtils.intersects(ja,new mxRectangle(P.x+P.width-ka,P.y,F,P.height)))q=this.selectionCellsHandler.isHandled(da),this.selectCellForEvent(da,J.getEvent()),da=this.selectionCellsHandler.getHandler(da),null!=da&&(ka=da.getHandleForEvent(J),null!=ka&&(da.start(J.getGraphX(),
J.getGraphY(),ka),da.blockDelayedSelection=!q,J.consume()))}}for(;!J.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(da=this.getActualStartSize(P.cell),(0<da.x||0<da.width)&&mxUtils.intersects(ja,new mxRectangle(P.x+(da.x-da.width-1)*Z+(0==da.x?P.width:0),P.y,1,P.height))||(0<da.y||0<da.height)&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y+(da.y-da.height-1)*Z+(0==da.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,
J.getEvent()),da=this.selectionCellsHandler.getHandler(P.cell),null!=da&&(ka=mxEvent.CUSTOM_HANDLE-da.customHandles.length+1,da.start(J.getGraphX(),J.getGraphY(),ka),J.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(J,Z){},mouseMove:mxUtils.bind(this,function(J,Z){J=this.selectionCellsHandler.handlers.map;for(var P in J)if(null!=J[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(Z.getEvent())){var da=
-this.tolerance;if(null!=E&&null!=Q&&null!=K){if(P=Q,Math.abs(E.x-Z.getGraphX())>da||Math.abs(E.y-Z.getGraphY())>da){var ja=this.selectionCellsHandler.getHandler(P.cell);null==ja&&this.model.isEdge(P.cell)&&(ja=this.createHandler(P));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){J=ja.getHandleForEvent(K);var ka=this.view.getEdgeStyle(P);da=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(J=d);if(da&&0!=J&&J!=ja.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!da||null==P.visibleSourceState&&null==
+this.tolerance;if(null!=E&&null!=Q&&null!=L){if(P=Q,Math.abs(E.x-Z.getGraphX())>da||Math.abs(E.y-Z.getGraphY())>da){var ja=this.selectionCellsHandler.getHandler(P.cell);null==ja&&this.model.isEdge(P.cell)&&(ja=this.createHandler(P));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){J=ja.getHandleForEvent(L);var ka=this.view.getEdgeStyle(P);da=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(J=d);if(da&&0!=J&&J!=ja.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!da||null==P.visibleSourceState&&null==
P.visibleTargetState||(this.graphHandler.reset(),Z.consume());else if(J==mxEvent.LABEL_HANDLE||0==J||null!=P.visibleSourceState||J==ja.bends.length-1||null!=P.visibleTargetState)da||J==mxEvent.LABEL_HANDLE||(da=P.absolutePoints,null!=da&&(null==ka&&null==J||ka==mxEdgeStyle.OrthConnector)&&(J=d,null==J&&(J=new mxRectangle(E.x,E.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,da[0].x,da[0].y)?J=0:mxUtils.contains(J,da[da.length-1].x,da[da.length-1].y)?J=ja.bends.length-1:null!=
ka&&(2==da.length||3==da.length&&(0==Math.round(da[0].x-da[1].x)&&0==Math.round(da[1].x-da[2].x)||0==Math.round(da[0].y-da[1].y)&&0==Math.round(da[1].y-da[2].y)))?J=2:(J=mxUtils.findNearestSegment(P,E.x,E.y),J=null==ka?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),ja.start(Z.getGraphX(),Z.getGraphX(),J),Z.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,
-ja),this.selectCellForEvent(P.cell,Z.getEvent())):this.isCellSelected(P.cell)||ja.destroy());f=!1;E=K=Q=d=null}}else if(P=Z.getState(),null!=P&&this.isCellEditable(P.cell)){ja=null;if(this.model.isEdge(P.cell)){if(J=new mxRectangle(Z.getGraphX(),Z.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),da=P.absolutePoints,null!=da)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,Z.getGraphX(),Z.getGraphY()))ja="move";else if(mxUtils.contains(J,da[0].x,da[0].y)||
+ja),this.selectCellForEvent(P.cell,Z.getEvent())):this.isCellSelected(P.cell)||ja.destroy());f=!1;E=L=Q=d=null}}else if(P=Z.getState(),null!=P&&this.isCellEditable(P.cell)){ja=null;if(this.model.isEdge(P.cell)){if(J=new mxRectangle(Z.getGraphX(),Z.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),da=P.absolutePoints,null!=da)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,Z.getGraphX(),Z.getGraphY()))ja="move";else if(mxUtils.contains(J,da[0].x,da[0].y)||
mxUtils.contains(J,da[da.length-1].x,da[da.length-1].y))ja="pointer";else if(null!=P.visibleSourceState||null!=P.visibleTargetState)J=this.view.getEdgeStyle(P),ja="crosshair",J!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(Z=mxUtils.findNearestSegment(P,Z.getGraphX(),Z.getGraphY()),Z<da.length-1&&0<=Z&&(ja=0==Math.round(da[Z].x-da[Z+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(Z.getEvent())){da=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(Z.getGraphX(),Z.getGraphY());
J.grow(da);if(this.isTableCell(P.cell)&&(Z=this.model.getParent(P.cell),da=this.model.getParent(Z),!this.isCellSelected(da)))if(mxUtils.intersects(J,new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(da,0)!=Z||mxUtils.intersects(J,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ja="row-resize";else if(mxUtils.intersects(J,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(Z,0)!=P.cell||mxUtils.intersects(J,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ja="col-resize";for(Z=P;null==
ja&&null!=Z&&(this.isTableCell(Z.cell)||this.isTableRow(Z.cell)||this.isTable(Z.cell));)this.isSwimlane(Z.cell)&&(da=this.getActualStartSize(Z.cell),ka=this.view.scale,(0<da.x||0<da.width)&&mxUtils.intersects(J,new mxRectangle(Z.x+(da.x-da.width-1)*ka+(0==da.x?Z.width*ka:0),Z.y,1,Z.height))?ja="col-resize":(0<da.y||0<da.height)&&mxUtils.intersects(J,new mxRectangle(Z.x,Z.y+(da.y-da.height-1)*ka+(0==da.y?Z.height:0),Z.width,1))&&(ja="row-resize")),Z=this.view.getState(this.model.getParent(Z.cell))}null!=
-ja&&P.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,function(J,Z){d=E=K=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(Z=1!=J.style.html?mxUtils.htmlEntities(Z,!1):J.view.graph.sanitizeHtml(Z));return Z};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);
+ja&&P.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,function(J,Z){d=E=L=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(Z=1!=J.style.html?mxUtils.htmlEntities(Z,!1):J.view.graph.sanitizeHtml(Z));return Z};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(J,Z){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=g.apply(this,arguments);
if(this.graph.pageVisible){var Z=[],P=this.graph.pageFormat,da=this.graph.pageScale,ja=P.width*da;P=P.height*da;da=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)Z.push(new mxRectangle(((q.x+F)*ja+da.x)*ka,(q.y*P+da.y)*ka,ja*ka,P*ka));for(F=1;F<q.height;F++)Z.push(new mxRectangle((q.x*ja+da.x)*ka,((q.y+F)*P+da.y)*ka,ja*ka,P*ka));J=Z.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(J,Z){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(J){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(J){for(var Z=x.apply(this,arguments),P=new mxDictionary,da=[],ja=0;ja<Z.length;ja++){var ka=this.graph.isTableCell(J)&&this.graph.isTableCell(Z[ja])&&
this.graph.isCellSelected(Z[ja])?this.graph.model.getParent(Z[ja]):this.graph.isTableRow(J)&&this.graph.isTableRow(Z[ja])&&this.graph.isCellSelected(Z[ja])?Z[ja]:this.graph.getCompositeParent(Z[ja]);null==ka||P.get(ka)||(P.put(ka,!0),da.push(ka))}return da};var z=this.graphHandler.start;this.graphHandler.start=function(J,Z,P,da){var ja=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?ja=!0:J=this.graph.model.getParent(J));ja||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));
-z.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),L=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;C.apply(this,arguments);J!=this.currentState?(H=(new Date).getTime(),L=0):L=(new Date).getTime()-H};var G=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(J){return V.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var U=
+z.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),K=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;C.apply(this,arguments);J!=this.currentState?(H=(new Date).getTime(),K=0):K=(new Date).getTime()-H};var G=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<K||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(J){return V.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var U=
u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(J){return U.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};var Y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Y=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=Y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(J){return mxEvent.isMouseEvent(J.getEvent())};var O=this.click;this.click=function(J){var Z=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!Z||J.isConsumed())return O.apply(this,arguments);var P=Z?J.sourceState.cell:J.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?
this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&Z&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var J=this.div.getElementsByTagName("a"),Z=0;Z<J.length;Z++)null!=J[Z].getAttribute("href")&&null==J[Z].getAttribute("target")&&J[Z].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};
@@ -2329,33 +2329,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),D=m.indexOf("<svg");if(0<=D){k.innerHTML=Graph.sanitizeHtml(m.substring(D));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var E=p[0].getAttribute("width"),K=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var Q=p[0].getAttribute("viewBox");if(null!=Q&&!isNaN(E)&&!isNaN(K)){var d=Q.split(" ");4<=Q.length&&(e=parseFloat(d[2])/E,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+1;var E=p[0].getAttribute("width"),L=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var Q=p[0].getAttribute("viewBox");if(null!=Q&&!isNaN(E)&&!isNaN(L)){var d=Q.split(" ");4<=Q.length&&(e=parseFloat(d[2])/E,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");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.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;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?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.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,p=!0,E=null,K=mxUtils.bind(this,function(f){p=!0;E=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),Q=mxUtils.bind(this,function(f){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(f))<D&&Math.abs(E.y-mxEvent.getClientY(f))<D}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,p=!0,E=null,L=mxUtils.bind(this,function(f){p=!0;E=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),Q=mxUtils.bind(this,function(f){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(f))<D&&Math.abs(E.y-mxEvent.getClientY(f))<D}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
+g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
-"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var K=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(E){return"1"==
-mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,K){E=null!=E?E:!0;K=null!=K?K:!0;var Q=this.model;return Q.filterDescendants(function(d){return E&&Q.isVertex(d)||K&&Q.isEdge(d)},Q.getRoot())};Graph.prototype.getCommonStyle=
-function(E){for(var K={},Q=0;Q<E.length;Q++){var d=this.view.getState(E[Q]);this.mergeStyle(d.style,K,0==Q)}return K};Graph.prototype.mergeStyle=function(E,K,Q){if(null!=E){var d={},f;for(f in E){var g=E[f];null!=g&&(d[f]=!0,null==K[f]&&Q?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&
-0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),K=this.getCellStyle(E),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(K=0;K<this.model.getChildCount(E);K++){var Q=this.model.getChildAt(E,K);if(this.isCellEditable(Q)){E=Q;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,K,Q){Q=null!=Q?Q:Graph.pasteStyles;
-Graph.removeKeys(E,function(d){return 0>mxUtils.indexOf(Q,d)});this.updateCellStyles(E,K)};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var Q=0;Q<K.length;Q++)if(this.model.isVertex(K[Q])||this.model.isEdge(K[Q])){var d=this.getCellStyle(K[Q],!1),f;for(f in E){var g=E[f];d[f]!=g&&this.setCellStyles(f,g,[K[Q]])}}}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(E,K,Q,d,f,g){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,Q,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,K,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.getState(z),null!=u&&(null==g||!g(u,E,K))&&this.intersects(u,E,K)))return z}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
-!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var K=this.getCellGeometry(E);null!=K&&K.relative;)E=this.getModel().getParent(E),K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K=
-new mxDictionary,Q=[],d=0;d<E.length;d++){var f=this.getCompositeParent(E[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),Q.push(f))}return Q};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var K=this.model.getParent(E);if(!this.model.isVertex(K))break;E=K}return E};Graph.prototype.filterSelectionCells=function(E){var K=this.getSelectionCells();if(null!=E){for(var Q=[],d=0;d<K.length;d++)E(K[d])||
-Q.push(K[d]);K=Q}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var K=this.currentScale,Q=this.currentTranslate;E=new mxRectangle((E.x+2*Q.x)*K-Q.x,(E.y+2*Q.y)*K-Q.y,E.width*K,E.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
-if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,Q=this.graph.currentScale;E=new mxRectangle((E.x+K.x)*Q,(E.y+K.y)*Q,E.width*Q,E.height*Q)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=m.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTable(E[Q])||this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var K=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
-"scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,K=this.scale,Q=this.translate;
-E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=K,this.translate=Q)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
+"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var L=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(E){return"1"==
+mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,L){E=null!=E?E:!0;L=null!=L?L:!0;var Q=this.model;return Q.filterDescendants(function(d){return E&&Q.isVertex(d)||L&&Q.isEdge(d)},Q.getRoot())};Graph.prototype.getCommonStyle=
+function(E){for(var L={},Q=0;Q<E.length;Q++){var d=this.view.getState(E[Q]);this.mergeStyle(d.style,L,0==Q)}return L};Graph.prototype.mergeStyle=function(E,L,Q){if(null!=E){var d={},f;for(f in E){var g=E[f];null!=g&&(d[f]=!0,null==L[f]&&Q?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(E,L){L=this.getCellStyle(E);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==L)&&""==this.getLabel(E)&&
+0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),L=this.getCellStyle(E),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==L)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(L=0;L<this.model.getChildCount(E);L++){var Q=this.model.getChildAt(E,L);if(this.isCellEditable(Q)){E=Q;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,L,Q){Q=null!=Q?Q:Graph.pasteStyles;
+Graph.removeKeys(E,function(d){return 0>mxUtils.indexOf(Q,d)});this.updateCellStyles(E,L)};Graph.prototype.updateCellStyles=function(E,L){this.model.beginUpdate();try{for(var Q=0;Q<L.length;Q++)if(this.model.isVertex(L[Q])||this.model.isEdge(L[Q])){var d=this.getCellStyle(L[Q],!1),f;for(f in E){var g=E[f];d[f]!=g&&this.setCellStyles(f,g,[L[Q]])}}}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(E,L,Q,d,f,g){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,L,Q,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
+null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,L,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.getState(z),null!=u&&(null==g||!g(u,E,L))&&this.intersects(u,E,L)))return z}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var L=this.getCellGeometry(E);null!=L&&L.relative;)E=this.getModel().getParent(E),L=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var L=
+new mxDictionary,Q=[],d=0;d<E.length;d++){var f=this.getCompositeParent(E[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),Q.push(f))}return Q};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var L=this.model.getParent(E);if(!this.model.isVertex(L))break;E=L}return E};Graph.prototype.filterSelectionCells=function(E){var L=this.getSelectionCells();if(null!=E){for(var Q=[],d=0;d<L.length;d++)E(L[d])||
+Q.push(L[d]);L=Q}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var L=this.currentScale,Q=this.currentTranslate;E=new mxRectangle((E.x+2*Q.x)*L-Q.x,(E.y+2*Q.y)*L-Q.y,E.width*L,E.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
+if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,Q=this.graph.currentScale;E=new mxRectangle((E.x+L.x)*Q,(E.y+L.y)*Q,E.width*Q,E.height*Q)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var L=[],Q=0;Q<E.length;Q++)this.isTableRow(E[Q])||this.isTableCell(E[Q])||L.push(E[Q]);return L};var m=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=m.apply(this,arguments);for(var L=[],Q=0;Q<E.length;Q++)this.isTable(E[Q])||this.isTableRow(E[Q])||this.isTableCell(E[Q])||L.push(E[Q]);return L};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var L=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
+"scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,L=this.scale,Q=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=L,this.translate=Q)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,L,Q){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2369,10 +2369,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,D={};D.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)D[m[p].nodeName]=m[p].nodeValue;else D.label=this.convertValueToString(b[k]);e.push(D)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var D=this.cellRenderer.getShapesForState(m),p=0;p<D.length;p++)null!=D[p]&&null!=D[p].node&&e.push(D[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var D=this.view.getState(b[m]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?k.push(this.createEdgeWipeAnimation(D,e)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&k.push(this.createVertexWipeAnimation(D,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,D=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var Q=[k[0]];K=E/K;e||(K=1-K);for(var d=D*K,f=1;f<p;f++)if(d<=m[f-1]){Q.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],Q.push(k[f]);b.shape.points=Q;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,D=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,L){if(null!=b.shape){var Q=[k[0]];L=E/L;e||(L=1-L);for(var d=D*L,f=1;f<p;f++)if(d<=m[f-1]){Q.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],Q.push(k[f]);b.shape.points=Q;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,D){null!=b.shape&&(D=m/D,e||(D=1-D),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*D,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(D);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});D=window.setInterval(E,m);E()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(D);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});D=window.setInterval(E,m);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2383,27 +2383,27 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(C,G){C=String(C);for(G=G||2;C.length<G;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",Q=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),z=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),L={d:Q,dd:E(Q),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:E(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:E(x%12||12),H:x,HH:E(x),M:z,MM:E(z),s:u,ss:E(u),l:E(K,3),L:E(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in L?L[C]:C.slice(1,
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",Q=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),z=b[L+"Minutes"](),u=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),K={d:Q,dd:E(Q),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:E(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:E(x%12||12),H:x,HH:E(x),M:z,MM:E(z),s:u,ss:E(u),l:E(L,3),L:E(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in K?K[C]:C.slice(1,
C.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),D=m.getChildCount(m.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function K(){m.isVisible(E)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var Q=this.convertValueToString(E)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),D=m.getChildCount(m.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function L(){m.isVisible(E)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var Q=this.convertValueToString(E)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(E)?"hideIt":"show",[Q]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,Q);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(E,!m.isVisible(E));K();null!=b&&b(E)});K()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)E=b.id;else if(0>K.indexOf("{"))for(var Q=b;null==E&&null!=Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=Q.getAttribute(K+"_"+Graph.diagramLanguage)),
-null==E&&(E=Q.hasAttribute(K)?null!=Q.getAttribute(K)?Q.getAttribute(K):"":null)),Q=this.model.getParent(Q);null==E&&(E=this.getGlobalVariable(K));null==E&&null!=k&&(E=k[K])}m.push(e.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}m.push(e.substring(D))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
+mxEvent.addListener(d,"click",function(){m.setVisible(E,!m.isVisible(E));L();null!=b&&b(E)});L()})(m.getChildAt(m.root,p));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)E=b.id;else if(0>L.indexOf("{"))for(var Q=b;null==E&&null!=Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=Q.getAttribute(L+"_"+Graph.diagramLanguage)),
+null==E&&(E=Q.hasAttribute(L)?null!=Q.getAttribute(L)?Q.getAttribute(L):"":null)),Q=this.model.getParent(Q);null==E&&(E=this.getGlobalVariable(L));null==E&&null!=k&&(E=k[L])}m.push(e.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}m.push(e.substring(D))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),D=this.model.getParent(m),p=this.model.getParent(e);if(D==this.model.getParent(p)){b=m.getIndex(b);m=D.getIndex(m);var E=p.getIndex(e),K=D.getIndex(p);p=Math.max(m,K);e=Math.min(b,E);b=Math.max(b,E);E=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(D,m);for(var Q=e;Q<=b;Q++)E.push(this.model.getChildAt(K,Q))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),D=this.model.getParent(m),p=this.model.getParent(e);if(D==this.model.getParent(p)){b=m.getIndex(b);m=D.getIndex(m);var E=p.getIndex(e),L=D.getIndex(p);p=Math.max(m,L);e=Math.min(b,E);b=Math.max(b,E);E=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(D,m);for(var Q=e;Q<=b;Q++)E.push(this.model.getChildAt(L,Q))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],D=this.getCellGeometry(m);if(null!=D){D=D.clone();if(this.getModel().isVertex(m))D.x=Math.round(D.x/e)*e,D.y=Math.round(D.y/e)*e,D.width=Math.round(D.width/e)*e,D.height=Math.round(D.height/e)*e;else if(this.getModel().isEdge(m)&&null!=D.points)for(var p=0;p<D.points.length;p++)D.points[p].x=Math.round(D.points[p].x/e)*e,D.points[p].y=Math.round(D.points[p].y/e)*e;this.getModel().setGeometry(m,
D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,D,p,E,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),d=Q?b:this.getCompositeParent(b),f=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(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
+Graph.prototype.connectVertex=function(b,e,k,m,D,p,E,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),d=Q?b:this.getCompositeParent(b),f=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(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var z=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==z||p[H]==this.model.getParent(b)))z=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var L=this.view.getState(p[H]);null==g||null==L||mxUtils.intersects(g,L)||(u=p[H])}}var C=
+this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var z=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==z||p[H]==this.model.getParent(b)))z=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var K=this.view.getState(p[H]);null==g||null==K||mxUtils.intersects(g,K)||(u=p[H])}}var C=
!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||D;C&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],V=u;u=z;D=mxUtils.bind(this,function(U){if(null==E||null!=U||null==u&&Q){this.model.beginUpdate();try{if(null==V&&C){var Y=this.getAbsoluteParent(null!=U?U:b);Y=Q?b:this.getCompositeParent(Y);V=null!=U?U:this.duplicateCells([Y],
!1)[0];null!=U&&this.addCells([V],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(V);null!=O&&(null!=U&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=O.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-O.width/2:f.x+O.width/2),O.x=f.x-O.width/2,O.y=f.y-O.height/2);null!=z?(this.addCells([V],z,null,null,null,!0),u=null):C&&!Q&&this.addCells([V],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&&
mxEvent.isShiftDown(m)&&C||null==u&&Q?null:this.insertEdge(this.model.getParent(b),null,"",b,V,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(U=b;null!=U.parent&&null!=U.geometry&&U.geometry.relative&&U.parent!=qa.parent;)U=this.model.getParent(U);null!=U&&null!=U.parent&&U.parent==qa.parent&&(oa=U.parent.getIndex(U),this.model.add(U.parent,qa,oa))}null==u&&null!=V&&null!=b.parent&&Q&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent,
-V,oa));null!=qa&&G.push(qa);null==u&&null!=V&&G.push(V);null==V&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==E||null!=V||!C||null==u&&Q)return D(V);E(d+f.x*k,x+f.y*k,D)};
+V,oa));null!=qa&&G.push(qa);null==u&&null!=V&&G.push(V);null==V&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=L)L(G);else return G});if(null==E||null!=V||!C||null==u&&Q)return D(V);E(d+f.x*k,x+f.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,D=0;D<b.length;D++)if(m=b[D],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}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){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2412,7 +2412,7 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=E&&null!=K){var Q=Math.round(K.width-E.width/this.view.scale),d=Math.round(K.height-E.height/this.view.scale);if(0!=d||0!=Q){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
+Graph.prototype.foldCells=function(b,e,k,m,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=E&&null!=L){var Q=Math.round(L.width-E.width/this.view.scale),d=Math.round(L.height-E.height/this.view.scale);if(0!=d||0!=Q){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
null==g?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,f,Q,d):null!=D&&mxEvent.isAltDown(D)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,Q,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var p=this.view.getState(D[e]),E=this.getCellGeometry(D[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(D[e],E))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=m+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
@@ -2450,52 +2450,52 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),D=k.getGraphX(),p=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,Q,d){if(null!=k){var f=new mxRectangle(Q,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?Q+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(Q-=f.x+f.width-k.x))}K.style.left=Q+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,Q,d){if(null!=k){var f=new mxRectangle(Q,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?Q+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(Q-=f.x+f.width-k.x))}L.style.left=Q+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==D&&D==b&&(b=D=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(K,Q){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K,
-this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});E(e,this.arrowRight);E(m,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==D&&D==b&&(b=D=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(L,Q){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
+this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});E(e,this.arrowRight);E(m,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,
e,k))&&(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.createParent=function(b,e,k,m,D){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),K=this.getCellGeometry(E);null!=K&&(K.x+=p*m,K.y+=p*D);b.insert(E)}return b};
-Graph.prototype.createTable=function(b,e,k,m,D,p,E,K,Q){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=D?D:"",0,0,e*k,b*m+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,Q),e,k,0),b,0,m)};
+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.createParent=function(b,e,k,m,D){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),L=this.getCellGeometry(E);null!=L&&(L.x+=p*m,L.y+=p*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,m,D,p,E,L,Q){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,e*k,b*m+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,Q),e,k,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),D=0;D<m.length;D++)if(null!=k&&(m[D].value=k[D]),null!=e)for(var p=this.model.getChildCells(m[D],!0),E=0;E<p.length;E++)null!=e[D][E]&&(p[E].value=e[D][E]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,D,p,E,K,Q){k=null!=k?k:120;m=null!=m?m:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;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;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,D,p,E,L,Q){k=null!=k?k:120;m=null!=m?m:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;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;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
Q=null!=Q?Q:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=p;D.geometry.height+=p;E=this.createVertex(null,
-null,"",0,p,e*k+p,m,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(E.geometry.y=m+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,k,m,Q),e,k,0),b-1,0,m)):D};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<m.length;D++){for(var p=this.getActualStartSize(m[D],!0),E=this.model.getChildCells(m[D],!0),K=this.getCellStyle(m[D],!0),Q=null,d=[],f=0;f<E.length;f++){var g=this.getCellGeometry(E[f]),x={cell:E[f],rospan:1,colspan:1,row:D,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=Q?Q.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=Q&&1<Q.colspan?(x.rowspan=Q.rowspan,x.colspan=Q.colspan-1,x.actual=Q.actual):(Q=this.getCurrentCellStyle(E[f],!0),null!=Q&&(x.rowspan=parseInt(Q.rowspan||1),x.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,E.length,
-m.length,b.x+(Q?p.x:0),b.y+(Q?p.y:0));d.push(x);Q=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,K,Q,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(Q,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return m.concat(D)};
+null,"",0,p,e*k+p,m,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(E.geometry.y=m+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,k,m,Q),e,k,0),b-1,0,m)):D};
+Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<m.length;D++){for(var p=this.getActualStartSize(m[D],!0),E=this.model.getChildCells(m[D],!0),L=this.getCellStyle(m[D],!0),Q=null,d=[],f=0;f<E.length;f++){var g=this.getCellGeometry(E[f]),x={cell:E[f],rospan:1,colspan:1,row:D,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=Q?Q.point.x:b.x+p.x),g.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=Q&&1<Q.colspan?(x.rowspan=Q.rowspan,x.colspan=Q.colspan-1,x.actual=Q.actual):(Q=this.getCurrentCellStyle(E[f],!0),null!=Q&&(x.rowspan=parseInt(Q.rowspan||1),x.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,E.length,
+m.length,b.x+(Q?p.x:0),b.y+(Q?p.y:0));d.push(x);Q=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,L,Q,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(Q,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return m.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;m.setGeometry(b,D);var p=m.getParent(b),E=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var Q=E[K+1],d=this.getCellGeometry(Q);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(Q,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==E[E.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),D=m.getParent(b),p=m.getParent(D),E=m.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(p,!0),d=0;d<Q.length;d++){D=Q[d];E=m.getChildCells(D,!0);var f=E[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<E.length-1&&(f=E[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;m.setGeometry(b,D);var p=m.getParent(b),E=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(E,b);if(L<E.length-1){var Q=E[L+1],d=this.getCellGeometry(Q);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(Q,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==E[E.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),D=m.getParent(b),p=m.getParent(D),E=m.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var L=b==E.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(p,!0),d=0;d<Q.length;d++){D=Q[d];E=m.getChildCells(D,!0);var f=E[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<E.length-1&&(f=E[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
+g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var D=this.graph.getCellGeometry(b[m]);null!=D&&(k+=e?D.width:D.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var D=[];m=m.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(m+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,D.push(Math.round(m)))}return D};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<p.length;Q++){var d=this.graph.getCellGeometry(p[Q]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[Q],d.width=e[Q+1]-d.x,Q==p.length-1&&Q<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=E,E+=d.width,Q==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),D.setGeometry(p[Q],d))}return K};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var Q=k.height-e.y-e.height,d=k.width-e.x-e.width,f=E.getChildCells(b,!0),g=0;g<f.length;g++)E.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<Q&&0<d&&0<
-f.length&&0<x){if(D){var z=this.graph.getCellGeometry(f[f.length-1]);null!=z&&(z=z.clone(),z.height=Q-x+z.height,E.setGeometry(f[f.length-1],z))}var u=p?null:this.getRowLayout(f[0],d),H=[],L=e.y;for(g=0;g<f.length;g++)z=this.graph.getCellGeometry(f[g]),null!=z&&(z=z.clone(),z.x=e.x,z.width=d,z.y=Math.round(L),L=D||m?L+z.height:L+z.height/x*Q,z.height=Math.round(L)-z.y,E.setGeometry(f[g],z)),K=Math.max(K,this.layoutRow(f[g],u,z.height,d,H));m&&Q<x&&(k=k.clone(),k.height=L+e.height,E.setGeometry(b,
-k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=G.width}C.actual.col==C.col&&(G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)E.setVisible(f[g],
+TableLayout.prototype.layoutRow=function(b,e,k,m){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<p.length;Q++){var d=this.graph.getCellGeometry(p[Q]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[Q],d.width=e[Q+1]-d.x,Q==p.length-1&&Q<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=E,E+=d.width,Q==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
+0,d.width,d.height),D.setGeometry(p[Q],d))}return L};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var E=this.graph.getModel(),L=0;E.beginUpdate();try{for(var Q=k.height-e.y-e.height,d=k.width-e.x-e.width,f=E.getChildCells(b,!0),g=0;g<f.length;g++)E.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<Q&&0<d&&0<
+f.length&&0<x){if(D){var z=this.graph.getCellGeometry(f[f.length-1]);null!=z&&(z=z.clone(),z.height=Q-x+z.height,E.setGeometry(f[f.length-1],z))}var u=p?null:this.getRowLayout(f[0],d),H=[],K=e.y;for(g=0;g<f.length;g++)z=this.graph.getCellGeometry(f[g]),null!=z&&(z=z.clone(),z.x=e.x,z.width=d,z.y=Math.round(K),K=D||m?K+z.height:K+z.height/x*Q,z.height=Math.round(K)-z.y,E.setGeometry(f[g],z)),L=Math.max(L,this.layoutRow(f[g],u,z.height,d,H));m&&Q<x&&(k=k.clone(),k.height=K+e.height,E.setGeometry(b,
+k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=G.width}C.actual.col==C.col&&(G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)E.setVisible(f[g],
!1)}finally{E.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(f){D.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,z=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(ca,fa,J){var Z=new mxPoint(fa,J);Z.type=ca;z.push(Z);Z=null!=f.routedPoints?f.routedPoints[z.length-1]:null;return null==Z||Z.type!=
-ca||Z.x!=fa||Z.y!=J},H=.5*this.scale;x=!1;z=[];for(var L=0;L<g.length-1;L++){for(var C=g[L+1],G=g[L],V=[],U=g[L+2];L<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,U.x,U.y,C.x,C.y)<1*this.scale*this.scale;)C=U,L++,U=g[L+2];x=u(0,G.x,G.y)||x;for(var Y=0;Y<this.validEdges.length;Y++){var O=this.validEdges[Y],qa=O.absolutePoints;if(null!=qa&&mxUtils.intersects(f,O)&&"1"!=O.style.noJump)for(O=0;O<qa.length-1;O++){var oa=qa[O+1],aa=qa[O];for(U=qa[O+2];O<qa.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,oa.x,
+ca||Z.x!=fa||Z.y!=J},H=.5*this.scale;x=!1;z=[];for(var K=0;K<g.length-1;K++){for(var C=g[K+1],G=g[K],V=[],U=g[K+2];K<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,U.x,U.y,C.x,C.y)<1*this.scale*this.scale;)C=U,K++,U=g[K+2];x=u(0,G.x,G.y)||x;for(var Y=0;Y<this.validEdges.length;Y++){var O=this.validEdges[Y],qa=O.absolutePoints;if(null!=qa&&mxUtils.intersects(f,O)&&"1"!=O.style.noJump)for(O=0;O<qa.length-1;O++){var oa=qa[O+1],aa=qa[O];for(U=qa[O+2];O<qa.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,oa.x,
oa.y)<1*this.scale*this.scale;)oa=U,O++,U=qa[O+2];U=mxUtils.intersection(G.x,G.y,C.x,C.y,aa.x,aa.y,oa.x,oa.y);if(null!=U&&(Math.abs(U.x-G.x)>H||Math.abs(U.y-G.y)>H)&&(Math.abs(U.x-C.x)>H||Math.abs(U.y-C.y)>H)&&(Math.abs(U.x-aa.x)>H||Math.abs(U.y-aa.y)>H)&&(Math.abs(U.x-oa.x)>H||Math.abs(U.y-oa.y)>H)){oa=U.x-G.x;aa=U.y-G.y;U={distSq:oa*oa+aa*aa,x:U.x,y:U.y};for(oa=0;oa<V.length;oa++)if(V[oa].distSq>U.distSq){V.splice(oa,0,U);U=null;break}null==U||0!=V.length&&V[V.length-1].x===U.x&&V[V.length-1].y===
U.y||V.push(U)}}}for(O=0;O<V.length;O++)x=u(1,V[O].x,V[O].y)||x}U=g[g.length-1];x=u(0,U.x,U.y)||x}f.routedPoints=z;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){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)p.apply(this,arguments);else{var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),L=!0,C=null,G=null,V=[],U=null;f.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var O=this.state.routedPoints[Y],qa=new mxPoint(O.x/this.scale,O.y/this.scale);0==Y?qa=g[0]:Y==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=C&&1==O.type){var aa=this.state.routedPoints[Y+1];O=aa.x/this.scale-qa.x;aa=aa.y/this.scale-qa.y;
-O=O*O+aa*aa;null==U&&(U=new mxPoint(qa.x-C.x,qa.y-C.y),G=Math.sqrt(U.x*U.x+U.y*U.y),0<G?(U.x=U.x*u/G,U.y=U.y*u/G):U=null);O>u*u&&0<G&&(O=C.x-qa.x,aa=C.y-qa.y,O=O*O+aa*aa,O>u*u&&(oa=new mxPoint(qa.x-U.x,qa.y-U.y),O=new mxPoint(qa.x+U.x,qa.y+U.y),V.push(oa),this.addPoints(f,V,x,z,!1,null,L),V=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,L=!1,"sharp"==H?(f.lineTo(oa.x-U.y*V,oa.y+U.x*V),f.lineTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x,O.y)):"line"==H?(f.moveTo(oa.x+U.y*V,oa.y-U.x*V),f.lineTo(oa.x-
-U.y*V,oa.y+U.x*V),f.moveTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x+U.y*V,O.y-U.x*V),f.moveTo(O.x,O.y)):"arc"==H?(V*=1.3,f.curveTo(oa.x-U.y*V,oa.y+U.x*V,O.x-U.y*V,O.y+U.x*V,O.x,O.y)):(f.moveTo(O.x,O.y),L=!0),V=[O],oa=!0))}else U=null;oa||(V.push(qa),C=qa)}this.addPoints(f,V,x,z,!1,null,L);f.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,z){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
-g.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,z){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,z);var u=this.getNextPoint(f,x,z),H=this.graph.isOrthogonal(f),L=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=L){var G=Math.cos(-L),V=
-Math.sin(-L);u=mxUtils.getRotatedPoint(u,G,V,C)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[z?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==L&&H,G);0!=L&&(G=Math.cos(L),V=Math.sin(L),u=mxUtils.getRotatedPoint(u,G,V,C));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,z,u),z)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,z,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
-z=x=null;if(null!=f)for(var H=0;H<f.length;H++){var L=this.graph.getConnectionPoint(g,f[H]);if(null!=L){var C=(L.x-u.x)*(L.x-u.x)+(L.y-u.y)*(L.y-u.y);if(null==z||C<z)x=L,z=C}}null!=x&&(u=x)}return u};var Q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var z=Q.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(z=x.state.view.graph.replacePlaceholders(x.state.cell,z));return z};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),K=!0,C=null,G=null,V=[],U=null;f.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var O=this.state.routedPoints[Y],qa=new mxPoint(O.x/this.scale,O.y/this.scale);0==Y?qa=g[0]:Y==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=C&&1==O.type){var aa=this.state.routedPoints[Y+1];O=aa.x/this.scale-qa.x;aa=aa.y/this.scale-qa.y;
+O=O*O+aa*aa;null==U&&(U=new mxPoint(qa.x-C.x,qa.y-C.y),G=Math.sqrt(U.x*U.x+U.y*U.y),0<G?(U.x=U.x*u/G,U.y=U.y*u/G):U=null);O>u*u&&0<G&&(O=C.x-qa.x,aa=C.y-qa.y,O=O*O+aa*aa,O>u*u&&(oa=new mxPoint(qa.x-U.x,qa.y-U.y),O=new mxPoint(qa.x+U.x,qa.y+U.y),V.push(oa),this.addPoints(f,V,x,z,!1,null,K),V=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,K=!1,"sharp"==H?(f.lineTo(oa.x-U.y*V,oa.y+U.x*V),f.lineTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x,O.y)):"line"==H?(f.moveTo(oa.x+U.y*V,oa.y-U.x*V),f.lineTo(oa.x-
+U.y*V,oa.y+U.x*V),f.moveTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x+U.y*V,O.y-U.x*V),f.moveTo(O.x,O.y)):"arc"==H?(V*=1.3,f.curveTo(oa.x-U.y*V,oa.y+U.x*V,O.x-U.y*V,O.y+U.x*V,O.x,O.y)):(f.moveTo(O.x,O.y),K=!0),V=[O],oa=!0))}else U=null;oa||(V.push(qa),C=qa)}this.addPoints(f,V,x,z,!1,null,K);f.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,z){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
+g.getCenterY()):E.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,z){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,z);var u=this.getNextPoint(f,x,z),H=this.graph.isOrthogonal(f),K=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=K){var G=Math.cos(-K),V=
+Math.sin(-K);u=mxUtils.getRotatedPoint(u,G,V,C)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[z?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==K&&H,G);0!=K&&(G=Math.cos(K),V=Math.sin(K),u=mxUtils.getRotatedPoint(u,G,V,C));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,z,u),z)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,z,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
+z=x=null;if(null!=f)for(var H=0;H<f.length;H++){var K=this.graph.getConnectionPoint(g,f[H]);if(null!=K){var C=(K.x-u.x)*(K.x-u.x)+(K.y-u.y)*(K.y-u.y);if(null==z||C<z)x=K,z=C}}null!=x&&(u=x)}return u};var Q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var z=Q.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(z=x.state.view.graph.replacePlaceholders(x.state.cell,z));return z};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),z=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(z.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var D=e[m];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
@@ -2504,7 +2504,7 @@ mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"stri
mxStencilRegistry.loadStencilSet=function(b,e,k,m){var D=mxStencilRegistry.packages[b];if(null!=k&&k||null==D){var p=!1;if(null==D)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){D=D.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+p.toLowerCase(),new mxStencil(m));if(null!=e){var E=m.getAttribute("w"),
-K=m.getAttribute("h");E=null==E?80:parseInt(E,10);K=null==K?80:parseInt(K,10);e(D,p,b,E,K)}}m=m.nextSibling}}};
+L=m.getAttribute("h");E=null==E?80:parseInt(E,10);L=null==L?80:parseInt(L,10);e(D,p,b,E,L)}}m=m.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,M){switch(M){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/mxConstants.PIXELS_PER_INCH).toFixed(2)}}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_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return m.apply(this,arguments)||
@@ -2518,7 +2518,7 @@ ha=0;ha<X;ha++)this.createCellLookup([this.model.getChildAt(S,ha)],M)}return M};
xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<xa.length;ha++)ya=this.model.getChildren(this.moveCells([xa[ha]],M,N,!1,this.model.getRoot())[0]),null!=ya&&(y=y.concat(ya));else{var ya=ha.getChildren(xa[0]);null!=ya&&(y=this.moveCells(ya,M,N,!1,this.getDefaultParent()),la[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(X,sa,la),this.updateCustomLinks(la,y),S)){this.isGridEnabled()&&
(M=this.snap(M),N=this.snap(N));var Fa=this.getBoundingBoxFromGeometry(y,!0);null!=Fa&&this.moveCells(y,M-Fa.x,N-Fa.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var M={},N=this.cloneCells(y,null,M),S=new mxDictionary,X=0;X<y.length;X++)S.put(y[X],!0);var ha=new mxCodec,la=new mxGraphModel,xa=la.getChildAt(la.getRoot(),0);for(X=0;X<N.length;X++){la.add(xa,N[X]);var sa=this.view.getState(y[X]);if(null!=sa){var ya=this.getCellGeometry(N[X]);null!=ya&&ya.relative&&
!this.model.isEdge(y[X])&&null==S.get(this.model.getParent(y[X]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,this.createCellLookup(y)),N);return ha.encode(la)};Graph.prototype.isSwimlane=function(y,M){var N=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(N=this.getCurrentCellStyle(y,M)[mxConstants.STYLE_SHAPE]);return N==mxConstants.SHAPE_SWIMLANE||
-"table"==N||"tableRow"==N};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var M=this.model.getParent(y);if(null!=M){var N=this.getCurrentCellStyle(M);if(null!=N.expand)return"0"!=N.expand}return K.apply(this,arguments)&&(null==M||!this.isTable(M))};var Q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,M,N,S,X,ha,la,xa){null==xa&&(xa=this.model.getParent(y),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ha,la,null,!0,!1));N=null;this.model.beginUpdate();
+"table"==N||"tableRow"==N};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var M=this.model.getParent(y);if(null!=M){var N=this.getCurrentCellStyle(M);if(null!=N.expand)return"0"!=N.expand}return L.apply(this,arguments)&&(null==M||!this.isTable(M))};var Q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,M,N,S,X,ha,la,xa){null==xa&&(xa=this.model.getParent(y),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ha,la,null,!0,!1));N=null;this.model.beginUpdate();
try{N=Q.apply(this,[y,M,N,S,X,ha,la,xa]);this.model.setValue(N,"");var sa=this.getChildCells(N,!0);for(M=0;M<sa.length;M++){var ya=this.getCellGeometry(sa[M]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[M])}var Fa=this.getChildCells(y,!0);for(M=0;M<Fa.length;M++)ya=this.getCellGeometry(Fa[M]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[N]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[N]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var wa=this.model.getTerminal(N,!1);if(null!=wa){var ua=this.getCurrentCellStyle(wa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
function(y,M,N){if(M||N)d.apply(this,arguments);else{var S=this.getSelectionCell(),X=null,ha=[],la=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ha.push(xa),xa==S)X=ha.length-1;else if(y&&null==S&&0<ha.length||null!=X&&y&&ha.length>X||!y&&0<X)return;for(var sa=0;sa<this.model.getChildCount(xa);sa++)la(this.model.getChildAt(xa,sa))});la(this.model.root);0<ha.length&&(X=null!=X?mxUtils.mod(X+(y?1:-1),ha.length):0,this.setSelectionCell(ha[X]))}};
@@ -2600,7 +2600,7 @@ this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea
y.style.whiteSpace="pre";y.appendChild(document.createTextNode(S));N.insertNode(y);N.setStartAfter(y);N.setEndAfter(y);M.removeAllRanges();M.addRange(N)};mxCellEditor.prototype.alignText=function(y,M){var N=null!=M&&mxEvent.isShiftDown(M);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(X){N||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"),X.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+
y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var M=[],N=0,S=y.rangeCount;N<S;++N)M.push(y.getRangeAt(N));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var M=0,N=y.length;M<
N;++M)sel.addRange(y[M])}else document.selection&&y.select&&y.select()}catch(S){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,M){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,M){y=this.graph.getStartEditingCell(y,M);L.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);
+function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var K=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,M){y=this.graph.getStartEditingCell(y,M);K.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);
N=this.graph.getModel().getParent(y);var S=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(N)&&null!=S&&S.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function M(X,ha){ha.originalNode=X;X=X.firstChild;for(var la=ha.firstChild;null!=X&&null!=la;)M(X,la),X=X.nextSibling,la=la.nextSibling;
return ha}function N(X,ha){if(null!=X)if(ha.originalNode!=X)S(X);else for(X=X.firstChild,ha=ha.firstChild;null!=X;){var la=X.nextSibling;null==ha?S(X):(N(X,ha),ha=ha.nextSibling);X=la}}function S(X){for(var ha=X.firstChild;null!=ha;){var la=ha.nextSibling;S(ha);ha=la}1==X.nodeType&&("BR"===X.nodeName||null!=X.firstChild)||3==X.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(X)).length?(3==X.nodeType&&mxUtils.setTextContent(X,mxUtils.getTextContent(X).replace(/\n|\r/g,"")),1==X.nodeType&&(X.removeAttribute("style"),
X.removeAttribute("class"),X.removeAttribute("width"),X.removeAttribute("cellpadding"),X.removeAttribute("cellspacing"),X.removeAttribute("border"))):X.parentNode.removeChild(X)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(X){var ha=M(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
@@ -2688,8 +2688,8 @@ this.linkHint.style.top=Math.round(N+this.verticalOffset/2+Editor.hintOffset)+"p
null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}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 Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Pa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function z(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function L(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
+function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function z(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function qa(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,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function J(){mxActor.call(this)}function Z(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function da(){mxCylinder.call(this)}function ja(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
function R(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function T(){mxShape.call(this)}function ba(){mxShape.call(this)}function ia(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function ma(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Ka(){mxArrowConnector.call(this);
@@ -2705,8 +2705,8 @@ e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.r
A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(D,
mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0,
.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(Q,mxCylinder);Q.prototype.size=30;Q.prototype.darkOpacity=0;Q.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
+l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
+-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(Q,mxCylinder);Q.prototype.size=30;Q.prototype.darkOpacity=0;Q.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
c.end(),c.stroke())};mxCellRenderer.registerShape("note",Q);mxUtils.extend(d,Q);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*
@@ -2719,8 +2719,8 @@ c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c
"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,t));l=Math.min(l,.5*n,.5*t);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,t-l);c.arcTo(l,l,0,0,1,n-l,t);c.lineTo(A+l,t);c.arcTo(l,l,0,0,1,A,t-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=
-function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",L);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(K,mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=
+function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",K);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};C.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",C);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};G.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
0);c.lineTo(n,0);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",G);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
@@ -2900,7 +2900,7 @@ Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doub
["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(fa.prototype.size,!0,null,!0,fa.prototype.fixedSize),hexagon:wb(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:wb(Y.prototype.size,!1),display:wb(Ma.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,L.prototype.size,!0),loopLimit:Bb(.5,X.prototype.size,!0),trapezoid:rb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:rb(1,V.prototype.size,V.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+m.prototype.size,!1),card:Bb(.5,K.prototype.size,!0),loopLimit:Bb(.5,X.prototype.size,!0),trapezoid:rb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:rb(1,V.prototype.size,V.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.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=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[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=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ea=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
null==ea&&null!=l&&(ea=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ea){c=function(Ea,Na,Ja){Ea-=bb.x;var Ha=Na-bb.y;Na=(Xa*Ea-na*Ha)/(I*Xa-va*na);Ea=(va*Ea-I*Ha)/(va*na-I*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+I*Na,bb.y+va*Na),t.push(bb)),bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea)):(Ja&&(bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea),t.push(bb)),
@@ -2914,7 +2914,7 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))))
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))];ua.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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*(v+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};L.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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,
+.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};K.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2962,10 +2962,10 @@ window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.pa
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var z=!0,u=0;u<
-x.length&&z;u++)z=z&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var L=H.x,C=H.y;H=null;if(1==x.length&&z){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,z);null!=H&&(z=Math.round(p.snap(p.popupMenuHandler.triggerX/u-L)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-C)),p.cellsMoved(x,z-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+x.length&&z;u++)z=z&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var K=H.x,C=H.y;H=null;if(1==x.length&&z){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,z);null!=H&&(z=Math.round(p.snap(p.popupMenuHandler.triggerX/u-K)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-C)),p.cellsMoved(x,z-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var L=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==L||isNaN(L.nodeType)||H.setAttribute("placeholders",L.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
+null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var K=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==K||isNaN(K.nodeType)||H.setAttribute("placeholders",K.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
try{var z=p.getEditableCells(p.getSelectionCells());if(0==z.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<z.length;f++)g(z[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
@@ -2990,15 +2990,15 @@ d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new m
Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-
10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/
p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid",
-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
-K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled});
-K.isEnabled=E;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=E;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=E;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var Q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var z=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,z);(f&mxConstants.FONT_BOLD)==
+300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",
+function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
+L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});
+L.isEnabled=E;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=E;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=E;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+d+".html")});var Q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var z=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,z);(f&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?p.updateLabelElements(z,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(z,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(z,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<z.length;u++)0==p.model.getChildCount(z[u])&&p.autoSizeCell(z[u],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
@@ -3009,15 +3009,15 @@ g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles
mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=D.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,z=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)z+=u.x,g+=u.y,d=
p.getModel().getParent(d),u=p.getCellGeometry(d);z=Math.round(p.snap(p.popupMenuHandler.triggerX/x-z));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,z,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var z=g[x];if(p.getModel().isEdge(z)){var u=p.getCellGeometry(z);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[z])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(z,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var z=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,L,C,G,V){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(z),p.insertImage(u,H,L);else{var U=p.getSelectionCells();if(null!=u&&(0<u.length||0<U.length)){var Y=null;p.getModel().beginUpdate();try{if(0==U.length){U=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,L,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+0;x<g.length;x++){var z=g[x];if(p.getModel().isEdge(z)){var u=p.getCellGeometry(z);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[z])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(z,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
+g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var z=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,K,C,G,V){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(z),p.insertImage(u,H,K);else{var U=p.getSelectionCells();if(null!=u&&(0<u.length||0<U.length)){var Y=null;p.getModel().beginUpdate();try{if(0==U.length){U=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,K,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
var O=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(U,!0));U[0].geometry.x=O.x;U[0].geometry.y=O.y;null!=C&&k(U[0],C,G,V,p);Y=U;p.fireEvent(new mxEventObject("cellsInserted","cells",Y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,U);var qa=p.getCurrentCellStyle(U[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",U):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,U);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,U);if(null!=H&&null!=L)for(u=0;u<U.length;u++){var oa=U[u];if("0"!=p.getCurrentCellStyle(oa).expand){var aa=p.getModel().getGeometry(oa);null!=aa&&(aa=aa.clone(),aa.width=H,aa.height=L,p.getModel().setGeometry(oa,aa))}null!=C&&k(oa,C,G,V,p)}}finally{p.getModel().endUpdate()}null!=Y&&(p.setSelectionCells(Y),p.scrollCellToVisible(Y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=E;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(z,u,H){k(d,z,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
+null,U);if(null!=H&&null!=K)for(u=0;u<U.length;u++){var oa=U[u];if("0"!=p.getCurrentCellStyle(oa).expand){var aa=p.getModel().getGeometry(oa);null!=aa&&(aa=aa.clone(),aa.width=H,aa.height=K,p.getModel().setGeometry(oa,aa))}null!=C&&k(oa,C,G,V,p)}}finally{p.getModel().endUpdate()}null!=Y&&(p.setSelectionCells(Y),p.scrollCellToVisible(Y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=E;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(z,u,H){k(d,z,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=E;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,m,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
@@ -3026,25 +3026,25 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=D?this.mergeFile(D,b,e,m):this.reloadFile(b,
e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var K=[this.ui.diffPages(null!=m?m:p,E)],Q=this.ignorePatches(K);this.setShadowPages(E);if(Q)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};Q={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(E,Q);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(E)),z=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(Q)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+z,null,"mergeFile");return}if(null!=this.sync){var L=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==L||mxUtils.isEmptyObject(L)||K.push(L)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(V){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(V);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,V);else{var C=this.getCurrentUser(),G=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,V)}}catch(U){}}};
+DrawioFile.prototype.mergeFile=function(b,e,k,m){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var L=[this.ui.diffPages(null!=m?m:p,E)],Q=this.ignorePatches(L);this.setShadowPages(E);if(Q)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};Q={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
+m),g=this.ui.getHashValueForPages(E,Q);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(E)),z=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(Q)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+z,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var K=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==K||mxUtils.isEmptyObject(K)||L.push(K)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(V){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(V);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,V);else{var C=this.getCurrentUser(),G=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,V)}}catch(U){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var D=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var p=0;p<e.length;p++)this.ui.anonymizePatch(e[p]);var E=mxUtils.bind(this,function(g){var x=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
-25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+x+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==m?E(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==m?E(g):E(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",d=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(e).length;b=null;if(null!=e&&this.constructor==DriveFile&&400>f){for(p=0;p<e.length;p++)this.ui.anonymizePatch(e[p]);
-b=JSON.stringify(e);b=null!=b&&250>b.length?Graph.compress(b):null}EditorUi.logError("Checksum "+(null!=b?"Report":"Error")+" in "+D+" "+d,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+(null!=b?"-json_"+b:"")+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+d,action:D,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+
-"-size_"+this.getSize()})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");E="xml";0<f&&(E=d.substring(f));var g=null!=k?k.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()+" ("+E+")\nUser="+K+Q+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,k,m,D,p,E,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]);var d=mxUtils.bind(this,function(H){var K=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+K+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",z=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>z){for(Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]);
+u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var K=null!=u?"Report":"Error",C=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+K+" in "+D+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=L?
+"-rev_"+this.ui.hashValue(L):"")+(null!=C?"-latest_"+C:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:D,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),L=null!=E?this.ui.hashValue(E.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");E="xml";0<f&&(E=d.substring(f));var g=null!=k?k.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()+" ("+E+")\nUser="+L+Q+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+D+"\n\nData:\n"+p,m)}catch(x){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,D=m.getSelectionCells(),p=m.getViewState(),E=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,D=m.history.slice(),p=m.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var Q=E.foldingEnabled,d=E.mathEnabled,f=E.cellRenderer.redraw;E.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=D,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=E.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,D=m.history.slice(),p=m.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var Q=E.foldingEnabled,d=E.mathEnabled,f=E.cellRenderer.redraw;E.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=D,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=E.mathEnabled?
(this.ui.editor.updateGraphComponents(),E.refresh()):(Q!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,m,D,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",D,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3091,7 +3091,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,m,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,D)}catch(Q){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(Q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,Q);else{var E=this.getCurrentUser(),K=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,Q)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=m&&m(Q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,Q);else{var E=this.getCurrentUser(),L=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,Q)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=m&&m(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};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"))};
@@ -3100,10 +3100,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,D,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),Q=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,m,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),Q=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[z],"conflict",this.desc.lastModified!=z.lastModified);this.desc.lastModified==z.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(E,H,K,f);this.removeDraft()}catch(L){f(L)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(z){this.invalidFileHandle=!0;f(z)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){Q(d)}),m,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):Q(E)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(E,H,L,f);this.removeDraft()}catch(K){f(K)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(z){this.invalidFileHandle=!0;f(z)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){Q(d)}),m,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):Q(E)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(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.prototype.appName="diagrams.net";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"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];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.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3228,8 +3228,8 @@ ha.scale=la;xa="data:image/svg+xml;base64,"+xa;var sa=za.gridSize*ha.gridSteps*r
T&&T(Ca)}});Za.onerror=function(y){null!=T&&T(y)};ma&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Pa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(y){null!=T&&T(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(Ta,y),this.loadFonts(Pa)}catch(M){null!=T&&T(M)}}))}catch(y){null!=T&&T(y)}}),R,pa)}catch(Ta){null!=T&&T(Ta)}};
Editor.crcTable=[];for(var D=0;256>D;D++)for(var p=D,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[D]=p;Editor.updateCRC=function(q,F,R,W){for(var T=0;T<W;T++)q=Editor.crcTable[(q^F.charCodeAt(R+T))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,R=0;R<q.length;R++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(R))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,R,W,T){function ba(pa,za){var Ba=ta;ta+=za;return pa.substring(Ba,ta)}function ia(pa){pa=ba(pa,4);return pa.charCodeAt(3)+
(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(ba(q,4),"IHDR"!=ba(q,4))null!=T&&T();else{ba(q,17);T=q.substring(0,ta);do{var ma=ia(q);if("IDAT"==ba(q,4)){T=q.substring(0,ta-8);"pHYs"==F&&"dpi"==R?(R=Math.round(W/.0254),
-R=ra(R)+ra(R)+String.fromCharCode(1)):R=R+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,F,0,4);W=Editor.updateCRC(W,R,0,R.length);T+=ra(R.length)+F+R+ra(W^4294967295);T+=q.substring(ta-8,q.length);break}T+=q.substring(ta-8,ta-4+ma);ba(q,ma);ba(q,4)}while(ma);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor;
-ColorDialog.addRecentColor=function(q,F){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var R=null;null!=q.editor.graph.getModel().getParent(F)?R=F.getId():null!=q.currentPage&&(R=q.currentPage.getId());return R});
+R=ra(R)+ra(R)+String.fromCharCode(1)):R=R+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,F,0,4);W=Editor.updateCRC(W,R,0,R.length);T+=ra(R.length)+F+R+ra(W^4294967295);T+=q.substring(ta-8,q.length);break}T+=q.substring(ta-8,ta-4+ma);ba(q,ma);ba(q,4)}while(ma);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;
+ColorDialog.addRecentColor=function(q,F){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var R=null;null!=q.editor.graph.getModel().getParent(F)?R=F.getId():null!=q.currentPage&&(R=q.currentPage.getId());return R});
if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,R=F.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return R.shadowVisible},function(T){var ba=new ChangePageSetup(F);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible=
T;R.model.execute(ba)},{install:function(T){this.listener=function(){T(R.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));q.appendChild(W)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var F=this.editorUi,R=F.editor.graph;
@@ -3298,7 +3298,7 @@ return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCas
null);null!=R&&Graph.addFont(R,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(T){F=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(T){F=null});this.isMouseInsertPoint=function(){return null!=F};var R=this.getInsertPoint;
this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):R.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var ba=this.graph.getCellStyle(T);if(null!=ba&&"rack"==ba.childLayout){var ia=new mxStackLayout(this.graph,!1);ia.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ia.marginLeft=ba.marginLeft||0;ia.marginRight=ba.marginRight||0;ia.marginTop=ba.marginTop||
-0;ia.marginBottom=ba.marginBottom||0;ia.allowGaps=ba.allowGaps||0;ia.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ia.resizeParent=!1;ia.fill=!0;return ia}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var L=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(L.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,F,R,W,T,ba,ia,ra,ta,ma,
+0;ia.marginBottom=ba.marginBottom||0;ia.allowGaps=ba.allowGaps||0;ia.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ia.resizeParent=!1;ia.fill=!0;return ia}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var K=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(K.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,F,R,W,T,ba,ia,ra,ta,ma,
pa){C.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,R){function W(){for(var Aa=ia.getSelectionCells(),Ka=[],Da=0;Da<Aa.length;Da++)ia.isCellVisible(Aa[Da])&&Ka.push(Aa[Da]);ia.setSelectionCells(Ka)}function T(Aa){ia.setHiddenTags(Aa?[]:ra.slice());W();ia.refresh()}function ba(Aa,
Ka){ma.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Ra=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Qa=0;Qa<Aa.length;Qa++)(function(Ta){var Za=0>mxUtils.indexOf(ia.hiddenTags,Ta),Pa=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var M=document.createElement("img");M.setAttribute("src",
Za?Editor.visibleImage:Editor.hiddenImage);M.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(M,Za?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(F||Editor.isDarkMode())M.style.filter="invert(100%)";y.appendChild(M);mxEvent.addListener(M,"click",function(S){mxEvent.isShiftDown(S)?T(0<=mxUtils.indexOf(ia.hiddenTags,Ta)):(ia.toggleHiddenTag(Ta),W(),ia.refresh());mxEvent.consume(S)});Pa.appendChild(y);y=document.createElement("td");
@@ -3383,11 +3383,11 @@ function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.u
this.shadowVisible)}}else da.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ja=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ja.getContext("2d").drawImage(ka,
0,0);var q=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.1";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,z,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var L=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";z=null!=z?z:Error(d);(new Image).src=L+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var K=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";z=null!=z?z:Error(d);(new Image).src=K+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
encodeURIComponent(x):"")+(null!=z&&null!=z.stack?"&stack="+encodeURIComponent(z.stack):"")}}catch(C){}try{H||null==window.console||console.error(u,d,f,g,x,z)}catch(C){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
@@ -3397,9 +3397,9 @@ f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.leng
EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(z){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var z=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=z.spin;z.spin=function(L,C){var G=!1;this.active||(u.call(this,L),this.active=!0,null!=C&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var z=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=z.spin;z.spin=function(K,C){var G=!1;this.active||(u.call(this,K),this.active=!0,null!=C&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),G.innerHTML=C,L.appendChild(G),z.status=G),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(L,C)}));this.stop();return V}),G=!0);return G};var H=z.stop;z.stop=function(){H.call(this);this.active=!1;null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status);z.status=null};z.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),G.innerHTML=C,K.appendChild(G),z.status=G),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(K,C)}));this.stop();return V}),G=!0);return G};var H=z.stop;z.stop=function(){H.call(this);this.active=!1;null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status);z.status=null};z.pause=function(){return function(){}};
return z};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,z=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var H=z.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&z.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&z.movePage(H,0)};if(39==u.keyCode)return function(){H<z.pages.length-1&&z.movePage(H,
@@ -3408,75 +3408,75 @@ x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isCo
""))}else{var z=mxUtils.parseXml(d),u=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var z=x.length-1;0<=z;z--){var u=this.updatePageRoot(new DiagramPage(x[z]));null==u.getName()&&
u.setName(mxResources.get("pageWithNumber",[z+1]));f.model.execute(new ChangePage(this,u,0==z?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(z=0;z<g.length;z++)f.model.execute(new ChangePage(this,g[z],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,z,u,H,L,C,G,V){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;C=null!=C?C:!0;var U=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Y="_blank";else U=Y=x;if(null==d)return"";var O=d;if("mxfile"!=O.nodeName.toLowerCase()){if(V){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
+if(null!=g)for(z=0;z<g.length;z++)f.model.execute(new ChangePage(this,g[z],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,z,u,H,K,C,G,V){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;C=null!=C?C:!0;var U=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Y="_blank";else U=Y=x;if(null==d)return"";var O=d;if("mxfile"!=O.nodeName.toLowerCase()){if(V){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));O=Graph.compress(qa);if(Graph.decompress(O)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,O)}O=d.ownerDocument.createElement("mxfile");O.appendChild(qa)}G?(O=O.cloneNode(!0),O.removeAttribute("modified"),O.removeAttribute("host"),O.removeAttribute("agent"),O.removeAttribute("etag"),O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"),
O.removeAttribute("type")):(O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"),O.removeAttribute("pages"),O.removeAttribute("type"),mxClient.IS_CHROMEAPP?O.setAttribute("host","Chrome"):EditorUi.isElectronApp?O.setAttribute("host","Electron"):O.setAttribute("host",window.location.hostname),O.setAttribute("modified",(new Date).toISOString()),O.setAttribute("agent",navigator.appVersion),O.setAttribute("version",EditorUi.VERSION),O.setAttribute("etag",Editor.guid()),
d=null!=g?g.getMode():this.mode,null!=d&&O.setAttribute("type",d),1<O.getElementsByTagName("diagram").length&&null!=this.pages&&O.setAttribute("pages",this.pages.length));V=V?mxUtils.getPrettyXml(O):mxUtils.getXml(O);if(!u&&!z&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))V=this.getHtml2(mxUtils.getXml(O),f,null!=g?g.getTitle():null,Y,U);else if(u||!z&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),V=this.getEmbeddedSvg(V,f,
-x,null,L,C,U);return V};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var z=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(C){var G=C.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&C.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?C=
-C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(G)));z.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(z)),z=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
-L,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(L));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
-null!=u.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,L,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(L))));d(H)}return z};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var z=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?g.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?g.push(String.fromCharCode(65+Math.round(25*
+x,null,K,C,U);return V};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var z=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(C){var G=C.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&C.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?C=
+C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(G)));z.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(z)),z=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var K=new mxCodec(mxUtils.createXmlDocument());K=K.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
+K,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(K));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
+null!=u.viewState.backgroundImage.originalSrc&&(K=new mxCodec(mxUtils.createXmlDocument()),K=K.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,K,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(K))));d(H)}return z};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var z=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?g.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?g.push(String.fromCharCode(65+Math.round(25*
Math.random()))):z.toUpperCase()!=z?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var z=d[EditorUi.DIFF_UPDATE][x];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(u){var H=z.cells[u];if(null!=H){for(var L in H)null!=H[L].value&&(H[L].value="["+H[L].value.length+"]"),null!=H[L].xmlValue&&(H[L].xmlValue="["+H[L].xmlValue.length+"]"),null!=H[L].style&&(H[L].style=
-"["+H[L].style.length+"]"),mxUtils.isEmptyObject(H[L])&&delete H[L];mxUtils.isEmptyObject(H)&&delete z.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var z=d[EditorUi.DIFF_UPDATE][x];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(u){var H=z.cells[u];if(null!=H){for(var K in H)null!=H[K].value&&(H[K].value="["+H[K].value.length+"]"),null!=H[K].xmlValue&&(H[K].xmlValue="["+H[K].xmlValue.length+"]"),null!=H[K].style&&(H[K].style=
+"["+H[K].style.length+"]"),mxUtils.isEmptyObject(H[K])&&delete H[K];mxUtils.isEmptyObject(H)&&delete z.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,z,u,H,
-L,C,G,V){z=null!=z?z:!0;u=null!=u?u:!1;var U=this.editor.graph;if(f||!d&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var Y=null!=U.themes&&"darkTheme"==U.defaultThemeName;G=!1;if(Y||null!=this.pages&&this.currentPage!=this.pages[0]){var O=U.getGlobalVariable;U=this.createTemporaryGraph(Y?U.getDefaultStylesheet():U.getStylesheet());U.setBackgroundImage=this.editor.graph.setBackgroundImage;U.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?U.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=qa.viewState&&null!=qa.viewState&&U.setBackgroundImage(qa.viewState.backgroundImage);U.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(z,u,G,V);C=null!=C?C:this.getCurrentFile();d=this.createFileData(H,U,C,window.location.href,d,f,g,x,z,L,G);U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,z,u){u=null!=u?u:!0;var H=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var C=f.view.scale;u=Math.floor(H.x/C-f.view.translate.x);C=Math.floor(H.y/C-f.view.translate.y);H=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(L=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",C)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
+K,C,G,V){z=null!=z?z:!0;u=null!=u?u:!1;var U=this.editor.graph;if(f||!d&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var Y=null!=U.themes&&"darkTheme"==U.defaultThemeName;G=!1;if(Y||null!=this.pages&&this.currentPage!=this.pages[0]){var O=U.getGlobalVariable;U=this.createTemporaryGraph(Y?U.getDefaultStylesheet():U.getStylesheet());U.setBackgroundImage=this.editor.graph.setBackgroundImage;U.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?U.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=qa.viewState&&null!=qa.viewState&&U.setBackgroundImage(qa.viewState.backgroundImage);U.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(z,u,G,V);C=null!=C?C:this.getCurrentFile();d=this.createFileData(H,U,C,window.location.href,d,f,g,x,z,K,G);U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,x,z,u){u=null!=u?u:!0;var H=null,K=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var C=f.view.scale;u=Math.floor(H.x/C-f.view.translate.x);C=Math.floor(H.y/C-f.view.translate.y);H=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(K=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",C)}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!=x&&d.setAttribute("edit",x));null!=z&&(z=z.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+K+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&amp;"));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==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&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);if(null!=urlParams["layer-ids"])try{var z=urlParams["layer-ids"].split(" ");f={};for(x=0;x<z.length;x++)f[z[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var L=H[x];u.setVisible(L,f[L.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+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);if(null!=urlParams["layer-ids"])try{var z=urlParams["layer-ids"].split(" ");f={};for(x=0;x<z.length;x++)f[z[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var K=H[x];u.setVisible(K,f[K.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(d){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(".")));!d&&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(d,f,g,x,z,u,H,L,C,G,V,U){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename("remoteSvg"==d?!1:!z),O=Y+("xml"==d||"pdf"==d&&V?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,z,null,null,null,f);this.saveData(O,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(O,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)O=Y+".png";else if("jpeg"==d)O=Y+".jpg";else if("remoteSvg"==d){O=Y+".svg";d="svg";var oa=parseInt(C);"string"===typeof L&&0<L.indexOf("%")&&(L=parseInt(L)/100);if(0<oa){var aa=this.editor.graph,ca=aa.getGraphBounds();var fa=Math.ceil(ca.width*L/aa.view.scale+2*oa);var J=Math.ceil(ca.height*L/aa.view.scale+2*oa)}}this.saveRequest(O,d,mxUtils.bind(this,function(ka,q){try{var F=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var R=this.createDownloadRequest(ka,d,x,q,H,z,L,C,
+function(d,f,g,x,z,u,H,K,C,G,V,U){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename("remoteSvg"==d?!1:!z),O=Y+("xml"==d||"pdf"==d&&V?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,z,null,null,null,f);this.saveData(O,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(O,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
+d)O=Y+".png";else if("jpeg"==d)O=Y+".jpg";else if("remoteSvg"==d){O=Y+".svg";d="svg";var oa=parseInt(C);"string"===typeof K&&0<K.indexOf("%")&&(K=parseInt(K)/100);if(0<oa){var aa=this.editor.graph,ca=aa.getGraphBounds();var fa=Math.ceil(ca.width*K/aa.view.scale+2*oa);var J=Math.ceil(ca.height*K/aa.view.scale+2*oa)}}this.saveRequest(O,d,mxUtils.bind(this,function(ka,q){try{var F=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var R=this.createDownloadRequest(ka,d,x,q,H,z,K,C,
G,V,U,fa,J);this.editor.graph.pageVisible=F;return R}catch(W){this.handleError(W)}}))}else{var Z=null,P=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==d){var da=this.editor.graph.background;if(H||da==mxConstants.NONE)da=null;var ja=this.editor.graph.getSvg(da,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ja);
-this.editor.convertImages(ja,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();P(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else O=Y+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();P(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){var O=this.editor.graph,qa=O.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
+this.editor.convertImages(ja,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();P(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else O=Y+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();P(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){var O=this.editor.graph,qa=O.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
null,null,!1,"pdf"==f);var oa="",aa="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=V?aa="&from="+V.from+"&to="+V.to:0==u&&(aa="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=O.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=u&&u!=mxConstants.NONE||
-(u="#ffffff"):u=mxConstants.NONE;z={globalVars:O.getExportVariables()};C&&(z.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+aa+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(null!=H?"&scale="+H:"")+(null!=L?"&border="+
-L:"")+(U&&isFinite(U)?"&w="+U:"")+(Y&&isFinite(Y)?"&h="+Y:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,z=mxUtils.bind(this,function(H){var L=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<L.length&&(L+="\n"),L+=H);H=new LocalFile(this,"csv"!=d.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
-"csv"==d.format&&this.importCsv(L,mxUtils.bind(this,function(Y){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,G=null,V=mxUtils.bind(this,function(){var Y=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Y===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):
+(u="#ffffff"):u=mxConstants.NONE;z={globalVars:O.getExportVariables()};C&&(z.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+aa+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(null!=H?"&scale="+H:"")+(null!=K?"&border="+
+K:"")+(U&&isFinite(U)?"&w="+U:"")+(Y&&isFinite(Y)?"&h="+Y:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,z=mxUtils.bind(this,function(H){var K=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<K.length&&(K+="\n"),K+=H);H=new LocalFile(this,"csv"!=d.format&&0<K.length?K:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
+"csv"==d.format&&this.importCsv(K,mxUtils.bind(this,function(Y){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,G=null,V=mxUtils.bind(this,function(){var Y=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Y===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):
this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(V,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();V()}));U();V()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=d.url;if(/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))u=this.editor.getProxiedUrl(u);this.editor.loadUrl(u,
mxUtils.bind(this,function(H){z(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else z("")};EditorUi.prototype.updateDiagram=function(d){function f(J){var Z=new mxCellOverlay(J.image||z.warningImage,J.tooltip,J.align,J.valign,J.offset);Z.addListener(mxEvent.CLICK,function(P,da){x.alert(J.tooltip)});return Z}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var z=this.editor.graph,u=z.getModel();u.beginUpdate();var H=
-null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var L=u.getCell(d.getAttribute("id"));if(null!=L){try{var C=d.getAttribute("value");if(null!=C){var G=mxUtils.parseXml(C).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(L,G);else for(var V=G.attributes,U=0;U<V.length;U++)z.setAttributeForCell(L,V[U].nodeName,0<V[U].nodeValue.length?V[U].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+L.id+": "+J)}try{var Y=d.getAttribute("style");
-null!=Y&&z.model.setStyle(L,Y)}catch(J){null!=window.console&&console.log("Error in style for "+L.id+": "+J)}try{var O=d.getAttribute("icon");if(null!=O){var qa=0<O.length?JSON.parse(O):null;null!=qa&&qa.append||z.removeCellOverlays(L);null!=qa&&z.addCellOverlay(L,f(qa))}}catch(J){null!=window.console&&console.log("Error in icon for "+L.id+": "+J)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var aa=z.getCellGeometry(L);if(null!=aa){aa=aa.clone();for(key in oa){var ca=parseFloat(oa[key]);
-"dx"==key?aa.x+=ca:"dy"==key?aa.y+=ca:"dw"==key?aa.width+=ca:"dh"==key?aa.height+=ca:aa[key]=parseFloat(oa[key])}z.model.setGeometry(L,aa)}}}catch(J){null!=window.console&&console.log("Error in icon for "+L.id+": "+J)}}}else if("model"==d.nodeName){for(var fa=d.firstChild;null!=fa&&fa.nodeType!=mxConstants.NODETYPE_ELEMENT;)fa=fa.nextSibling;null!=fa&&(new mxCodec(d.firstChild)).decode(fa,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(z.view.scale=parseFloat(d.getAttribute("scale"))),
+null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var K=u.getCell(d.getAttribute("id"));if(null!=K){try{var C=d.getAttribute("value");if(null!=C){var G=mxUtils.parseXml(C).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(K,G);else for(var V=G.attributes,U=0;U<V.length;U++)z.setAttributeForCell(K,V[U].nodeName,0<V[U].nodeValue.length?V[U].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+K.id+": "+J)}try{var Y=d.getAttribute("style");
+null!=Y&&z.model.setStyle(K,Y)}catch(J){null!=window.console&&console.log("Error in style for "+K.id+": "+J)}try{var O=d.getAttribute("icon");if(null!=O){var qa=0<O.length?JSON.parse(O):null;null!=qa&&qa.append||z.removeCellOverlays(K);null!=qa&&z.addCellOverlay(K,f(qa))}}catch(J){null!=window.console&&console.log("Error in icon for "+K.id+": "+J)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var aa=z.getCellGeometry(K);if(null!=aa){aa=aa.clone();for(key in oa){var ca=parseFloat(oa[key]);
+"dx"==key?aa.x+=ca:"dy"==key?aa.y+=ca:"dw"==key?aa.width+=ca:"dh"==key?aa.height+=ca:aa[key]=parseFloat(oa[key])}z.model.setGeometry(K,aa)}}}catch(J){null!=window.console&&console.log("Error in icon for "+K.id+": "+J)}}}else if("model"==d.nodeName){for(var fa=d.firstChild;null!=fa&&fa.nodeType!=mxConstants.NODETYPE_ELEMENT;)fa=fa.nextSibling;null!=fa&&(new mxCodec(d.firstChild)).decode(fa,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(z.view.scale=parseFloat(d.getAttribute("scale"))),
d.hasAttribute("dx")||d.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=
-x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var z=new Date;g=z.getFullYear();x=z.getMonth()+1;var u=z.getDate(),H=z.getHours(),L=z.getMinutes();z=z.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+L+"-"+z))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),
+x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var z=new Date;g=z.getFullYear();x=z.getMonth()+1;var u=z.getDate(),H=z.getHours(),K=z.getMinutes();z=z.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+K+"-"+z))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),
g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var z=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!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();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=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_"+u})}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(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(L){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+
-H.stack})}catch(L){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||z():z()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);
-var H=d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var L=z.encode(x);this.editor.graph.saveViewState(d[u].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");H.appendChild(L);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(C,G,V,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==C.nodeName&&
+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(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(K){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+
+H.stack})}catch(K){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||z():z()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);
+var H=d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var K=z.encode(x);this.editor.graph.saveViewState(d[u].viewState,K,!0);K.removeAttribute("pageWidth");K.removeAttribute("pageHeight");H.appendChild(K);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(C,G,V,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==C.nodeName&&
"previous"==G?null:V:Math.round(V)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var z=0;z<d.attributes.length;z++){var u=d.attributes[z].name,H=null!=f?f(d,u,d.attributes[z].value,!0):d.attributes[z].value;null!=H&&(x^=this.hashValue(u,
f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(z=0;z<d.childNodes.length;z++)x=(x<<5)-x+this.hashValue(d.childNodes[z],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(z=0;z<d.length;z++)f=(f<<5)-f+d.charCodeAt(z)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,z,u,H){};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){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};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 f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var 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:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(fa,J){0==fa.length&&d.isEditable()?
-(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),J.appendChild(u)):this.addLibraryEntries(fa,J)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var L=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(fa){H(f,fa)}));this.repositionLibrary(z);var C=L.parentNode.previousSibling;x=C.getAttribute("title");
+(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),J.appendChild(u)):this.addLibraryEntries(fa,J)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var K=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(fa){H(f,fa)}));this.repositionLibrary(z);var C=K.parentNode.previousSibling;x=C.getAttribute("title");
null!=x&&0<x.length&&".scratchpad"!=d.title&&C.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";C.style.position="relative";var V=document.createElement("img");V.className="geAdaptiveAsset";V.setAttribute("src",Editor.crossImage);V.setAttribute("title",mxResources.get("close"));V.setAttribute("valign","absmiddle");V.setAttribute("border",
"0");V.style.position="relative";V.style.top="2px";V.style.width="14px";V.style.cursor="pointer";V.style.margin="0 3px";var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(V),mxEvent.addListener(V,"click",mxUtils.bind(this,function(fa){if(!mxEvent.isConsumed(fa)){var J=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(fa)}}));if(d.isEditable()){var Y=
-this.editor.graph,O=null,qa=mxUtils.bind(this,function(fa){this.showLibraryDialog(d.getTitle(),L,f,d,d.getMode());mxEvent.consume(fa)}),oa=mxUtils.bind(this,function(fa){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=V.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),C.style.paddingRight=18*G.childNodes.length+
+this.editor.graph,O=null,qa=mxUtils.bind(this,function(fa){this.showLibraryDialog(d.getTitle(),K,f,d,d.getMode());mxEvent.consume(fa)}),oa=mxUtils.bind(this,function(fa){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=V.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),C.style.paddingRight=18*G.childNodes.length+
"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&(O.parentNode.removeChild(O),C.style.paddingRight=18*G.childNodes.length+"px")})):null==U&&(U=V.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),G.insertBefore(U,G.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(J){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(C.style.paddingRight=
-18*G.childNodes.length+"px",U.parentNode.removeChild(U),U=null)});mxEvent.consume(J)})),C.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(fa,J,Z,P){fa=Y.cloneCells(mxUtils.sortCells(Y.model.getTopmostCells(fa)));for(var da=0;da<fa.length;da++){var ja=Y.getCellGeometry(fa[da]);null!=ja&&ja.translate(-J.x,-J.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(fa,J.width,J.height,P||"",!0,null,!1));fa={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(fa))),
+18*G.childNodes.length+"px",U.parentNode.removeChild(U),U=null)});mxEvent.consume(J)})),C.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(fa,J,Z,P){fa=Y.cloneCells(mxUtils.sortCells(Y.model.getTopmostCells(fa)));for(var da=0;da<fa.length;da++){var ja=Y.getCellGeometry(fa[da]);null!=ja&&ja.translate(-J.x,-J.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(fa,J.width,J.height,P||"",!0,null,!1));fa={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(fa))),
w:J.width,h:J.height};null!=P&&(fa.title=P);f.push(fa);oa(Z);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),ca=mxUtils.bind(this,function(fa){if(Y.isSelectionEmpty())Y.getRubberband().isActive()?(Y.getRubberband().execute(fa),Y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=Y.getSelectionCells(),Z=Y.view.getBounds(J),P=Y.view.scale;Z.x/=P;Z.y/=P;Z.width/=P;Z.height/=P;Z.x-=Y.view.translate.x;
-Z.y-=Y.view.translate.y;aa(J,Z)}mxEvent.consume(fa)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler.first&&(Y.graphHandler.suspend(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor="#f1f3f4",L.style.cursor="copy",Y.panningManager.stop(),Y.autoScroll=!1,mxEvent.consume(fa))}),mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler&&
-(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,Y.panningManager.stop(),Y.graphHandler.reset(),Y.isMouseDown=!1,Y.autoScroll=!0,ca(fa),mxEvent.consume(fa))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.graphHandler.first&&(Y.graphHandler.resume(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",Y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,
-"dragover",mxUtils.bind(this,function(fa){L.style.backgroundColor="#f1f3f4";fa.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(fa){L.style.cursor="";L.style.backgroundColor="";0<fa.dataTransfer.files.length&&this.importFiles(fa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,Z,P,da,ja,ka,q,F,R){if(null!=J&&"image/"==Z.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+Z.y-=Y.view.translate.y;aa(J,Z)}mxEvent.consume(fa)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler.first&&(Y.graphHandler.suspend(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="#f1f3f4",K.style.cursor="copy",Y.panningManager.stop(),Y.autoScroll=!1,mxEvent.consume(fa))}),mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler&&
+(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,Y.panningManager.stop(),Y.graphHandler.reset(),Y.isMouseDown=!1,Y.autoScroll=!0,ca(fa),mxEvent.consume(fa))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.graphHandler.first&&(Y.graphHandler.resume(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",Y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,
+"dragover",mxUtils.bind(this,function(fa){K.style.backgroundColor="#f1f3f4";fa.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(fa){K.style.cursor="";K.style.backgroundColor="";0<fa.dataTransfer.files.length&&this.importFiles(fa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,Z,P,da,ja,ka,q,F,R){if(null!=J&&"image/"==Z.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(J),J=[new mxCell("",new mxGeometry(0,0,ja,ka),J)],J[0].vertex=!0,aa(J,new mxRectangle(0,0,ja,ka),fa,mxEvent.isAltDown(fa)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var W=!1,T=mxUtils.bind(this,function(ba,ia){null!=ba&&"application/pdf"==ia&&(ia=Editor.extractGraphModelFromPdf(ba),null!=ia&&0<ia.length&&(ba=ia));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=
-JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,L);f=f.concat(ra);oa(fa);this.spinner.stop();W=!0}catch(za){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var ma=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(ma);aa(ma,new mxRectangle(0,0,pa.width,pa.height),fa)}W=!0}catch(za){null!=window.console&&console.log("error in drop handler:",za)}W||(this.spinner.stop(),
+JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,K);f=f.concat(ra);oa(fa);this.spinner.stop();W=!0}catch(za){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var ma=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(ma);aa(ma,new mxRectangle(0,0,pa.width,pa.height),fa)}W=!0}catch(za){null!=window.console&&console.log("error in drop handler:",za)}W||(this.spinner.stop(),
this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=R&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(R,function(ba){T(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,q)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?T(ba.responseText,
-"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(J,Z)}}));fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(L,"dragleave",function(fa){L.style.cursor="";L.style.backgroundColor="";fa.stopPropagation();fa.preventDefault()}));V=V.cloneNode(!1);V.setAttribute("src",Editor.editImage);V.setAttribute("title",
-mxResources.get("edit"));G.insertBefore(V,G.firstChild);mxEvent.addListener(V,"click",qa);mxEvent.addListener(L,"dblclick",function(fa){mxEvent.getSource(fa)==L&&qa(fa)});x=V.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",ca);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText=
+"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(J,Z)}}));fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"dragleave",function(fa){K.style.cursor="";K.style.backgroundColor="";fa.stopPropagation();fa.preventDefault()}));V=V.cloneNode(!1);V.setAttribute("src",Editor.editImage);V.setAttribute("title",
+mxResources.get("edit"));G.insertBefore(V,G.firstChild);mxEvent.addListener(V,"click",qa);mxEvent.addListener(K,"dblclick",function(fa){mxEvent.getSource(fa)==K&&qa(fa)});x=V.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",ca);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText=
"color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(fa){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(fa)})),G.insertBefore(x,G.firstChild))}C.appendChild(G);C.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var x=d[g],z=x.data;if(null!=z){z=this.convertDataUri(z);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+z,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(z=this.stringToCells(Graph.decompress(x.xml)),0<z.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(z,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=
@@ -3486,28 +3486,28 @@ rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",start
f,g,x,z,u,H){d=new ImageDialog(this,d,f,g,x,z,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,z){d=new LibraryDialog(this,
d,f,g,x,z);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");
d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,
-"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,z,u,H){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,
-d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(O){}if(null!=C||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),V=null;f=null!=f?f:mxResources.get("error");if(null!=C){null!=C.retry&&(G=mxResources.get("cancel"),V=function(){L();C.retry()});if(404==C.code||404==C.status||403==C.code){H=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,z,u,H){var K=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,
+d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(O){}if(null!=C||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),V=null;f=null!=f?f:mxResources.get("error");if(null!=C){null!=C.retry&&(G=mxResources.get("cancel"),V=function(){K();C.retry()});if(404==C.code||404==C.status||403==C.code){H=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var U=null!=z?null:null!=u?u: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==C.code||404==C.status)){U="#U"==U.substring(0,
2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);this.handleError(d,f,g,x,z)}),V,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){ca.innerText="";for(var fa=0;fa<qa.length;fa++){var J=document.createElement("option");mxUtils.write(J,qa[fa].displayName);J.value=fa;ca.appendChild(J);J=document.createElement("option");J.innerHTML=
"&nbsp;&nbsp;&nbsp;";mxUtils.write(J,"<"+qa[fa].email+">");J.setAttribute("disabled","disabled");ca.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=qa.length;ca.appendChild(J)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),aa=document.createElement("span");aa.style.marginTop="6px";mxUtils.write(aa,mxResources.get("changeUser")+": ");oa.appendChild(aa);var ca=document.createElement("select");ca.style.width="200px";O();mxEvent.addListener(ca,
"change",mxUtils.bind(this,function(){var fa=ca.value,J=qa.length!=fa;J&&this.drive.setUser(qa[fa]);this.drive.authorize(J,mxUtils.bind(this,function(){J||(qa=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));oa.appendChild(ca);oa=new CustomDialog(this,oa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=
g&&g()}),480,150);return}}null!=C.message?H=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name):mxUtils.htmlEntities(C.message):null!=C.response&&null!=C.response.error?H=mxUtils.htmlEntities(C.response.error):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):C.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof C&&0<C.length&&(H=mxUtils.htmlEntities(C)))}var Y=u=null;null!=C&&null!=C.helpLink?(u=
mxResources.get("help"),Y=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+C.ownerEmail+")"),Y=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))}));this.showError(f,H,G,g,V,null,null,u,Y,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);
-this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,z,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,z,null,null,null,null,L);this.showDialog(d.container,340,46+L,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var z=!1;if(!(this.bannerShowing||this["hideBanner"+d]||
+this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,z,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,z,null,null,null,null,K);this.showDialog(d.container,340,46+K,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var z=!1;if(!(this.bannerShowing||this["hideBanner"+d]||
isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(u.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition",
"all 1s ease");u.className="geBtn gePrimaryBtn";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;";u.appendChild(z);z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));z.setAttribute("border","0");z.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-u.appendChild(z);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var L=document.createElement("label");L.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(L,mxResources.get("doNotShowAgain"));f.appendChild(L);
+u.appendChild(z);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var K=document.createElement("label");K.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(K,mxResources.get("doNotShowAgain"));f.appendChild(K);
u.style.paddingBottom="30px";u.appendChild(f)}var C=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(z,"click",mxUtils.bind(this,function(V){mxEvent.consume(V);C()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){C()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(V){var U=mxEvent.getSource(V);U!=H&&U!=L?(null!=g&&g(),C(),mxEvent.consume(V)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,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.isExportToCanvas=
+function(){C()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(V){var U=mxEvent.getSource(V);U!=H&&U!=K?(null!=g&&g(),C(),mxEvent.consume(V)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,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.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,z){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,
f,g,z);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!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,f){d=new TextareaDialog(this,d,f,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,f,g,x,z,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),
-g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(L?parseInt(L[2],10):
+g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var K=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(K?parseInt(K[2],10):
!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(C){}}else this.createEchoRequest(d,f,g,x,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,z,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
-g?"&mime="+g:"")+(null!=z?"&format="+z:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),z=Array(x),u=0;u<x;++u){for(var H=1024*u,L=Math.min(H+1024,g),C=Array(L-H),G=0;H<L;++G,++H)C[G]=d[H].charCodeAt(0);z[u]=new Uint8Array(C)}return new Blob(z,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,z,u,H,L){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=
+g?"&mime="+g:"")+(null!=z?"&format="+z:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),z=Array(x),u=0;u<x;++u){for(var H=1024*u,K=Math.min(H+1024,g),C=Array(K-H),G=0;H<K;++G,++H)C[G]=d[H].charCodeAt(0);z[u]=new Uint8Array(C)}return new Blob(z,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,z,u,H,K){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=
z&&(!mxClient.IS_IOS||!navigator.standalone);z=this.getServiceCount(u);isLocalStorage&&z++;var C=4>=z?2:6<z?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,V){try{if("_blank"==V)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var U=new EmbedDialog(this,d);this.showDialog(U.container,450,240,!0,!0);U.init()}else{var Y=window.open("about:blank");null==Y?mxUtils.popup(d,!0):(Y.document.write("<pre>"+mxUtils.htmlEntities(d,
-!1)+"</pre>"),Y.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(d,G,g,x,null,L):null!=G&&0<G.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(d,G,g,x,V,O)}catch(qa){this.handleError(qa)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<z,C,d,g,x);u=this.isServices(z)?z>C?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=
+!1)+"</pre>"),Y.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(d,G,g,x,null,K):null!=G&&0<G.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(d,G,g,x,V,O)}catch(qa){this.handleError(qa)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<z,C,d,g,x);u=this.isServices(z)?z>C?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=
function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
@@ -3518,108 +3518,108 @@ Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListen
this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this);
else{this.exportDialog=document.createElement("div");var u=g.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,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(L){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border","0");L.setAttribute("src",C);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",z);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,z){this.isLocalFileSave()?
-this.saveLocalFile(g,d,x,z,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,z,f,H)}),g,z,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,z,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var L=this.getServiceCount(!1);isLocalStorage&&L++;var C=4>=L?2:6<L?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,V){if("_blank"==V||null!=G&&0<G.length){var U=g("_blank"==V?null:G,V==App.MODE_DEVICE||"download"==V||null==V||"_blank"==V?"0":"1");
+function(K){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(K,null,"png");K=document.createElement("img");K.style.maxWidth="140px";K.style.maxHeight="140px";K.style.cursor="pointer";K.style.backgroundColor="white";K.setAttribute("title",mxResources.get("openInNewWindow"));K.setAttribute("border","0");K.setAttribute("src",C);this.exportDialog.appendChild(K);mxEvent.addListener(K,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",z);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,z){this.isLocalFileSave()?
+this.saveLocalFile(g,d,x,z,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,z,f,H)}),g,z,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,z,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var K=this.getServiceCount(!1);isLocalStorage&&K++;var C=4>=K?2:6<K?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,V){if("_blank"==V||null!=G&&0<G.length){var U=g("_blank"==V?null:G,V==App.MODE_DEVICE||"download"==V||null==V||"_blank"==V?"0":"1");
null!=U&&(V==App.MODE_DEVICE||"download"==V||"_blank"==V?U.simulate(document,"_blank"):this.pickFolder(V,mxUtils.bind(this,function(Y){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.spinner.spin(document.body,mxResources.get("saving"))&&U.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=U.getStatus()&&299>=U.getStatus())try{this.exportFile(U.getText(),G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(O){this.spinner.stop();this.handleError(O)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<L,C,x,u,z);L=this.isServices(L)?4<L?390:280:160;this.showDialog(d.container,420,L,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,z,u){};EditorUi.prototype.pickFolder=function(d,
-f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,z,u,H,L,C,G,V,U,Y,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=V?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(oa,d,H,L,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Y,V,U);x&&this.editor.graph.addSvgShadow(aa);
+function(O){this.spinner.stop();this.handleError(O)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<K,C,x,u,z);K=this.isServices(K)?4<K?390:280:160;this.showDialog(d.container,420,K,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,z,u){};EditorUi.prototype.pickFolder=function(d,
+f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,z,u,H,K,C,G,V,U,Y,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=V?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(oa,d,H,K,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Y,V,U);x&&this.editor.graph.addSvgShadow(aa);
var ca=this.getBaseFilename()+(z?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});var fa=mxUtils.bind(this,function(Z){this.spinner.stop();z&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,C,null,null,null,!1));O(Graph.xmlDeclaration+"\n"+(z?
Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(aa);var J=mxUtils.bind(this,function(Z){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,fa,this.thumbImageCache)):fa(Z)});Y?this.embedFonts(aa,J):(this.editor.addFontCss(aa),J(aa))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,z,u,H){return this.addCheckbox(d,g,x,z,u,H,!0,f)};EditorUi.prototype.addCheckbox=
-function(d,f,g,x,z,u,H,L){u=null!=u?u:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();C.id=H;null!=L&&C.setAttribute("name",L);g&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);x&&C.setAttribute("disabled","disabled");u&&(d.appendChild(C),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),z||mxUtils.br(d));return C};EditorUi.prototype.addEditButton=
+function(d,f,g,x,z,u,H,K){u=null!=u?u:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();C.id=H;null!=K&&C.setAttribute("name",K);g&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);x&&C.setAttribute("disabled","disabled");u&&(d.appendChild(C),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),z||mxUtils.br(d));return C};EditorUi.prototype.addEditButton=
function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),z="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));
-u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var H=new FilenameDialog(this,z,mxResources.get("ok"),function(L){null!=L?z=L:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",
-mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":z:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var L=document.createElement("div");L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(L.style.border=
-"1px solid black",L.style.backgroundColor=u):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(L)}mxUtils.write(d,mxResources.get("links")+":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,
+u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var H=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?z=K:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",
+mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":z:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var K=document.createElement("div");K.style.width="100%";K.style.height="100%";K.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(K.style.border=
+"1px solid black",K.style.backgroundColor=u):(K.style.backgroundPosition="center center",K.style.backgroundRepeat="no-repeat",K.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(K)}mxUtils.write(d,mxResources.get("links")+":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,
mxResources.get("automatic"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));x.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);
-mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(u||"none",function(C){u=C;g()});mxEvent.consume(L)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},
+mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(K){this.pickColor(u||"none",function(C){u=C;g()});mxEvent.consume(K)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},
getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,z,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=z&&0<z.length&&H.push("edit="+encodeURIComponent(z)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=
-this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,z,u,H,L,C,G){C=this.createUrlParameters(d,f,g,x,z,u,C);d=this.getCurrentFile();f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),L||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(C.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,z,u,H,L,C,G,V,U){this.getBasenames();
-var Y={};""!=z&&z!=mxConstants.NONE&&(Y.highlight=z);"auto"!==x&&(Y.target=x);G||(Y.lightbox=!1);Y.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Y.zoom=g/100);g=[];H&&(g.push("pages"),Y.resize=!0,null!=this.pages&&null!=this.currentPage&&(Y.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Y.resize=!0);L&&g.push("layers");C&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Y.toolbar=g.join(" "));null!=V&&0<V.length&&(Y.edit=V);null!=d?Y.url=d:Y.xml=this.getFileData(!0,
+this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,z,u,H,K,C,G){C=this.createUrlParameters(d,f,g,x,z,u,C);d=this.getCurrentFile();f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),K||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(C.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,z,u,H,K,C,G,V,U){this.getBasenames();
+var Y={};""!=z&&z!=mxConstants.NONE&&(Y.highlight=z);"auto"!==x&&(Y.target=x);G||(Y.lightbox=!1);Y.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Y.zoom=g/100);g=[];H&&(g.push("pages"),Y.resize=!0,null!=this.pages&&null!=this.currentPage&&(Y.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Y.resize=!0);K&&g.push("layers");C&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Y.toolbar=g.join(" "));null!=V&&0<V.length&&(Y.edit=V);null!=d?Y.url=d:Y.xml=this.getFileData(!0,
null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Y))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
-EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");
-L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","type-embedhtmldialog");u=L.cloneNode(!0);u.setAttribute("value","copy");H.appendChild(u);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(C);mxUtils.br(H);H.appendChild(L);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));H.appendChild(C);var G=this.getCurrentFile();
-null==g&&null!=G&&G.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),H.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&L.setAttribute("disabled","disabled");z.appendChild(H);var V=this.addLinkSection(z),U=this.addCheckbox(z,mxResources.get("zoom"),
+EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var K=document.createElement("input");
+K.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","type-embedhtmldialog");u=K.cloneNode(!0);u.setAttribute("value","copy");H.appendChild(u);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(C);mxUtils.br(H);H.appendChild(K);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));H.appendChild(C);var G=this.getCurrentFile();
+null==g&&null!=G&&G.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),H.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&K.setAttribute("disabled","disabled");z.appendChild(H);var V=this.addLinkSection(z),U=this.addCheckbox(z,mxResources.get("zoom"),
!0,null,!0);mxUtils.write(z,":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value="100%";z.appendChild(Y);var O=this.addCheckbox(z,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(z,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(z,mxResources.get("layers"),!0),aa=this.addCheckbox(z,mxResources.get("tags"),!0),ca=this.addCheckbox(z,
-mxResources.get("lightbox"),!0),fa=null;H=380;if(EditorUi.enableHtmlEditOption){fa=this.addEditButton(z,ca);var J=fa.getEditInput();J.style.marginBottom="16px";H+=50;mxEvent.addListener(ca,"change",function(){ca.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&ca.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,z,mxUtils.bind(this,function(){x(L.checked?g:null,U.checked,Y.value,
-V.getTarget(),V.getColor(),O.checked,qa.checked,oa.checked,aa.checked,ca.checked,null!=fa?fa.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,x,z,u,H,L){var C=document.createElement("div");C.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(G);var V=this.getCurrentFile();
+mxResources.get("lightbox"),!0),fa=null;H=380;if(EditorUi.enableHtmlEditOption){fa=this.addEditButton(z,ca);var J=fa.getEditInput();J.style.marginBottom="16px";H+=50;mxEvent.addListener(ca,"change",function(){ca.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&ca.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,z,mxUtils.bind(this,function(){x(K.checked?g:null,U.checked,Y.value,
+V.getTarget(),V.getColor(),O.checked,qa.checked,oa.checked,aa.checked,ca.checked,null!=fa?fa.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,x,z,u,H,K){var C=document.createElement("div");C.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(G);var V=this.getCurrentFile();
d=0;if(null==V||V.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var U=document.createElement("div");U.style.whiteSpace="normal";mxUtils.write(U,mxResources.get("linkAccountRequired"));G.appendChild(U);
U=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(V.getId())}));U.style.marginTop="12px";U.className="geBtn";G.appendChild(U);C.appendChild(G);U=document.createElement("a");U.style.paddingLeft="12px";U.style.color="gray";U.style.fontSize="11px";U.style.cursor="pointer";mxUtils.write(U,mxResources.get("check"));G.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
mxUtils.bind(this,function(P){this.spinner.stop();P=new ErrorDialog(this,null,mxResources.get(null!=P?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(P.container,300,80,!0,!1);P.init()}))}))}var Y=null,O=null;if(null!=g||null!=x)d+=30,mxUtils.write(C,mxResources.get("width")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.marginRight="16px",Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginRight="16px",Y.style.marginBottom="10px",
Y.value="100%",C.appendChild(Y),mxUtils.write(C,mxResources.get("height")+":"),O=document.createElement("input"),O.setAttribute("type","text"),O.style.width="50px",O.style.marginLeft="6px",O.style.marginBottom="10px",O.value=x+"px",C.appendChild(O),mxUtils.br(C);var qa=this.addLinkSection(C,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==V||V.constructor!=window.DriveFile||f)oa=this.addCheckbox(C,mxResources.get("allPages"),g,!g);var aa=this.addCheckbox(C,mxResources.get("lightbox"),
!0,null,null,!u),ca=this.addEditButton(C,aa),fa=ca.getEditInput();u&&(fa.style.marginLeft=aa.style.marginLeft,aa.style.display="none",d-=20);var J=this.addCheckbox(C,mxResources.get("layers"),!0);J.style.marginLeft=fa.style.marginLeft;J.style.marginTop="8px";var Z=this.addCheckbox(C,mxResources.get("tags"),!0);Z.style.marginLeft=fa.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(aa,"change",function(){aa.checked?(J.removeAttribute("disabled"),fa.removeAttribute("disabled")):
-(J.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&aa.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){z(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,aa.checked,ca.getLink(),J.checked,null!=Y?Y.value:null,null!=O?O.value:null,Z.checked)}),null,mxResources.get("create"),H,L);this.showDialog(f.container,340,300+d,!0,!0);null!=Y?(Y.focus(),
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";u.appendChild(H);if(z){mxUtils.write(u,mxResources.get("zoom")+":");var L=document.createElement("input");
-L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";u.appendChild(L);mxUtils.write(u,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";u.appendChild(C);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),V=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var U=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Y=parseInt(L.value)/100||1,O=parseInt(C.value)||0;g(!G.checked,null!=V?V.checked:!1,null!=U?U.checked:!1,Y,O)}),null,d,f);
-this.showDialog(d.container,300,(z?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,z,u,H,L,C){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var V=this.editor.graph,U="jpeg"==L?220:300,Y=document.createElement("h3");mxUtils.write(Y,d);Y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Y);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");
+(J.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&aa.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){z(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,aa.checked,ca.getLink(),J.checked,null!=Y?Y.value:null,null!=O?O.value:null,Z.checked)}),null,mxResources.get("create"),H,K);this.showDialog(f.container,340,300+d,!0,!0);null!=Y?(Y.focus(),
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";u.appendChild(H);if(z){mxUtils.write(u,mxResources.get("zoom")+":");var K=document.createElement("input");
+K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.style.marginRight="12px";K.value=this.lastExportZoom||"100%";u.appendChild(K);mxUtils.write(u,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";u.appendChild(C);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),V=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var U=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Y=parseInt(K.value)/100||1,O=parseInt(C.value)||0;g(!G.checked,null!=V?V.checked:!1,null!=U?U.checked:!1,Y,O)}),null,d,f);
+this.showDialog(d.container,300,(z?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,z,u,H,K,C){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var V=this.editor.graph,U="jpeg"==K?220:300,Y=document.createElement("h3");mxUtils.write(Y,d);Y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Y);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");
O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),
!1,V.isSelectionEmpty()),aa=document.createElement("input");aa.style.marginTop="16px";aa.style.marginRight="8px";aa.style.marginLeft="24px";aa.setAttribute("disabled","disabled");aa.setAttribute("type","checkbox");var ca=document.createElement("select");ca.style.marginTop="16px";ca.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var fa={};for(Y=0;Y<d.length;Y++)if(!V.isSelectionEmpty()||"selectionOnly"!=d[Y]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(d[Y]));
J.setAttribute("value",d[Y]);ca.appendChild(J);fa[d[Y]]=J}C?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ca),mxUtils.br(G),U+=26,mxEvent.addListener(ca,"change",function(){"selectionOnly"==ca.value&&(oa.checked=!0)})):u&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),U+=30,mxEvent.addListener(oa,"change",function(){oa.checked?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")}));V.isSelectionEmpty()?C&&(oa.style.display="none",oa.nextSibling.style.display=
-"none",oa.nextSibling.nextSibling.style.display="none",U-=30):(ca.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){ca.value=oa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=L),P=null;Editor.isDarkMode()&&(P=this.addCheckbox(G,mxResources.get("dark"),!0),U+=26);var da=this.addCheckbox(G,mxResources.get("shadow"),V.shadowVisible),ja=null;if("png"==L||"jpeg"==
-L)ja=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=L);ka.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var F=document.createElement("select");F.style.maxWidth="260px";F.style.marginLeft=
+"none",oa.nextSibling.nextSibling.style.display="none",U-=30):(ca.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){ca.value=oa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=K),P=null;Editor.isDarkMode()&&(P=this.addCheckbox(G,mxResources.get("dark"),!0),U+=26);var da=this.addCheckbox(G,mxResources.get("shadow"),V.shadowVisible),ja=null;if("png"==K||"jpeg"==
+K)ja=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=K);ka.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var F=document.createElement("select");F.style.maxWidth="260px";F.style.marginLeft=
"8px";F.style.marginRight="10px";F.style.marginBottom="16px";F.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||
F.appendChild(u);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){"lblToSvg"==F.value?(q.checked=!0,q.setAttribute("disabled","disabled"),fa.page.style.display="none","page"==ca.value&&(ca.value="diagram"),da.checked=!1,da.setAttribute("disabled","disabled"),W.style.display="inline-block",R.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),da.removeAttribute("disabled"),fa.page.style.display="",W.style.display="none",R.style.display=
"")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(F),mxUtils.br(G),U+=60);var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value",
-"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));R.appendChild(f);var W=document.createElement("div");mxUtils.write(W,mxResources.get("LinksLost"));W.style.margin="7px";W.style.display="none";"svg"==L&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(R),G.appendChild(W),mxUtils.br(G),mxUtils.br(G),U+=50);g=new CustomDialog(this,G,mxUtils.bind(this,
+"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));R.appendChild(f);var W=document.createElement("div");mxUtils.write(W,mxResources.get("LinksLost"));W.style.margin="7px";W.style.display="none";"svg"==K&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(R),G.appendChild(W),mxUtils.br(G),mxUtils.br(G),U+=50);g=new CustomDialog(this,G,mxUtils.bind(this,
function(){this.lastExportBorder=qa.value;this.lastExportZoom=O.value;z(O.value,Z.checked,!oa.checked,da.checked,ka.checked,q.checked,qa.value,aa.checked,!1,R.value,null!=ja?ja.checked:null,null!=P?P.checked:null,ca.value,"embedFonts"==F.value,"lblToSvg"==F.value)}),null,g,x);this.showDialog(g.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
-function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var L=document.createElement("h3");mxUtils.write(L,f);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(L)}var C=this.addCheckbox(u,mxResources.get("fit"),!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),V=this.addCheckbox(u,g),U=this.addCheckbox(u,mxResources.get("lightbox"),!0),Y=this.addEditButton(u,U),O=Y.getEditInput(),
+function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var K=document.createElement("h3");mxUtils.write(K,f);K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(K)}var C=this.addCheckbox(u,mxResources.get("fit"),!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),V=this.addCheckbox(u,g),U=this.addCheckbox(u,mxResources.get("lightbox"),!0),Y=this.addEditButton(u,U),O=Y.getEditInput(),
qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=O.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(qa&&oa.removeAttribute("disabled"),O.removeAttribute("disabled")):(oa.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?Y.getEditSelect().removeAttribute("disabled"):Y.getEditSelect().setAttribute("disabled",
-"disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(C.checked,G.checked,V.checked,U.checked,Y.getLink(),oa.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,z,u,H,L){function C(O){var qa=" ",oa="";x&&(qa=" 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('"+
+"disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(C.checked,G.checked,V.checked,U.checked,Y.getLink(),oa.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,z,u,H,K){function C(O){var qa=" ",oa="";x&&(qa=" 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!=V?"&page="+V:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var aa="";g&&(aa=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+O+'"'+aa+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),V=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var qa=x?this.getFileData(!0):
-null;O=this.createImageDataUri(O,qa,"png");C(O)}),null,null,null,mxUtils.bind(this,function(O){L({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";g&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Y=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+U+"&xml="+encodeURIComponent(f));Y.send(mxUtils.bind(this,function(){200<=
-Y.getStatus()&&299>=Y.getStatus()?C("data:image/png;base64,"+Y.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,x,z,u,H){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),C=L.getElementsByTagName("a");if(null!=C)for(var G=0;G<C.length;G++){var V=C[G].getAttribute("href");null!=V&&"#"==V.charAt(0)&&"_blank"==C[G].getAttribute("target")&&C[G].removeAttribute("target")}x&&
-L.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(L);if(g){var U=" ",Y="";x&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(u?"&layers=1":
-"")+"');}})(this);\"",Y+="cursor:pointer;");d&&(Y+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(O){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Y?' style="'+Y+'"':"")+U+"/>")}))}else Y="",x&&(f=this.getSelectedPageIndex(),L.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Y+="cursor:pointer;"),d&&(d=parseInt(L.getAttribute("width")),z=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+d+" "+z),Y+="max-width:100%;max-height:"+z+"px;",L.removeAttribute("height")),""!=Y&&L.setAttribute("style",Y),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),H(mxUtils.getXml(L))};EditorUi.prototype.timeSince=function(d){d=
+null;O=this.createImageDataUri(O,qa,"png");C(O)}),null,null,null,mxUtils.bind(this,function(O){K({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";g&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Y=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+U+"&xml="+encodeURIComponent(f));Y.send(mxUtils.bind(this,function(){200<=
+Y.getStatus()&&299>=Y.getStatus()?C("data:image/png;base64,"+Y.getText()):K({message:mxResources.get("unknownError")})}))}else K({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,x,z,u,H){var K=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),C=K.getElementsByTagName("a");if(null!=C)for(var G=0;G<C.length;G++){var V=C[G].getAttribute("href");null!=V&&"#"==V.charAt(0)&&"_blank"==C[G].getAttribute("target")&&C[G].removeAttribute("target")}x&&
+K.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(K);if(g){var U=" ",Y="";x&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(u?"&layers=1":
+"")+"');}})(this);\"",Y+="cursor:pointer;");d&&(Y+="max-width:100%;");this.editor.convertImages(K,mxUtils.bind(this,function(O){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Y?' style="'+Y+'"':"")+U+"/>")}))}else Y="",x&&(f=this.getSelectedPageIndex(),K.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Y+="cursor:pointer;"),d&&(d=parseInt(K.getAttribute("width")),z=parseInt(K.getAttribute("height")),K.setAttribute("viewBox","-0.5 -0.5 "+d+" "+z),Y+="max-width:100%;max-height:"+z+"px;",K.removeAttribute("height")),""!=Y&&K.setAttribute("style",Y),this.editor.addFontCss(K),this.editor.graph.mathEnabled&&this.editor.addMathCss(K),H(mxUtils.getXml(K))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:z.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,z){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,L=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),u),L=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var C=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(V){return"page"==V?G.getName():"pagenumber"==V?1:C.apply(this,
-arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(V){try{null==L&&(L=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=V.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(L));d(U.substring(U.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Y){null!=f&&f(Y)}}),null,null,null,mxUtils.bind(this,function(V){null!=f&&
-f(V)}),null,null,x,null,u.shadowVisible,null,u,z,null,null,null,"diagram",null)}catch(V){null!=f&&f(V)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){L=null!=L?L:!0;V=null!=V?V:0;H=null!=C?C:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,V,null,null,u,null,null,null,f.shadowVisible||U,null,Y,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(u,null,null,0==V);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var O=mxUtils.bind(this,function(qa){qa=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=z&&z(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=z)this.embedFonts(u,mxUtils.bind(this,function(qa){L?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){O(oa)})):O(qa)}));else return O(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-z?this.getFileData(!0,null,null,null,g,L):null,C,null==this.pages||0==this.pages.length,V)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,U,Y)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,z,u,H){f=null!=f?f:0;g=null!=g?g:0;var L=
+d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,z){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,K=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),u),K=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var C=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(V){return"page"==V?G.getName():"pagenumber"==V?1:C.apply(this,
+arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(V){try{null==K&&(K=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=V.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(K));d(U.substring(U.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Y){null!=f&&f(Y)}}),null,null,null,mxUtils.bind(this,function(V){null!=f&&
+f(V)}),null,null,x,null,u.shadowVisible,null,u,z,null,null,null,"diagram",null)}catch(V){null!=f&&f(V)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){K=null!=K?K:!0;V=null!=V?V:0;H=null!=C?C:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,V,null,null,u,null,null,null,f.shadowVisible||U,null,Y,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(u,null,null,0==V);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var O=mxUtils.bind(this,function(qa){qa=
+(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=z&&z(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=z)this.embedFonts(u,mxUtils.bind(this,function(qa){K?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){O(oa)})):O(qa)}));else return O(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
+z?this.getFileData(!0,null,null,null,g,K):null,C,null==this.pages||0==this.pages.length,V)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,U,Y)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,z,u,H){f=null!=f?f:0;g=null!=g?g:0;var K=
[];try{var C=this.editor.graph;if(null!=d&&0<d.length){C.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var V=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=V&&"mxfile"==V.nodeName&&null!=this.pages){var U=V.getElementsByTagName("diagram");if(1==U.length&&!u){if(V=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Y=U[0].getAttribute("name");null!=Y&&""!=Y&&this.editor.graph.model.execute(new RenamePage(this,
this.currentPage,Y))}}else if(0<U.length){u=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=this.pages[0].getId(),V=Editor.parseDiagramNode(U[0]),x=!1,O=1);for(;O<U.length;O++){var qa=U[O].getAttribute("id");U[O].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(U[O]));d[qa]=U[O].getAttribute("id");var aa=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[aa+1]));C.model.execute(new ChangePage(this,
-oa,oa,aa,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=V&&"mxGraphModel"===V.nodeName){L=C.importGraphModel(V,f,g,x);if(null!=L)for(O=0;O<L.length;O++)this.updatePageLinksForCell(d,L[O]);var ca=C.parseBackgroundImage(V.getAttribute("backgroundImage"));if(null!=ca&&null!=ca.originalSrc){this.updateBackgroundPageLink(d,ca);var fa=new ChangePageSetup(this,null,ca);fa.ignoreColor=!0;C.model.execute(fa)}}H&&this.insertHandler(L,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(J){if(z)throw J;
-this.handleError(J)}return L};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,z=x.getLinkForCell(f);null!=z&&x.setLinkForCell(f,this.updatePageLink(d,z));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,L=0;L<u.length;L++)z=u[L].getAttribute("href"),null!=z&&(u[L].setAttribute("href",this.updatePageLink(d,z)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(L=0;L<x.model.getChildCount(f);L++)this.updatePageLinksForCell(d,x.model.getChildAt(f,L))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var z=0;z<x.actions.length;z++){var u=x.actions[z];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(L){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,z){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var L="UNKNOWN-VISIO",C=x.lastIndexOf(".");if(0<=C&&C<x.length)L=x.substring(C+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
-G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:L+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(U){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var V=new XMLHttpRequest;V.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));V.responseType="blob";this.addRemoteServiceSecurityCheck(V);
+oa,oa,aa,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=V&&"mxGraphModel"===V.nodeName){K=C.importGraphModel(V,f,g,x);if(null!=K)for(O=0;O<K.length;O++)this.updatePageLinksForCell(d,K[O]);var ca=C.parseBackgroundImage(V.getAttribute("backgroundImage"));if(null!=ca&&null!=ca.originalSrc){this.updateBackgroundPageLink(d,ca);var fa=new ChangePageSetup(this,null,ca);fa.ignoreColor=!0;C.model.execute(fa)}}H&&this.insertHandler(K,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(J){if(z)throw J;
+this.handleError(J)}return K};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),x=this.editor.graph,z=x.getLinkForCell(f);null!=z&&x.setLinkForCell(f,this.updatePageLink(d,z));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,K=0;K<u.length;K++)z=u[K].getAttribute("href"),null!=z&&(u[K].setAttribute("href",this.updatePageLink(d,z)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(K=0;K<x.model.getChildCount(f);K++)this.updatePageLinksForCell(d,x.model.getChildAt(f,K))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var z=0;z<x.actions.length;z++){var u=x.actions[z];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(K){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,z){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var K="UNKNOWN-VISIO",C=x.lastIndexOf(".");if(0<=C&&C<x.length)K=x.substring(C+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
+G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:K+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(U){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var V=new XMLHttpRequest;V.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));V.responseType="blob";this.addRemoteServiceSecurityCheck(V);
null!=z&&V.setRequestHeader("x-convert-custom",z);V.onreadystatechange=mxUtils.bind(this,function(){if(4==V.readyState)if(200<=V.status&&299>=V.status)try{var U=V.response;if("text/xml"==U.type){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(O){try{f(O.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Y.readAsText(U)}else this.doImportVisio(U,f,g,x)}catch(O){g(O)}else try{""==V.responseType||"text"==V.responseType?g({message:V.responseText}):(Y=new FileReader,
Y.onload=function(){g({message:JSON.parse(Y.result).Message})},Y.readAsText(V.response))}catch(O){g({})}});V.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(U){g(U)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});
var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(z){g(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var z=
-JSON.parse(d);f(LucidImporter.importState(z));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",z];null!=z.state&&u.push(JSON.parse(z.state));if(null!=z.svgThumbs)for(var H=0;H<z.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(z.svgThumbs[H]));null!=z.thumb&&u.push(z.thumb);console.log.apply(console,u)}}catch(L){}}catch(L){null!=window.console&&console.error(L),g(L)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(d);f(LucidImporter.importState(z));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",z];null!=z.state&&u.push(JSON.parse(z.state));if(null!=z.svgThumbs)for(var H=0;H<z.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(z.svgThumbs[H]));null!=z.thumb&&u.push(z.thumb);console.log.apply(console,u)}}catch(K){}}catch(K){null!=window.console&&console.error(K),g(K)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var z=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var L=mxUtils.parseXml(H).getElementsByTagName("svg");
-if(0<L.length){var C=parseFloat(L[0].getAttribute("width")),G=parseFloat(L[0].getAttribute("height"));if(isNaN(C)||isNaN(G))try{var V=L[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(V[2]);G=parseFloat(V[3])}catch(U){C=C||100,G=G||100}g(z.convertDataUri(Editor.createSvgDataUri(H)),C,G)}else x({message:mxResources.get("invalidInput")})}catch(U){x(U)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function z(L,C,G){c1=L>>2;c2=(L&3)<<4|C>>4;c3=(C&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+L);L-=26;return 0==L?"-":1==L?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(L){r="";for(i=0;i<L.length;i+=3)r=i+2==L.length?r+z(L.charCodeAt(i),L.charCodeAt(i+1),0):i+1==L.length?r+z(L.charCodeAt(i),0,0):r+z(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(G){var V=new Image;V.onload=
-function(){try{var U=V.width,Y=V.height;if(0==U&&0==Y){var O=C.result,qa=O.indexOf(","),oa=decodeURIComponent(escape(atob(O.substring(qa+1)))),aa=mxUtils.parseXml(oa).getElementsByTagName("svg");0<aa.length&&(U=parseFloat(aa[0].getAttribute("width")),Y=parseFloat(aa[0].getAttribute("height")))}g(C.result,U,Y)}catch(ca){x(ca)}};V.src=C.result};C.onerror=function(G){x(G)}}else x(L)};H.onerror=function(L){x(L)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,z=null;
-x.getModel().beginUpdate();try{z=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(z,!0)}finally{x.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(d,f,g,x,z,u,H,L){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),
-mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Y.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var C=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,L)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
-null!=G&&0<G.length))return this.importXml(G,f,g,u,!0,L);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var V=this.importXml(G,f,g,u,!0,L);if(0<V.length)return V}catch(Y){}this.loadImage(d,mxUtils.bind(this,function(Y){if("data:"==d.substring(0,5))this.resizeImage(Y,d,mxUtils.bind(this,function(oa,aa,
+f,g,x){var z=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var K=mxUtils.parseXml(H).getElementsByTagName("svg");
+if(0<K.length){var C=parseFloat(K[0].getAttribute("width")),G=parseFloat(K[0].getAttribute("height"));if(isNaN(C)||isNaN(G))try{var V=K[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(V[2]);G=parseFloat(V[3])}catch(U){C=C||100,G=G||100}g(z.convertDataUri(Editor.createSvgDataUri(H)),C,G)}else x({message:mxResources.get("invalidInput")})}catch(U){x(U)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function z(K,C,G){c1=K>>2;c2=(K&3)<<4|C>>4;c3=(C&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(K){if(10>K)return String.fromCharCode(48+K);K-=10;if(26>K)return String.fromCharCode(65+K);K-=26;if(26>K)return String.fromCharCode(97+K);K-=26;return 0==K?"-":1==K?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(K){r="";for(i=0;i<K.length;i+=3)r=i+2==K.length?r+z(K.charCodeAt(i),K.charCodeAt(i+1),0):i+1==K.length?r+z(K.charCodeAt(i),0,0):r+z(K.charCodeAt(i),K.charCodeAt(i+1),K.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(K){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(G){var V=new Image;V.onload=
+function(){try{var U=V.width,Y=V.height;if(0==U&&0==Y){var O=C.result,qa=O.indexOf(","),oa=decodeURIComponent(escape(atob(O.substring(qa+1)))),aa=mxUtils.parseXml(oa).getElementsByTagName("svg");0<aa.length&&(U=parseFloat(aa[0].getAttribute("width")),Y=parseFloat(aa[0].getAttribute("height")))}g(C.result,U,Y)}catch(ca){x(ca)}};V.src=C.result};C.onerror=function(G){x(G)}}else x(K)};H.onerror=function(K){x(K)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,z=null;
+x.getModel().beginUpdate();try{z=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(z,!0)}finally{x.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(d,f,g,x,z,u,H,K){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),
+mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Y.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var C=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,K)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
+null!=G&&0<G.length))return this.importXml(G,f,g,u,!0,K);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var V=this.importXml(G,f,g,u,!0,K);if(0<V.length)return V}catch(Y){}this.loadImage(d,mxUtils.bind(this,function(Y){if("data:"==d.substring(0,5))this.resizeImage(Y,d,mxUtils.bind(this,function(oa,aa,
ca){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(f),C.snap(g),aa,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Y.width,this.maxImageSize/Y.height)),qa=Math.round(Y.width*O);Y=Math.round(Y.height*O);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(f),C.snap(g),qa,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Y=null;C.getModel().beginUpdate();try{Y=C.insertVertex(C.getDefaultParent(),null,d,C.snap(f),C.snap(g),1,1,"text;"+(x?"html=1;":"")),C.updateCellSize(Y),C.fireEvent(new mxEventObject("textInserted","cells",[Y]))}finally{C.getModel().endUpdate()}C.setSelectionCell(Y)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,L);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Y){this.editor.graph.setSelectionCells(this.importXml(Y,f,g,u,null,L))}),mxUtils.bind(this,function(Y){this.handleError(Y)}));else{C=this.editor.graph;z=null;C.getModel().beginUpdate();try{z=C.insertVertex(C.getDefaultParent(),null,"",C.snap(f),C.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[z]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+d+";"))}}),mxUtils.bind(this,function(){var Y=null;C.getModel().beginUpdate();try{Y=C.insertVertex(C.getDefaultParent(),null,d,C.snap(f),C.snap(g),1,1,"text;"+(x?"html=1;":"")),C.updateCellSize(Y),C.fireEvent(new mxEventObject("textInserted","cells",[Y]))}finally{C.getModel().endUpdate()}C.setSelectionCell(Y)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,K);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(Y){this.editor.graph.setSelectionCells(this.importXml(Y,f,g,u,null,K))}),mxUtils.bind(this,function(Y){this.handleError(Y)}));else{C=this.editor.graph;z=null;C.getModel().beginUpdate();try{z=C.insertVertex(C.getDefaultParent(),null,"",C.snap(f),C.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[z]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
"...");z.value=d;C.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var U=C.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=U.width;z.geometry.height=U.height}Graph.isLink(z.value)&&C.setLinkForCell(z,z.value);z.geometry.width+=C.gridSize;z.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,L){StorageFile.listFiles(this,
-"F",H,L)});window.openBrowserFile=mxUtils.bind(this,function(H,L,C){StorageFile.getFileContent(this,H,L,C)});window.deleteBrowserFile=mxUtils.bind(this,function(H,L,C){StorageFile.deleteFile(this,H,L,C)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(H=new Blob([H],{type:"application/octet-stream"}),
-this.importVisio(H,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,L)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,u=z.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(z,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,L,C=!1;u.forEach(function(G,V){G=V.name.toLowerCase();"diagram/diagram.xml"==G?(C=!0,V.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,L=V))});0<H?L.async("string").then(function(G){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(V){4==V.readyState&&(200<=V.status&&299>=V.status?f(V.responseText):g())}),d.name):g()}):C||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importFile=function(d,f,g,x,z,u,H,L,C,G,V,U){G=null!=
-G?G:!0;var Y=!1,O=null,qa=mxUtils.bind(this,function(oa){var aa=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):aa=this.importXml(oa,g,x,G,null,null!=U?mxEvent.isControlDown(U):null);null!=L&&L(aa)});"image"==f.substring(0,5)?(C=!1,"image/png"==f.substring(0,9)&&(f=V?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(O=this.importXml(f,g,x,G,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(f=this.editor.graph,C=d.indexOf(";"),0<C&&(d=d.substring(0,
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,K){StorageFile.listFiles(this,
+"F",H,K)});window.openBrowserFile=mxUtils.bind(this,function(H,K,C){StorageFile.getFileContent(this,H,K,C)});window.deleteBrowserFile=mxUtils.bind(this,function(H,K,C){StorageFile.deleteFile(this,H,K,C)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,K){null!=K&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(K)?(H=new Blob([H],{type:"application/octet-stream"}),
+this.importVisio(H,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,K)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,u=z.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(z,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var x=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,K,C=!1;u.forEach(function(G,V){G=V.name.toLowerCase();"diagram/diagram.xml"==G?(C=!0,V.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,K=V))});0<H?K.async("string").then(function(G){(new XMLHttpRequest).upload&&
+x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(V){4==V.readyState&&(200<=V.status&&299>=V.status?f(V.responseText):g())}),d.name):g()}):C||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importFile=function(d,f,g,x,z,u,H,K,C,G,V,U){G=null!=
+G?G:!0;var Y=!1,O=null,qa=mxUtils.bind(this,function(oa){var aa=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):aa=this.importXml(oa,g,x,G,null,null!=U?mxEvent.isControlDown(U):null);null!=K&&K(aa)});"image"==f.substring(0,5)?(C=!1,"image/png"==f.substring(0,9)&&(f=V?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(O=this.importXml(f,g,x,G,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(f=this.editor.graph,C=d.indexOf(";"),0<C&&(d=d.substring(0,
C)+d.substring(d.indexOf(",",C+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),O=[f.insertVertex(null,null,"",g,x,z,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Y=!0,this.importGraphML(d,qa)):null!=C&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Y=!0,this.importVisio(C,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Y=!0,z=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=L&&L(null))}),null!=d?this.parseFileData(d,z,H):this.parseFile(C,z,H)):0==d.indexOf("PK")&&null!=C?(Y=!0,this.importZipFile(C,qa,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);L(O)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(O=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));Y||null==L||L(O);return O};EditorUi.prototype.importFiles=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=V||this.resampleThreshold,ca=0;ca<d.length;ca++)if("image/svg"!==d[ca].type.substring(0,9)&&"image/"===d[ca].type.substring(0,6)&&d[ca].size>aa){oa=!0;break}var fa=mxUtils.bind(this,
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Y=!0,z=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=K&&K(null))}),null!=d?this.parseFileData(d,z,H):this.parseFile(C,z,H)):0==d.indexOf("PK")&&null!=C?(Y=!0,this.importZipFile(C,qa,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);K(O)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(O=this.insertTextAt(this.validateFileData(d),
+g,x,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));Y||null==K||K(O);return O};EditorUi.prototype.importFiles=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=V||this.resampleThreshold,ca=0;ca<d.length;ca++)if("image/svg"!==d[ca].type.substring(0,9)&&"image/"===d[ca].type.substring(0,6)&&d[ca].size>aa){oa=!0;break}var fa=mxUtils.bind(this,
function(){var J=this.editor.graph,Z=J.gridSize;z=null!=z?z:mxUtils.bind(this,function(F,R,W,T,ba,ia,ra,ta,ma){try{return null!=F&&"<mxlibrary"==F.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,F,ra)),null):this.importFile(F,R,W,T,ba,ia,ra,ta,ma,O,U,Y)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this,function(F){J.setSelectionCells(F)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var P=d.length,da=P,ja=[],ka=mxUtils.bind(this,
-function(F,R){ja[F]=R;if(0==--da){this.spinner.stop();if(null!=L)L(ja);else{var W=[];J.getModel().beginUpdate();try{for(F=0;F<ja.length;F++){var T=ja[F]();null!=T&&(W=W.concat(T))}}finally{J.getModel().endUpdate()}}u(W)}}),q=0;q<P;q++)mxUtils.bind(this,function(F){var R=d[F];if(null!=R){var W=new FileReader;W.onload=mxUtils.bind(this,function(T){if(null==H||H(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var ba=Graph.clipSvgDataUri(T.target.result),ia=ba.indexOf(",");
+function(F,R){ja[F]=R;if(0==--da){this.spinner.stop();if(null!=K)K(ja);else{var W=[];J.getModel().beginUpdate();try{for(F=0;F<ja.length;F++){var T=ja[F]();null!=T&&(W=W.concat(T))}}finally{J.getModel().endUpdate()}}u(W)}}),q=0;q<P;q++)mxUtils.bind(this,function(F){var R=d[F];if(null!=R){var W=new FileReader;W.onload=mxUtils.bind(this,function(T){if(null==H||H(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var ba=Graph.clipSvgDataUri(T.target.result),ia=ba.indexOf(",");
ia=decodeURIComponent(escape(atob(ba.substring(ia+1))));var ra=mxUtils.parseXml(ia);ia=ra.getElementsByTagName("svg");if(0<ia.length){ia=ia[0];var ta=U?null:ia.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta||"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(F,mxUtils.bind(this,function(){try{if(null!=ra){var za=ra.getElementsByTagName("svg");
if(0<za.length){var Ba=za[0],Ia=Ba.getAttribute("width"),Aa=Ba.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var Ka=Ba.getAttribute("viewBox");if(null==Ka||0==Ka.length)Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da=Ka.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Ra=Math.min(1,Math.min(x/Math.max(1,
Ia)),x/Math.max(1,Aa)),Qa=z(ba,R.type,f+F*Z,g+F*Z,Math.max(1,Math.round(Ia*Ra)),Math.max(1,Math.round(Aa*Ra)),R.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Qa[0].geometry.width=Ia;Qa[0].geometry.height=Aa;Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);ba=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));J.setCellStyles("image",ba,
@@ -3629,8 +3629,8 @@ V)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return z(Ba,R.type,f+F*Z,g+F*Z,Math.round(I
f+F*Z,g+F*Z,240,160,R.name,function(T){ka(F,function(){return T})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?W.readAsDataURL(R):W.readAsText(R)}})(q)});if(oa){oa=[];for(ca=0;ca<d.length;ca++)oa.push(d[ca]);d=oa;this.confirmImageResize(function(J){qa=J;fa()},C)}else fa()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(u){z(u,!0)},function(u){z(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):z(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
-x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,z,u,H){z=null!=z?z:this.maxImageSize;var L=Math.max(1,d.width),C=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=
-Math.max(L/z,C/z);if(1<G){var V=Math.round(L/G),U=Math.round(C/G),Y=document.createElement("canvas");Y.width=V;Y.height=U;Y.getContext("2d").drawImage(d,0,0,V,U);var O=Y.toDataURL();if(O.length<f.length){var qa=document.createElement("canvas");qa.width=V;qa.height=U;var oa=qa.toDataURL();O!==oa&&(f=O,L=V,C=U)}}}catch(aa){}g(f,L,C)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=
+x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,z,u,H){z=null!=z?z:this.maxImageSize;var K=Math.max(1,d.width),C=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=
+Math.max(K/z,C/z);if(1<G){var V=Math.round(K/G),U=Math.round(C/G),Y=document.createElement("canvas");Y.width=V;Y.height=U;Y.getContext("2d").drawImage(d,0,0,V,U);var O=Y.toDataURL();if(O.length<f.length){var qa=document.createElement("canvas");qa.width=V;qa.height=U;var oa=qa.toDataURL();O!==oa&&(f=O,K=V,C=U)}}}catch(aa){}g(f,K,C)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=
function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(z){if(null!=g)g(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=
mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(aa){var ca=aa.getEvent();return null==aa.getState()&&!mxEvent.isMouseEvent(ca)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ca)&&(null==
aa.getState()||mxEvent.isControlDown(ca)||mxEvent.isShiftDown(ca))});f.cellEditor.editPlantUmlData=function(aa,ca,fa){var J=JSON.parse(fa);ca=new TextareaDialog(d,mxResources.get("plantUml")+":",J.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,J.format,function(P,da,ja){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==J.format)f.labelChanged(aa,"<pre>"+P+"</pre>"),f.updateCellSize(aa,!0);else{f.setCellStyles("image",d.convertDataUri(P),
@@ -3641,7 +3641,7 @@ f.customLinkClicked=function(aa){var ca=!1;try{d.handleCustomLink(aa),ca=!0}catc
mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(aa,ca){aa=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=aa){var fa=aa.indexOf(",");if(0<fa)for(aa=aa.substring(fa+1),ca=ca.getProperty("patches"),fa=0;fa<ca.length;fa++)if(null!=ca[fa][EditorUi.DIFF_UPDATE]&&null!=ca[fa][EditorUi.DIFF_UPDATE][aa]||null!=ca[fa][EditorUi.DIFF_REMOVE]&&
0<=mxUtils.indexOf(ca[fa][EditorUi.DIFF_REMOVE],aa)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(aa,ca){var fa=u.apply(this,arguments);if(null!=fa&&null!=fa.originalSrc)if(!ca)fa={src:fa.originalSrc};else if(ca&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,Z=this.shapeForegroundColor,P=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor=
"#000000";fa=d.createImageForPageLink(fa.originalSrc);this.shapeBackgroundColor=P;this.shapeForegroundColor=Z;this.stylesheet=J}return fa};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
-"https://app.diagrams.net/";var L=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return L.apply(this,arguments)};var C=f.addClickHandler;f.addClickHandler=function(aa,ca,fa){var J=ca;ca=function(Z,P){if(null==P){var da=mxEvent.getSource(Z);"a"==da.nodeName.toLowerCase()&&(P=da.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(P)&&mxEvent.consume(Z);
+"https://app.diagrams.net/";var K=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return K.apply(this,arguments)};var C=f.addClickHandler;f.addClickHandler=function(aa,ca,fa){var J=ca;ca=function(Z,P){if(null==P){var da=mxEvent.getSource(Z);"a"==da.nodeName.toLowerCase()&&(P=da.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(P)&&mxEvent.consume(Z);
null!=J&&J(Z,P)};C.call(this,aa,ca,fa)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(aa,ca,fa){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(aa,"delete - cut copy copyAsImage - duplicate".split(" "),null,fa)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,
null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var V=f.getExportVariables;f.getExportVariables=function(){var aa=V.apply(this,arguments),ca=d.getCurrentFile();null!=ca&&(aa.filename=ca.getTitle());aa.pagecount=null!=d.pages?d.pages.length:1;aa.page=null!=d.currentPage?d.currentPage.getName():"";aa.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return aa};var U=f.getGlobalVariable;f.getGlobalVariable=
function(aa){var ca=d.getCurrentFile();return"filename"==aa&&null!=ca?ca.getTitle():"page"==aa&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==aa?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==aa?null!=d.pages?d.pages.length:1:U.apply(this,arguments)};var Y=f.labelLinkClicked;f.labelLinkClicked=function(aa,ca,fa){var J=ca.getAttribute("href");if(null==J||!f.isCustomLink(J)||!mxEvent.isTouchEvent(fa)&&mxEvent.isPopupTrigger(fa))Y.apply(this,arguments);
@@ -3662,7 +3662,7 @@ function(){f.setSelectionCells(this.insertTextAt(ka,P,da,!0,q,null,F,mxEvent.isC
null,"",P,da,T*ba,W*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ja+";"))}),mxUtils.bind(this,function(W){f.setSelectionCells(this.insertTextAt(ja,P,da,!0))})):0<=mxUtils.indexOf(aa.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(aa.dataTransfer.getData("text/plain"),P,da,!0))}}aa.stopPropagation();aa.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
O=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",O);this.addListener("sketchModeChanged",O);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);
this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,z=0;z<g.types.length;z++)if("text/"===g.types[z].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,
-function(C,G,V,U,Y,O){d.insertImage(C,Y,O)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],L.x,L.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
+function(C,G,V,U,Y,O){d.insertImage(C,Y,O)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()});else{var K=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],K.x,K.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize=
"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&
(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),
@@ -3694,13 +3694,13 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito
function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,z){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(z.getAttribute("width")),L=parseInt(z.getAttribute("height"));this.writeImageToClipboard(u,H,L,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,z){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(z.getAttribute("width")),K=parseInt(z.getAttribute("height"));this.writeImageToClipboard(u,H,K,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,
function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var z=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":z,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),z=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(z));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=z,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var z=this.editor.graph,u=null;z.lastPasteXml==d?z.pasteCounter++:(z.lastPasteXml=d,z.pasteCounter=0);var H=z.pasteCounter*z.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),z.setSelectionCells(u);else if(f&&1==z.getSelectionCount()){H=z.getStartEditingCell(z.getSelectionCell(),
x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==z.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])z.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{z.model.beginUpdate();try{z.labelChanged(H,d),Graph.isLink(d)&&z.setLinkForCell(H,d)}finally{z.model.endUpdate()}}z.setSelectionCell(H)}else u=z.getInsertPoint(),z.isMouseInsertPoint()&&(H=0,z.lastPasteXml==d&&0<z.pasteCounter&&z.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),z.setSelectionCells(u);z.isSelectionEmpty()||(z.scrollCellToVisible(z.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(z.view.getState(z.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var z=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),L=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var C=decodeURIComponent(H);this.isCompatibleString(C)&&(L=!0,H=C)}catch(qa){}L=L?null:d.clipboardData.getData("text/html");null!=L&&0<L.length?(z=
-this.parseHtmlData(L),u="text/plain"!=z.getAttribute("data-type")):null!=H&&0<H.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,L))}H=z.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
+null!=this.hoverIcons&&this.hoverIcons.update(z.view.getState(z.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var z=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),K=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var C=decodeURIComponent(H);this.isCompatibleString(C)&&(K=!0,H=C)}catch(qa){}K=K?null:d.clipboardData.getData("text/html");null!=K&&0<K.length?(z=
+this.parseHtmlData(K),u="text/plain"!=z.getAttribute("data-type")):null!=H&&0<H.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,K))}H=z.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
0);var aa=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,aa,aa));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText),V=!1;try{var U=G.lastIndexOf("%3E");0<=U&&U<G.length-3&&(G=G.substring(0,U+3))}catch(qa){}try{H=z.getElementsByTagName("span"),(C=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):
decodeURIComponent(G))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(V=!0,G=C)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Y=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,V,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Y):Y()}else this.pasteXml(G,
x,V,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
@@ -3710,18 +3710,18 @@ u=u.getElementsByTagName("img"),0<u.length&&(z=u[0].getAttribute("src"))):0<=mxU
299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var z=document.documentElement;
var u=(x.clientWidth||z.clientWidth)-3;x=Math.max(x.clientHeight||0,z.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=g+"px";z.style.width=Math.max(0,u-3)+"px";z.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(z):
document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,z){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,L,f))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(L){this.spinner.stop();u(L)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(L){this.spinner.stop();u(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),
-200<=L.status&&299>=L.status?u(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,x)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(L){this.spinner.stop();u(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,K,f))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(K){this.spinner.stop();u(K)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(K){this.spinner.stop();u(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),
+200<=K.status&&299>=K.status?u(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,x)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(K){this.spinner.stop();u(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(z=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,z,null!=z?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var z=new FileReader;z.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});z.onerror=mxUtils.bind(this,function(u){this.spinner.stop();
-this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?z.readAsText(x):z.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,z){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(d);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?z.readAsText(x):z.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,z){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(d);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
d,f||this.defaultFilename,g,x,z))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(H){if(null!=H){var L=H.lastIndexOf(".");0<L&&(H=H.substring(L+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,z=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=x.model.getChildCount(d);for(var u=0;u<z;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
+function(d,f){function g(H){if(null!=H){var K=H.lastIndexOf(".");0<K&&(H=H.substring(K+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,z=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=x.model.getChildCount(d);for(var u=0;u<z;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,z){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,L;for(L in H){var C=H[L];null!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,z){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,K;for(K in H){var C=H[K];null!=
C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
@@ -3755,23 +3755,23 @@ try{d(ma,pa,null,Y)}catch(za){this.handleError(za)}g=!1;null!=urlParams.modified
f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=ma,H.postMessage(JSON.stringify(pa),"*");null!=V&&V()});null!=G&&
"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(U="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(ma){ta(ma,C)},mxUtils.bind(this,function(ma){this.handleError(ma)}),U)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
mxUtils.bind(this,function(ma){4==ma.readyState&&200<=ma.status&&299>=ma.status&&"<mxGraphModel"==ma.responseText.substring(0,13)&&ta(ma.responseText,C)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(ma){ta(ma)}),mxUtils.bind(this,function(ma){this.handleError(ma)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=U(G),ta(G,C)):this.loadDescriptor(G,mxUtils.bind(this,function(ma){ta(ra(),C)}),
-mxUtils.bind(this,function(ma){this.handleError(ma,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(C,G,V){L.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:C,target:G,allowOpener:V}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+mxUtils.bind(this,function(ma){this.handleError(ma,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var K=this.editor.graph.openLink;this.editor.graph.openLink=function(C,G,V){K.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:C,target:G,allowOpener:V}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var x="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,x);f.setAttribute("title",x);mxEvent.addListener(f,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className=
"geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],z=[],u=[],H={};if(0<g.length){var L={},C=this.editor.graph,G=null,V=null,U=null,Y=null,O=null,qa=null,oa=null,aa="whiteSpace=wrap;html=1;",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],z=[],u=[],H={};if(0<g.length){var K={},C=this.editor.graph,G=null,V=null,U=null,Y=null,O=null,qa=null,oa=null,aa="whiteSpace=wrap;html=1;",
ca=null,fa=null,J="",Z="auto",P="auto",da=!1,ja=null,ka=null,q=40,F=40,R=100,W=0,T=function(){null!=f?f(ya):(C.setSelectionCells(ya),C.scrollCellToVisible(C.getSelectionCell()))},ba=C.getFreeInsertPoint(),ia=ba.x,ra=ba.y;ba=ra;var ta=null,ma="auto";fa=null;for(var pa=[],za=null,Ba=null,Ia=0;Ia<g.length&&"#"==g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=
d.indexOf(":");if(0<Aa){var Ka=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==Ka?ta=C.sanitizeHtml(Da):"labelname"==Ka&&0<Da.length&&"-"!=Da?O=Da:"labels"==Ka&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==Ka?V=Da:"parentstyle"==Ka?aa=Da:"unknownStyle"==Ka&&"-"!=Da?qa=Da:"stylename"==Ka&&0<Da.length&&"-"!=Da?Y=Da:"styles"==Ka&&0<Da.length&&"-"!=Da?U=JSON.parse(Da):"vars"==Ka&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==Ka&&0<Da.length&&"-"!=Da?ca=Da:"parent"==
Ka&&0<Da.length&&"-"!=Da?fa=Da:"namespace"==Ka&&0<Da.length&&"-"!=Da?J=Da:"width"==Ka?Z=Da:"height"==Ka?P=Da:"collapsed"==Ka&&"-"!=Da?da="true"==Da:"left"==Ka&&0<Da.length?ja=Da:"top"==Ka&&0<Da.length?ka=Da:"ignore"==Ka?Ba=Da.split(","):"connect"==Ka?pa.push(JSON.parse(Da)):"link"==Ka?za=Da:"padding"==Ka?W=parseFloat(Da):"edgespacing"==Ka?q=parseFloat(Da):"nodespacing"==Ka?F=parseFloat(Da):"levelspacing"==Ka?R=parseFloat(Da):"layout"==Ka&&(ma=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));
-var Ra=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;Ka=[];for(Da=0;Da<Ra.length;Da++)ca==Ra[Da]&&(d=Da),fa==Ra[Da]&&(Aa=Da),Ka.push(mxUtils.trim(Ra[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+Ka[0]+"%");if(null!=pa)for(var Qa=0;Qa<pa.length;Qa++)null==L[pa[Qa].to]&&(L[pa[Qa].to]={});ca=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];
+var Ra=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;Ka=[];for(Da=0;Da<Ra.length;Da++)ca==Ra[Da]&&(d=Da),fa==Ra[Da]&&(Aa=Da),Ka.push(mxUtils.trim(Ra[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+Ka[0]+"%");if(null!=pa)for(var Qa=0;Qa<pa.length;Qa++)null==K[pa[Qa].to]&&(K[pa[Qa].to]={});ca=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];
throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ca.push(Ta)}C.model.beginUpdate();try{for(Da=0;Da<ca.length;Da++){Ta=ca[Da];var Pa=null,y=null!=d?J+Ta[d]:null;g=!1;null!=y&&(Pa=C.model.getCell(y),g=null==Pa||0<=mxUtils.indexOf(x,Pa));var M=new mxCell(ta,new mxGeometry(ia,ba,0,0),V||"whiteSpace=wrap;html=1;");M.collapsed=da;M.vertex=!0;M.id=y;null==Pa||g||C.model.setCollapsed(Pa,da);for(var N=0;N<Ta.length;N++)C.setAttributeForCell(M,Ka[N],Ta[N]),null==Pa||
g||C.setAttributeForCell(Pa,Ka[N],Ta[N]);if(null!=O&&null!=oa){var S=oa[M.getAttribute(O)];null!=S&&(C.labelChanged(M,S),null==Pa||g||C.cellLabelChanged(Pa,S))}if(null!=Y&&null!=U){var X=U[M.getAttribute(Y)];null!=X&&(M.style=X)}C.setAttributeForCell(M,"placeholders","1");M.style=C.replacePlaceholders(M,M.style,G);null==Pa||g?C.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(C.model.setStyle(Pa,M.style),0>mxUtils.indexOf(u,Pa)&&u.push(Pa),C.fireEvent(new mxEventObject("cellsInserted","cells",
-[Pa])));g=null!=Pa;Pa=M;if(!g)for(Qa=0;Qa<pa.length;Qa++)L[pa[Qa].to][Pa.getAttribute(pa[Qa].to)]=Pa;null!=za&&"link"!=za&&(C.setLinkForCell(Pa,Pa.getAttribute(za)),C.setAttributeForCell(Pa,za,null));var ha=this.editor.graph.getPreferredSizeForCell(Pa);fa=null!=Aa?C.model.getCell(J+Ta[Aa]):null;if(Pa.vertex){Za=null!=fa?0:ia;Ia=null!=fa?0:ra;null!=ja&&null!=Pa.getAttribute(ja)&&(Pa.geometry.x=Za+parseFloat(Pa.getAttribute(ja)));null!=ka&&null!=Pa.getAttribute(ka)&&(Pa.geometry.y=Ia+parseFloat(Pa.getAttribute(ka)));
+[Pa])));g=null!=Pa;Pa=M;if(!g)for(Qa=0;Qa<pa.length;Qa++)K[pa[Qa].to][Pa.getAttribute(pa[Qa].to)]=Pa;null!=za&&"link"!=za&&(C.setLinkForCell(Pa,Pa.getAttribute(za)),C.setAttributeForCell(Pa,za,null));var ha=this.editor.graph.getPreferredSizeForCell(Pa);fa=null!=Aa?C.model.getCell(J+Ta[Aa]):null;if(Pa.vertex){Za=null!=fa?0:ia;Ia=null!=fa?0:ra;null!=ja&&null!=Pa.getAttribute(ja)&&(Pa.geometry.x=Za+parseFloat(Pa.getAttribute(ja)));null!=ka&&null!=Pa.getAttribute(ka)&&(Pa.geometry.y=Ia+parseFloat(Pa.getAttribute(ka)));
var la="@"==Z.charAt(0)?Pa.getAttribute(Z.substring(1)):null;Pa.geometry.width=null!=la&&"auto"!=la?parseFloat(Pa.getAttribute(Z.substring(1))):"auto"==Z||"auto"==la?ha.width+W:parseFloat(Z);var xa="@"==P.charAt(0)?Pa.getAttribute(P.substring(1)):null;Pa.geometry.height=null!=xa&&"auto"!=xa?parseFloat(xa):"auto"==P||"auto"==xa?ha.height+W:parseFloat(P);ba+=Pa.geometry.height+F}g?(null==H[y]&&(H[y]=[]),H[y].push(Pa)):(x.push(Pa),null!=fa?(fa.style=C.replacePlaceholders(fa,aa,G),C.addCell(Pa,fa),z.push(fa)):
u.push(C.addCell(Pa)))}for(Da=0;Da<z.length;Da++)la="@"==Z.charAt(0)?z[Da].getAttribute(Z.substring(1)):null,xa="@"==P.charAt(0)?z[Da].getAttribute(P.substring(1)):null,"auto"!=Z&&"auto"!=la||"auto"!=P&&"auto"!=xa||C.updateGroupBounds([z[Da]],W,!0);var sa=u.slice(),ya=u.slice();for(Qa=0;Qa<pa.length;Qa++){var Fa=pa[Qa];for(Da=0;Da<x.length;Da++){Pa=x[Da];var wa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=
-L[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ia,ra,0,0),qa);ib.style=C.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+W;ib.geometry.height=gb.height+W;L[lb.to][$a[ab]]=ib;ib.vertex=!0;ib.id=$a[ab];u.push(C.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=C.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&
+K[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ia,ra,0,0),qa);ib.style=C.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+W;ib.geometry.height=gb.height+W;K[lb.to][$a[ab]]=ib;ib.vertex=!0;ib.id=$a[ab];u.push(C.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=C.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&
(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+C.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?C.replacePlaceholders(qb,lb.style,G):C.createCurrentEdgeStyle();gb=C.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");
mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=C.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});wa(Pa,Pa,Fa);if(null!=H[Pa.id])for(N=0;N<H[Pa.id].length;N++)wa(Pa,H[Pa.id][N],Fa)}}if(null!=Ba)for(Da=0;Da<x.length;Da++)for(Pa=x[Da],N=0;N<Ba.length;N++)C.setAttributeForCell(Pa,
mxUtils.trim(Ba[N]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(C);ua.spacing=q;ua.checkOverlap=!0;var La=function(){0<ua.spacing&&ua.execute(C.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=C.getCellGeometry(u[fb]);pb.x=Math.round(C.snap(pb.x));pb.y=Math.round(C.snap(pb.y));"auto"==Z&&(pb.width=Math.round(C.snap(pb.width)));"auto"==P&&(pb.height=Math.round(C.snap(pb.height)))}};if("["==ma.charAt(0)){var Oa=T;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ma)),
@@ -3784,63 +3784,63 @@ d,f,g,!0,x,z);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prot
var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);
Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);
this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
-function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var E=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);
+function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var E=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
+function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);
this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");
f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&
-(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,z,u,H,L){var C=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(C.getSvg(x,z,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),V=C.getGraphBounds(),U=Math.floor(V.width*z/C.view.scale),Y=Math.floor(V.height*z/C.view.scale);if(G.length<=MAX_REQUEST_SIZE&&
-U*Y<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var O={globalVars:C.getExportVariables()};L&&(O.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+U+"&h="+Y+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==
-g?d.exportImage(z,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,L,H):d.exportImage(z,!1,!0,!1,!1,u,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,z,u,H,K){var C=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(C.getSvg(x,z,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),V=C.getGraphBounds(),U=Math.floor(V.width*z/C.view.scale),Y=Math.floor(V.height*z/C.view.scale);if(G.length<=MAX_REQUEST_SIZE&&
+U*Y<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var O={globalVars:C.getExportVariables()};K&&(O.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+U+"&h="+Y+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==
+g?d.exportImage(z,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,K,H):d.exportImage(z,!1,!0,!1,!1,u,!0,!1,"jpeg",K);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=
this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var L=H[d];if("R"==L.substring(0,1)){var C=JSON.parse(decodeURIComponent(L.substring(1)));u[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){z.innerText="";if(0==G.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var K=H[d];if("R"==K.substring(0,1)){var C=JSON.parse(decodeURIComponent(K.substring(1)));u[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){z.innerText="";if(0==G.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var V=0;V<G.length;V++){var U=G[V];u[U.id]&&(f[U.id]=U);var Y=this.addCheckbox(z,U.title,u[U.id]);(function(O,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[O.id]=O:delete f[O.id]})})(U,Y)}},mxUtils.bind(this,function(G){z.innerText="";var V=document.createElement("div");V.style.padding="8px";V.style.textAlign="center";mxUtils.write(V,mxResources.get("error")+": ");mxUtils.write(V,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));z.appendChild(V)}));
g.appendChild(z);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,V;for(V in f)null==u[V]&&(G++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(Y){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Y,U))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(f[V]));for(V in u)f[V]||this.closeLibrary(new RemoteLibrary(this,null,u[V]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
-(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,z){var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(H);u&&z.apply(this,
-arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:C});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,V){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=V?U.error={errResp:V}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),
-"*")});try{var x=d.funtionName,z=this.remoteInvokableFns[x];if(null!=z&&"function"===typeof this[x]){if(z.allowedDomains){for(var u=!1,H=0;H<z.allowedDomains.length;H++)if(f=="https://"+z.allowedDomains[H]){u=!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var L=d.functionArgs;Array.isArray(L)||(L=[]);if(z.isAsync)L.push(function(){g(Array.prototype.slice.apply(arguments))}),L.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,L);else{var C=this[x].apply(this,L);
+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,z){var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),K=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(H);u&&z.apply(this,
+arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:K,error:C});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,V){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=V?U.error={errResp:V}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),
+"*")});try{var x=d.funtionName,z=this.remoteInvokableFns[x];if(null!=z&&"function"===typeof this[x]){if(z.allowedDomains){for(var u=!1,H=0;H<z.allowedDomains.length;H++)if(f=="https://"+z.allowedDomains[H]){u=!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var K=d.functionArgs;Array.isArray(K)||(K=[]);if(z.isAsync)K.push(function(){g(Array.prototype.slice.apply(arguments))}),K.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,K);else{var C=this[x].apply(this,K);
g([C])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(z){try{var u=x.result;1>z.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",
-{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(z){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display=
-"none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var C=!0,G=!1,V,U=0,Y=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;qa()}),qa=mxUtils.bind(this,function(){try{if(U>=V.length)Y();else{var aa=V[U];StorageFile.getFileContent(this,aa,mxUtils.bind(this,
-function(ca){null==ca||".scratchpad"==aa&&ca==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):O()}),O)}}catch(ca){console.log(ca)}}),oa=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],O,O,["filesInfo","files"])}catch(ca){console.log(ca)}});H=mxUtils.bind(this,function(aa){try{if(aa.source==
-L.contentWindow){var ca={};try{ca=JSON.parse(aa.data)}catch(fa){}"init"==ca.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ca.event||G||(C?null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?(V=ca.resp[0],C=!1,qa()):Y():null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?oa(ca.resp[0]):O())}}catch(fa){console.log(fa)}});window.addEventListener("message",
-H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(z){null!=f&&f(z)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,x,z){this.openDatabase(mxUtils.bind(this,function(u){try{z=z||"objects";Array.isArray(z)||(z=[z],d=[d],f=[f]);var H=u.transaction(z,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<z.length;u++)H.objectStore(z[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(L){null!=x&&x(L)}}),x)};
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(z){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var K=document.createElement("iframe");K.style.display=
+"none";K.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(K);var C=!0,G=!1,V,U=0,Y=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);K.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;qa()}),qa=mxUtils.bind(this,function(){try{if(U>=V.length)Y();else{var aa=V[U];StorageFile.getFileContent(this,aa,mxUtils.bind(this,
+function(ca){null==ca||".scratchpad"==aa&&ca==this.emptyLibraryXml?K.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):O()}),O)}}catch(ca){console.log(ca)}}),oa=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],O,O,["filesInfo","files"])}catch(ca){console.log(ca)}});H=mxUtils.bind(this,function(aa){try{if(aa.source==
+K.contentWindow){var ca={};try{ca=JSON.parse(aa.data)}catch(fa){}"init"==ca.event?(K.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),K.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ca.event||G||(C?null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?(V=ca.resp[0],C=!1,qa()):Y():null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?oa(ca.resp[0]):O())}}catch(fa){console.log(fa)}});window.addEventListener("message",
+H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(z){null!=f&&f(z)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,x,z){this.openDatabase(mxUtils.bind(this,function(u){try{z=z||"objects";Array.isArray(z)||(z=[z],d=[d],f=[f]);var H=u.transaction(z,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<z.length;u++)H.objectStore(z[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(K){null!=x&&x(K)}}),x)};
EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);z=z.transaction(x,"readwrite");z.oncomplete=f;z.onerror=g;for(var u=0;u<x.length;u++)z.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){try{x=x||"objects";var u=z.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=
g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var z=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),u=[];z.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};z.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";
var z=x.transaction([g],"readonly").objectStore(g).getAllKeys();z.onsuccess=function(){d(z.result)};z.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
-DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,x,z,u,H,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,z,u,H,L)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,z,u,H,L,C,G,V,U,Y,O,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,f,g,x,z,u,H,L,C,G,V,U,Y,O,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,x,z,u,H,K){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,z,u,H,K)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,z,u,H,K,C,G,V,U,Y,O,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(d,f,g,x,z,u,H,K,C,G,V,U,Y,O,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(d,f,g,x,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var z="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(z||
x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,D,p){function E(){for(var aa=G.getElementsByTagName("div"),ca=0,fa=0;fa<aa.length;fa++)"none"!=aa[fa].style.display&&aa[fa].parentNode==G&&ca++;V.style.display=0==ca?"block":"none"}function K(aa,ca,fa,J){function Z(){ca.removeChild(ja);ca.removeChild(ka);da.style.display="block";P.style.display="block"}H={div:ca,comment:aa,saveCallback:fa,deleteOnCancel:J};var P=ca.querySelector(".geCommentTxt"),da=ca.querySelector(".geCommentActionsList"),ja=document.createElement("textarea");
+var CommentsWindow=function(b,e,k,m,D,p){function E(){for(var aa=G.getElementsByTagName("div"),ca=0,fa=0;fa<aa.length;fa++)"none"!=aa[fa].style.display&&aa[fa].parentNode==G&&ca++;V.style.display=0==ca?"block":"none"}function L(aa,ca,fa,J){function Z(){ca.removeChild(ja);ca.removeChild(ka);da.style.display="block";P.style.display="block"}H={div:ca,comment:aa,saveCallback:fa,deleteOnCancel:J};var P=ca.querySelector(".geCommentTxt"),da=ca.querySelector(".geCommentActionsList"),ja=document.createElement("textarea");
ja.className="geCommentEditTxtArea";ja.style.minHeight=P.offsetHeight+"px";ja.value=aa.content;ca.insertBefore(ja,P);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){J?(ca.parentNode.removeChild(ca),E()):Z();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){P.innerText="";aa.content=ja.value;mxUtils.write(P,aa.content);Z();fa(aa);H=null});mxEvent.addListener(ja,
"keydown",mxUtils.bind(this,function(R){mxEvent.isConsumed(R)||((mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R))&&13==R.keyCode?(F.click(),mxEvent.consume(R)):27==R.keyCode&&(q.click(),mxEvent.consume(R)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);ca.insertBefore(ka,P);da.style.display="none";P.style.display="none";ja.focus()}function Q(aa,ca){ca.innerText="";aa=new Date(aa.modifiedDate);var fa=b.timeSince(aa);null==fa&&(fa=mxResources.get("lessThanAMinute"));
mxUtils.write(ca,mxResources.get("timeAgo",[fa],"{1} ago"));ca.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function d(aa){var ca=document.createElement("img");ca.className="geCommentBusyImg";ca.src=IMAGE_PATH+"/spin.gif";aa.appendChild(ca);aa.busyImg=ca}function f(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function g(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function x(aa,ca,fa,J,Z){function P(T,ba,ia){var ra=document.createElement("li");ra.className=
"geCommentAction";var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,T);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(ma){ba(ma,aa);ma.preventDefault();mxEvent.consume(ma)});W.appendChild(ra);ia&&(ra.style.display="none")}function da(){function T(ra){ba.push(ia);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ia=ia.nextSibling,T(ra.replies[ta])}var ba=[],ia=ka;T(aa);return{pdiv:ia,replies:ba}}function ja(T,ba,ia,ra,ta){function ma(){d(Ia);
-aa.addReply(Ba,function(Aa){Ba.id=Aa;aa.replies.push(Ba);g(Ia);ia&&ia()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ba,Ia,function(Aa){ma()},!0)}var za=da().pdiv,Ba=b.newComment(T,b.getCurrentUser());Ba.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Ia=x(Ba,aa.replies,za,J+1);ba?pa():ma()}if(Z||!aa.isResolved){V.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
+aa.addReply(Ba,function(Aa){Ba.id=Aa;aa.replies.push(Ba);g(Ia);ia&&ia()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){L(Ba,Ia,function(Aa){ma()},!0)}var za=da().pdiv,Ba=b.newComment(T,b.getCurrentUser());Ba.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Ia=x(Ba,aa.replies,za,J+1);ba?pa():ma()}if(Z||!aa.isResolved){V.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*J+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R,
aa.user.displayName||"");F.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",aa.id);Q(aa,R);F.appendChild(R);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";q.appendChild(W);z||aa.isLocked||0!=J&&
-!u||P(mxResources.get("reply"),function(){ja("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||z||aa.isLocked||(P(mxResources.get("edit"),function(){function T(){K(aa,ka,function(){d(ka);aa.editComment(aa.content,function(){g(ka)},function(ba){f(ka);T();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},aa.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);aa.deleteComment(function(T){if(!0===
+!u||P(mxResources.get("reply"),function(){ja("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||z||aa.isLocked||(P(mxResources.get("edit"),function(){function T(){L(aa,ka,function(){d(ka);aa.editComment(aa.content,function(){g(ka)},function(ba){f(ka);T();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},aa.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);aa.deleteComment(function(T){if(!0===
T){T=ka.querySelector(".geCommentTxt");T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(T=0;T<ba.length;T++)ba[T].parentNode.removeChild(ba[T]);g(ka);ka.style.opacity="0.5"}else{ba=da(aa).replies;for(T=0;T<ba.length;T++)G.removeChild(ba[T]);for(T=0;T<ca.length;T++)if(ca[T]==aa){ca.splice(T,1);break}V.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(T){f(ka);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
aa.isResolved));z||aa.isLocked||0!=J||P(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function ba(){var ia=T.target;ia.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ia,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=aa.isResolved?"none":"",ta=da(aa).replies,ma=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=ma;for(var za=ta[pa].querySelectorAll(".geCommentAction"),
-Ba=0;Ba<za.length;Ba++)za[Ba]!=ia.parentNode&&(za[Ba].style.display=ra);O||(ta[pa].style.display="none")}E()}aa.isResolved?ja(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ja(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=fa?G.insertBefore(ka,fa.nextSibling):G.appendChild(ka);for(fa=0;null!=aa.replies&&fa<aa.replies.length;fa++)q=aa.replies[fa],q.isResolved=aa.isResolved,x(q,aa.replies,null,J+1,Z);null!=H&&(H.comment.id==aa.id?(Z=aa.content,aa.content=H.comment.content,K(aa,
-ka,H.saveCallback,H.deleteOnCancel),aa.content=Z):null==H.comment.id&&H.comment.pCommentId==aa.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var z=!b.canComment(),u=b.canReplyToReplies(),H=null,L=document.createElement("div");L.className="geCommentsWin";L.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";G.style.bottom=parseInt(C)+7+"px";L.appendChild(G);var V=document.createElement("span");V.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(V,mxResources.get("noCommentsFound"));var U=document.createElement("div");U.className="geToolbarContainer geCommentsToolbar";U.style.height=C;U.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
-C.className="geButton";if(!z){var Y=C.cloneNode();Y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(aa){function ca(){K(fa,J,function(Z){d(J);b.addComment(Z,function(P){Z.id=P;qa.push(Z);g(J)},function(P){f(J);ca();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var fa=b.newComment("",b.getCurrentUser()),J=x(fa,qa,null,0);
+Ba=0;Ba<za.length;Ba++)za[Ba]!=ia.parentNode&&(za[Ba].style.display=ra);O||(ta[pa].style.display="none")}E()}aa.isResolved?ja(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ja(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=fa?G.insertBefore(ka,fa.nextSibling):G.appendChild(ka);for(fa=0;null!=aa.replies&&fa<aa.replies.length;fa++)q=aa.replies[fa],q.isResolved=aa.isResolved,x(q,aa.replies,null,J+1,Z);null!=H&&(H.comment.id==aa.id?(Z=aa.content,aa.content=H.comment.content,L(aa,
+ka,H.saveCallback,H.deleteOnCancel),aa.content=Z):null==H.comment.id&&H.comment.pCommentId==aa.id&&(G.appendChild(H.div),L(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var z=!b.canComment(),u=b.canReplyToReplies(),H=null,K=document.createElement("div");K.className="geCommentsWin";K.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";G.style.bottom=parseInt(C)+7+"px";K.appendChild(G);var V=document.createElement("span");V.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(V,mxResources.get("noCommentsFound"));var U=document.createElement("div");U.className="geToolbarContainer geCommentsToolbar";U.style.height=C;U.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
+C.className="geButton";if(!z){var Y=C.cloneNode();Y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(aa){function ca(){L(fa,J,function(Z){d(J);b.addComment(Z,function(P){Z.id=P;qa.push(Z);g(J)},function(P){f(J);ca();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var fa=b.newComment("",b.getCurrentUser()),J=x(fa,qa,null,0);
ca();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y)}Y=C.cloneNode();Y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Y.setAttribute("title",mxResources.get("showResolved"));Y.className="geAdaptiveAsset";var O=!1;mxEvent.addListener(Y,"click",function(aa){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";oa();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y);b.commentsRefreshNeeded()&&(Y=C.cloneNode(),Y.innerHTML='<img src="'+IMAGE_PATH+
'/update16.png" style="width: 16px; padding: 2px;">',Y.setAttribute("title",mxResources.get("refresh")),Y.className="geAdaptiveAsset",mxEvent.addListener(Y,"click",function(aa){oa();aa.preventDefault();mxEvent.consume(aa)}),U.appendChild(Y));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(aa){p();aa.preventDefault();
-mxEvent.consume(aa)}),U.appendChild(C));L.appendChild(U);var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var aa=H.div.querySelector(".geCommentEditTxtArea"),ca=H.div.querySelector(".geCommentEditBtns");H.comment.content=aa.value;aa.parentNode.removeChild(aa);ca.parentNode.removeChild(ca)}catch(fa){b.handleError(fa)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+mxEvent.consume(aa)}),U.appendChild(C));K.appendChild(U);var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var aa=H.div.querySelector(".geCommentEditTxtArea"),ca=H.div.querySelector(".geCommentEditBtns");H.comment.content=aa.value;aa.parentNode.removeChild(aa);ca.parentNode.removeChild(ca)}catch(fa){b.handleError(fa)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(fa){function J(Z){if(null!=Z){Z.sort(function(da,ja){return new Date(da.modifiedDate)-new Date(ja.modifiedDate)});for(var P=0;P<Z.length;P++)J(Z[P].replies)}}fa.sort(function(Z,P){return new Date(Z.modifiedDate)-new Date(P.modifiedDate)});G.innerText="";G.appendChild(V);V.style.display="block";qa=fa;for(fa=0;fa<qa.length;fa++)J(qa[fa].replies),x(qa[fa],qa,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&
-(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(fa){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(fa&&fa.message?": "+fa.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;U=mxUtils.bind(this,function(){function aa(P){var da=fa[P.id];if(null!=da)for(Q(P,da),da=0;null!=P.replies&&da<P.replies.length;da++)aa(P.replies[da])}if(this.window.isVisible()){for(var ca=
-G.querySelectorAll(".geCommentDate"),fa={},J=0;J<ca.length;J++){var Z=ca[J];fa[Z.getAttribute("data-commentId")]=Z}for(J=0;J<qa.length;J++)aa(qa[J])}});setInterval(U,6E4);this.refreshCommentsTime=U;this.window=new mxWindow(mxResources.get("comments"),L,e,k,m,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,D,p,E,K,Q,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
-d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var z=document.createElement("input");z.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(z.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(D||
+(G.appendChild(H.div),L(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(fa){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(fa&&fa.message?": "+fa.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;U=mxUtils.bind(this,function(){function aa(P){var da=fa[P.id];if(null!=da)for(Q(P,da),da=0;null!=P.replies&&da<P.replies.length;da++)aa(P.replies[da])}if(this.window.isVisible()){for(var ca=
+G.querySelectorAll(".geCommentDate"),fa={},J=0;J<ca.length;J++){var Z=ca[J];fa[Z.getAttribute("data-commentId")]=Z}for(J=0;J<qa.length;J++)aa(qa[J])}});setInterval(U,6E4);this.refreshCommentsTime=U;this.window=new mxWindow(mxResources.get("comments"),K,e,k,m,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,D,p,E,L,Q,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var z=document.createElement("input");z.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(z.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(D||
mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(z.checked)});d.appendChild(u);null!=E?(u.innerHTML=E+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);Q?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(z),D=document.createElement("span"),
mxUtils.write(D," "+mxResources.get("rememberThisSetting")),x.appendChild(D),g.appendChild(x),mxEvent.addListener(D,"click",function(H){z.checked=!z.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.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)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
@@ -3852,16 +3852,16 @@ function ChangePage(b,e,k,m,D){SelectPage.call(this,b,k);this.relatedPage=e;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),D=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(D=this.getImageForPage(m,e,k),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,D=this.createTemporaryGraph(k.getStylesheet());D.defaultPageBackgroundColor=k.defaultPageBackgroundColor;D.shapeBackgroundColor=k.shapeBackgroundColor;D.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);D.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(D.container);
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,D=this.createTemporaryGraph(k.getStylesheet());D.defaultPageBackgroundColor=k.defaultPageBackgroundColor;D.shapeBackgroundColor=k.shapeBackgroundColor;D.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);D.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(D.container);
this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";D!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=k&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),k=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,
p){D=p.getProperty("edit").changes;for(p=0;p<D.length;p++)if(D[p]instanceof SelectPage||D[p]instanceof RenamePage||D[p]instanceof MovePage||D[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}};
+mxSettings.getPageFormat():new mxRectangle(0,0,m,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(D){return D.name+"^"+D.url}).join("|"))};
@@ -3881,7 +3881,7 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=m.createCellLookup([m.model.root]);k=new DiagramPage(D);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=m.createCellLookup([m.model.root]);k=new DiagramPage(D);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(Q){this.handleError(Q)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -3889,44 +3889,44 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
1),D=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),D=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){D=null;g.stopPropagation();
g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=D&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=D&&d!=D&&this.movePage(D,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var K=this.createControlTab(4,"&nbsp;&#10095;");K.style.position="absolute";
-K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var Q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=Q+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var L=this.createControlTab(4,"&nbsp;&#10095;");L.style.position="absolute";
+L.style.right=this.editor.chromeless?"0px":"29px";L.style.fontSize="13pt";this.tabContainer.appendChild(L);var Q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=Q+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var D=new mxPopupMenu(mxUtils.bind(this,function(K,Q){var d=mxUtils.bind(this,function(){for(var z=0;z<this.pages.length;z++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),Q),L=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=L?" ["+L+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(z)}),f=mxUtils.bind(this,
-function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),Q)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(Q),f());var g=this.currentPage;if(null!=g){K.addSeparator(Q);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),Q);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),Q);e||K.addSeparator(Q);K.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),Q)}}e&&(K.addSeparator(Q),f(),K.addSeparator(Q),d())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(m),E=mxEvent.getClientY(m);D.popup(p,E,null,m);this.setCurrentMenu(D);mxEvent.consume(m)}));return b};
+var D=new mxPopupMenu(mxUtils.bind(this,function(L,Q){var d=mxUtils.bind(this,function(){for(var z=0;z<this.pages.length;z++)mxUtils.bind(this,function(u){var H=L.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),Q),K=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=K?" ["+K+"]":""));this.pages[u]==this.currentPage&&L.addCheckmark(H,Editor.checkmarkImage)})(z)}),f=mxUtils.bind(this,
+function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),Q)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(Q),f());var g=this.currentPage;if(null!=g){L.addSeparator(Q);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),Q);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),Q);e||L.addSeparator(Q);L.addItem(mxResources.get("duplicateIt",
+[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),Q)}}e&&(L.addSeparator(Q),f(),L.addSeparator(Q),d())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(m),E=mxEvent.getClientY(m);D.popup(p,E,null,m);this.setCurrentMenu(D);mxEvent.consume(m)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var D=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",D+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,D);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,D=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;D=b==this.currentPage;k.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&D||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var K=mxEvent.getClientX(p),Q=mxEvent.getClientY(p);E.popup(K,Q,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var L=mxEvent.getClientX(p),Q=mxEvent.getClientY(p);E.popup(L,Q,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=e&&(D+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+m.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,K,Q,d,f){p=this.createUrlParameters(p,E,K,Q,d,f);K||p.push("hide-pages=1");D.isSelectionEmpty()||(K=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,d=D.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-E.x,K.y=K.y/d-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,L,Q,d,f){p=this.createUrlParameters(p,E,L,Q,d,f);L||p.push("hide-pages=1");D.isSelectionEmpty()||(L=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,d=D.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-E.x,L.y=L.y/d-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
Q=new EmbedDialog(this,this.getLinkForPage(b,p,Q));this.showDialog(Q.container,450,240,!0,!0);Q.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(D,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(m.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(m.relatedPage.root=e.decodeCell(D,
-!1),m=D.nextSibling,D.parentNode.removeChild(D),D=m;null!=D;){m=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==e.lookup(p)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,D,p,E,K){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=Q;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(K,Q){var d=null!=Q&&this.isTreeEdge(Q);d&&p.push(Q);K==D||null!=Q&&!d||p.push(K);return(null==Q||d)&&(K==D||!this.model.isCollapsed(K))}));this.model.setCollapsed(D,m);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,D,p,E,K,Q){return this.model.filterCells(this.getEdges(m,
-D,p,E,K,Q),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(J){return H.isVertex(J)&&p(J)}function D(J){var Z=
-!1;null!=J&&(Z="1"==u.getCurrentCellStyle(J).treeMoving);return Z}function p(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),Z="tree"==(null!=Z?Z.style:u.getCellStyle(J)).containerType);return Z}function E(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),u.view.getState(J),Z=null!=(null!=Z?Z.style:u.getCellStyle(J)).childLayout);return Z}function K(J){J=u.view.getState(J);if(null!=J){var Z=u.getIncomingTreeEdges(J.cell);if(0<Z.length&&(Z=u.view.getState(Z[0]),null!=Z&&(Z=Z.absolutePoints,
+!1),m=D.nextSibling,D.parentNode.removeChild(D),D=m;null!=D;){m=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==e.lookup(p)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,D,p,E,L){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=Q;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(m,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(L,Q){var d=null!=Q&&this.isTreeEdge(Q);d&&p.push(Q);L==D||null!=Q&&!d||p.push(L);return(null==Q||d)&&(L==D||!this.model.isCollapsed(L))}));this.model.setCollapsed(D,m);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,D,p,E,L,Q){return this.model.filterCells(this.getEdges(m,
+D,p,E,L,Q),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(J){return H.isVertex(J)&&p(J)}function D(J){var Z=
+!1;null!=J&&(Z="1"==u.getCurrentCellStyle(J).treeMoving);return Z}function p(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),Z="tree"==(null!=Z?Z.style:u.getCellStyle(J)).containerType);return Z}function E(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),u.view.getState(J),Z=null!=(null!=Z?Z.style:u.getCellStyle(J)).childLayout);return Z}function L(J){J=u.view.getState(J);if(null!=J){var Z=u.getIncomingTreeEdges(J.cell);if(0<Z.length&&(Z=u.view.getState(Z[0]),null!=Z&&(Z=Z.absolutePoints,
null!=Z&&0<Z.length&&(Z=Z[Z.length-1],null!=Z)))){if(Z.y==J.y&&Math.abs(Z.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(Z.y==J.y+J.height&&Math.abs(Z.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(Z.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function Q(J,Z){Z=null!=Z?Z:!0;u.model.beginUpdate();try{var P=u.model.getParent(J),da=u.getIncomingTreeEdges(J),ja=u.cloneCells([da[0],J]);u.model.setTerminal(ja[0],u.model.getTerminal(da[0],
-!0),!0);var ka=K(J),q=P.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=Z?J.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=Z?J.geometry.height+10:-ja[1].geometry.height-10;u.view.currentRoot!=P&&(ja[1].geometry.x-=q.x,ja[1].geometry.y-=q.y);var F=u.view.getState(J),R=u.view.scale;if(null!=F){var W=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W.x+=(Z?J.geometry.width+10:-ja[1].geometry.width-
-10)*R:W.y+=(Z?J.geometry.height+10:-ja[1].geometry.height-10)*R;var T=u.getOutgoingTreeEdges(u.model.getTerminal(da[0],!0));if(null!=T){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ia=q=da=0;ia<T.length;ia++){var ra=u.model.getTerminal(T[ia],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY())&&mxUtils.intersects(W,ta)&&(da=10+Math.max(da,(Math.min(W.x+W.width,ta.x+ta.width)-Math.max(W.x,
-ta.x))/R),q=10+Math.max(q,(Math.min(W.y+W.height,ta.y+ta.height)-Math.max(W.y,ta.y))/R))}}ba?q=0:da=0;for(ia=0;ia<T.length;ia++)if(ra=u.model.getTerminal(T[ia],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY()))){var ma=[];u.traverse(ta.cell,!0,function(pa,za){var Ba=null!=za&&u.isTreeEdge(za);Ba&&ma.push(za);(null==za||Ba)&&ma.push(pa);return null==za||Ba});u.moveCells(ma,(Z?1:-1)*da,(Z?1:-1)*q)}}}return u.addCells(ja,
-P)}finally{u.model.endUpdate()}}function d(J){u.model.beginUpdate();try{var Z=K(J),P=u.getIncomingTreeEdges(J),da=u.cloneCells([P[0],J]);u.model.setTerminal(P[0],da[1],!1);u.model.setTerminal(da[0],da[1],!0);u.model.setTerminal(da[0],J,!1);var ja=u.model.getParent(J),ka=ja.geometry,q=[];u.view.currentRoot!=ja&&(da[1].geometry.x-=ka.x,da[1].geometry.y-=ka.y);u.traverse(J,!0,function(W,T){var ba=null!=T&&u.isTreeEdge(T);ba&&q.push(T);(null==T||ba)&&q.push(W);return null==T||ba});var F=J.geometry.width+
-40,R=J.geometry.height+40;Z==mxConstants.DIRECTION_SOUTH?F=0:Z==mxConstants.DIRECTION_NORTH?(F=0,R=-R):Z==mxConstants.DIRECTION_WEST?(F=-F,R=0):Z==mxConstants.DIRECTION_EAST&&(R=0);u.moveCells(q,F,R);return u.addCells(da,ja)}finally{u.model.endUpdate()}}function f(J,Z){u.model.beginUpdate();try{var P=u.model.getParent(J),da=u.getIncomingTreeEdges(J),ja=K(J);0==da.length&&(da=[u.createEdge(P,null,"",null,null,u.createCurrentEdgeStyle())],ja=Z);var ka=u.cloneCells([da[0],J]);u.model.setTerminal(ka[0],
+!0),!0);var ka=L(J),q=P.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=Z?J.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=Z?J.geometry.height+10:-ja[1].geometry.height-10;u.view.currentRoot!=P&&(ja[1].geometry.x-=q.x,ja[1].geometry.y-=q.y);var F=u.view.getState(J),R=u.view.scale;if(null!=F){var W=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W.x+=(Z?J.geometry.width+10:-ja[1].geometry.width-
+10)*R:W.y+=(Z?J.geometry.height+10:-ja[1].geometry.height-10)*R;var T=u.getOutgoingTreeEdges(u.model.getTerminal(da[0],!0));if(null!=T){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ia=q=da=0;ia<T.length;ia++){var ra=u.model.getTerminal(T[ia],!1);if(ka==L(ra)){var ta=u.view.getState(ra);ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY())&&mxUtils.intersects(W,ta)&&(da=10+Math.max(da,(Math.min(W.x+W.width,ta.x+ta.width)-Math.max(W.x,
+ta.x))/R),q=10+Math.max(q,(Math.min(W.y+W.height,ta.y+ta.height)-Math.max(W.y,ta.y))/R))}}ba?q=0:da=0;for(ia=0;ia<T.length;ia++)if(ra=u.model.getTerminal(T[ia],!1),ka==L(ra)&&(ta=u.view.getState(ra),ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY()))){var ma=[];u.traverse(ta.cell,!0,function(pa,za){var Ba=null!=za&&u.isTreeEdge(za);Ba&&ma.push(za);(null==za||Ba)&&ma.push(pa);return null==za||Ba});u.moveCells(ma,(Z?1:-1)*da,(Z?1:-1)*q)}}}return u.addCells(ja,
+P)}finally{u.model.endUpdate()}}function d(J){u.model.beginUpdate();try{var Z=L(J),P=u.getIncomingTreeEdges(J),da=u.cloneCells([P[0],J]);u.model.setTerminal(P[0],da[1],!1);u.model.setTerminal(da[0],da[1],!0);u.model.setTerminal(da[0],J,!1);var ja=u.model.getParent(J),ka=ja.geometry,q=[];u.view.currentRoot!=ja&&(da[1].geometry.x-=ka.x,da[1].geometry.y-=ka.y);u.traverse(J,!0,function(W,T){var ba=null!=T&&u.isTreeEdge(T);ba&&q.push(T);(null==T||ba)&&q.push(W);return null==T||ba});var F=J.geometry.width+
+40,R=J.geometry.height+40;Z==mxConstants.DIRECTION_SOUTH?F=0:Z==mxConstants.DIRECTION_NORTH?(F=0,R=-R):Z==mxConstants.DIRECTION_WEST?(F=-F,R=0):Z==mxConstants.DIRECTION_EAST&&(R=0);u.moveCells(q,F,R);return u.addCells(da,ja)}finally{u.model.endUpdate()}}function f(J,Z){u.model.beginUpdate();try{var P=u.model.getParent(J),da=u.getIncomingTreeEdges(J),ja=L(J);0==da.length&&(da=[u.createEdge(P,null,"",null,null,u.createCurrentEdgeStyle())],ja=Z);var ka=u.cloneCells([da[0],J]);u.model.setTerminal(ka[0],
J,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),R;for(R in F)u.setCellStyles(R,F[R],[ka[0]]),"edgeStyle"==R&&"elbowEdgeStyle"==F[R]&&u.setCellStyles("elbow",ja==mxConstants.DIRECTION_SOUTH||ja==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}da=u.getOutgoingTreeEdges(J);var W=P.geometry;Z=[];u.view.currentRoot==P&&(W=new mxRectangle);for(q=0;q<da.length;q++){var T=
u.model.getTerminal(da[q],!1);null!=T&&Z.push(T)}var ba=u.view.getBounds(Z),ia=u.view.translate,ra=u.view.scale;ja==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?J.geometry.x+(J.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ia.x-W.x+10,ka[1].geometry.y+=ka[1].geometry.height-W.y+40):ja==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?J.geometry.x+(J.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ia.x+-W.x+10,ka[1].geometry.y-=ka[1].geometry.height+W.y+40):(ka[1].geometry.x=
ja==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+W.x+40):ka[1].geometry.x+(ka[1].geometry.width-W.x+40),ka[1].geometry.y=null==ba?J.geometry.y+(J.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ia.y+-W.y+10);return u.addCells(ka,P)}finally{u.model.endUpdate()}}function g(J,Z,P){J=u.getOutgoingTreeEdges(J);P=u.view.getState(P);var da=[];if(null!=P&&null!=J){for(var ja=0;ja<J.length;ja++){var ka=u.view.getState(u.model.getTerminal(J[ja],!1));null!=ka&&(!Z&&Math.min(ka.x+
-ka.width,P.x+P.width)>=Math.max(ka.x,P.x)||Z&&Math.min(ka.y+ka.height,P.y+P.height)>=Math.max(ka.y,P.y))&&da.push(ka)}da.sort(function(q,F){return Z?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return da}function x(J,Z){var P=K(J),da=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==da&&P!=Z?z.actions.get("selectParent").funct():P==Z?(Z=u.getOutgoingTreeEdges(J),null!=Z&&0<Z.length&&u.setSelectionCell(u.model.getTerminal(Z[0],
-!1))):(P=u.getIncomingTreeEdges(J),null!=P&&0<P.length&&(da=g(u.model.getTerminal(P[0],!0),da,J),J=u.view.getState(J),null!=J&&(J=mxUtils.indexOf(da,J),0<=J&&(J+=Z==mxConstants.DIRECTION_NORTH||Z==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=da.length-1&&u.setSelectionCell(da[J].cell)))))}var z=this,u=z.editor.graph,H=u.getModel(),L=z.menus.createPopupMenu;z.menus.createPopupMenu=function(J,Z,P){L.apply(this,arguments);if(1==u.getSelectionCount()){Z=u.getSelectionCell();var da=u.getOutgoingTreeEdges(Z);
+ka.width,P.x+P.width)>=Math.max(ka.x,P.x)||Z&&Math.min(ka.y+ka.height,P.y+P.height)>=Math.max(ka.y,P.y))&&da.push(ka)}da.sort(function(q,F){return Z?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return da}function x(J,Z){var P=L(J),da=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==da&&P!=Z?z.actions.get("selectParent").funct():P==Z?(Z=u.getOutgoingTreeEdges(J),null!=Z&&0<Z.length&&u.setSelectionCell(u.model.getTerminal(Z[0],
+!1))):(P=u.getIncomingTreeEdges(J),null!=P&&0<P.length&&(da=g(u.model.getTerminal(P[0],!0),da,J),J=u.view.getState(J),null!=J&&(J=mxUtils.indexOf(da,J),0<=J&&(J+=Z==mxConstants.DIRECTION_NORTH||Z==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=da.length-1&&u.setSelectionCell(da[J].cell)))))}var z=this,u=z.editor.graph,H=u.getModel(),K=z.menus.createPopupMenu;z.menus.createPopupMenu=function(J,Z,P){K.apply(this,arguments);if(1==u.getSelectionCount()){Z=u.getSelectionCell();var da=u.getOutgoingTreeEdges(Z);
J.addSeparator();0<da.length&&(m(u.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,P),this.addMenuItems(J,["selectDescendants"],null,P));m(u.getSelectionCell())?(J.addSeparator(),0<u.getIncomingTreeEdges(Z).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,P)):0<u.model.getEdgeCount(Z)&&this.addMenuItems(J,["selectConnections"],null,P)}};z.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var J=u.getSelectionCell();J=u.getOutgoingTreeEdges(J);
if(null!=J){for(var Z=[],P=0;P<J.length;P++)Z.push(u.model.getTerminal(J[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+X");z.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var J=u.getSelectionCell();J=u.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=u.getOutgoingTreeEdges(u.model.getTerminal(J[0],!0)),null!=J)){for(var Z=[],P=0;P<J.length;P++)Z.push(u.model.getTerminal(J[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+S");z.actions.addAction("selectParent",
function(){if(u.isEnabled()&&1==u.getSelectionCount()){var J=u.getSelectionCell();J=u.getIncomingTreeEdges(J);null!=J&&0<J.length&&u.setSelectionCell(u.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");z.actions.addAction("selectDescendants",function(J,Z){J=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(J)){if(null!=Z&&mxEvent.isAltDown(Z))u.setSelectionCells(u.model.getTreeEdges(J,null==Z||!mxEvent.isShiftDown(Z),null==Z||!mxEvent.isControlDown(Z)));else{var P=[];u.traverse(J,!0,function(da,
@@ -3939,28 +3939,28 @@ R,!0);else if(0==u.getIncomingTreeEdges(F[T]).length){W=R;if(null==W||W==u.model
J,!0);var F=u.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{ja.endUpdate()}return ka}}var Y={88:z.actions.get("selectChildren"),84:z.actions.get("selectSubtree"),80:z.actions.get("selectParent"),83:z.actions.get("selectSiblings")},O=z.onKeyDown;z.onKeyDown=function(J){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var Z=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==J.which?Z=mxEvent.isShiftDown(J)?
d(u.getSelectionCell()):f(u.getSelectionCell()):13==J.which&&(Z=Q(u.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=Z&&0<Z.length)1==Z.length&&u.model.isEdge(Z[0])?u.setSelectionCell(u.model.getTerminal(Z[0],!1)):u.setSelectionCell(Z[Z.length-1]),null!=z.hoverIcons&&z.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var P=Y[J.keyCode];null!=P&&(P.funct(J),mxEvent.consume(J))}else 37==
J.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(da){z.handleError(da)}mxEvent.isConsumed(J)||O.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(J,Z,P,da,ja,ka,q){var F=u.getIncomingTreeEdges(J);
-if(m(J)){var R=K(J),W=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,T=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;return R==Z||0==F.length?f(J,Z):W==T?d(J):Q(J,Z!=mxConstants.DIRECTION_NORTH&&Z!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(J){var Z=[J];!D(J)&&!m(J)||E(J)||u.traverse(J,!0,function(P,da){var ja=null!=da&&u.isTreeEdge(da);ja&&0>mxUtils.indexOf(Z,da)&&Z.push(da);(null==da||ja)&&0>mxUtils.indexOf(Z,P)&&Z.push(P);return null==
+if(m(J)){var R=L(J),W=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,T=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;return R==Z||0==F.length?f(J,Z):W==T?d(J):Q(J,Z!=mxConstants.DIRECTION_NORTH&&Z!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(J){var Z=[J];!D(J)&&!m(J)||E(J)||u.traverse(J,!0,function(P,da){var ja=null!=da&&u.isTreeEdge(da);ja&&0>mxUtils.indexOf(Z,da)&&Z.push(da);(null==da||ja)&&0>mxUtils.indexOf(Z,P)&&Z.push(P);return null==
da||ja});return Z};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(D(this.state.cell)||m(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(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.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;z.hoverIcons.reset();mxEvent.consume(J)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){aa.apply(this,arguments);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 ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){ca.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var fa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(J,Z){fa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),D=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
-!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);p.insert(Q);p.insert(E);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=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};');
-E.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");Q.geometry.relative=!0;Q.edge=!0;
-E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);L.insertEdge(Q,!1);p.insert(Q);p.insert(E);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=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};');
+E.vertex=!0;var L=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};');L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");Q.geometry.relative=!0;Q.edge=!0;
+E.insertEdge(Q,!0);L.insertEdge(Q,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!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};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
x.geometry.relative=!0;x.edge=!0;E.insertEdge(x,!0);g.insertEdge(x,!1);var z=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};');z.vertex=!0;var u=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;E.insertEdge(u,!0);z.insertEdge(u,!1);p.insert(Q);p.insert(f);p.insert(x);p.insert(u);p.insert(E);p.insert(K);p.insert(d);p.insert(g);p.insert(z);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;E.insertEdge(u,!0);z.insertEdge(u,!1);p.insert(Q);p.insert(f);p.insert(x);p.insert(u);p.insert(E);p.insert(L);p.insert(d);p.insert(g);p.insert(z);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,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};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var E=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"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(Q);p.insert(f);p.insert(E);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
+p.vertex=!0;var E=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"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var L=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"};');
+L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);L.insertEdge(Q,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(Q);p.insert(f);p.insert(E);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");Q.geometry.setTerminalPoint(new mxPoint(110,-40),!0);Q.geometry.relative=
-!0;Q.edge=!0;K.insertEdge(Q,!1);return sb.createVertexTemplateFromCells([E,Q,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");Q.geometry.setTerminalPoint(new mxPoint(110,-40),!0);Q.geometry.relative=
+!0;Q.edge=!0;L.insertEdge(Q,!1);return sb.createVertexTemplateFromCells([E,Q,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(C,G){if(EditorUi.windowed){var V=C.editor.graph;V.popupMenuHandler.hideMenu();if(null==C.formatWindow){G="1"==urlParams.sketch?Math.max(10,C.diagramContainer.clientWidth-241):Math.max(10,C.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;V="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,V.container.clientHeight-10);C.formatWindow=new WrapperWindow(C,mxResources.get("format"),G,U,240,V,
function(Y){Y=C.createFormat(Y);Y.init();return Y});C.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.formatWindow.window.fit()}));C.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else C.formatWindow.window.setVisible(null!=G?G:!C.formatWindow.window.isVisible())}else null==C.formatElt&&(C.formatElt=C.createSidebarContainer(),C.createFormat(C.formatElt).init(),C.formatElt.style.border="none",C.formatElt.style.width="240px",C.formatElt.style.borderLeft="1px solid gray",
C.formatElt.style.right="0px"),V=C.diagramContainer.parentNode,null!=C.formatElt.parentNode?(C.formatElt.parentNode.removeChild(C.formatElt),V.style.right="0px"):(V.parentNode.appendChild(C.formatElt),V.style.right=C.formatElt.style.width)}function e(C,G){function V(qa,oa){var aa=C.menus.get(qa);qa=O.addMenu(oa,mxUtils.bind(this,function(){aa.funct.apply(this,arguments)}));qa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
@@ -3976,7 +3976,7 @@ mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;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";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var D=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");D.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",G.shortcut):E.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className=
+this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",G.shortcut):E.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className=
"geToolbarButton";C.innerText="";C.style.backgroundImage="url("+Editor.userImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";C.style.cssFloat="right";C.setAttribute("title",mxResources.get("changeUser"));if("none"!=C.style.display){C.style.display="inline-block";var G=this.getCurrentFile();if(null!=G&&G.isRealtimeEnabled()&&G.isRealtimeSupported()){var V=document.createElement("img");
V.setAttribute("border","0");V.style.position="absolute";V.style.left="18px";V.style.top="2px";V.style.width="12px";V.style.height="12px";var U=G.getRealtimeError();G=G.getRealtimeState();var Y=mxResources.get("realtimeCollaboration");1==G?(V.src=Editor.syncImage,Y+=" ("+mxResources.get("online")+")"):(V.src=Editor.syncProblemImage,Y=null!=U&&null!=U.message?Y+(" ("+U.message+")"):Y+(" ("+mxResources.get("disconnected")+")"));V.setAttribute("title",Y);C.style.paddingRight="4px";C.appendChild(V)}}}};
var Q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){Q.apply(this,arguments);if(null!=this.shareButton){var C=this.shareButton;C.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";C.className="geToolbarButton";C.innerText="";C.style.backgroundImage="url("+Editor.shareImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height=
@@ -4011,7 +4011,7 @@ Graph.translateDiagram&&C.menus.addMenuItems(ca,["diagramLanguage"],fa);C.mode!=
this.get("insert"),fa=ca.funct;ca.funct=function(J,Z){"1"==urlParams.sketch?(C.menus.addMenuItems(J,["toggleShapes"],Z),C.menus.addSubmenu("table",J,Z),J.addSeparator(Z),C.insertTemplateEnabled&&!C.isOffline()&&C.menus.addMenuItems(J,["insertTemplate"],Z),C.menus.addMenuItems(J,["insertImage","insertLink","-"],Z),C.menus.addSubmenu("insertAdvanced",J,Z,mxResources.get("advanced")),C.menus.addSubmenu("layout",J,Z)):(fa.apply(this,arguments),C.menus.addSubmenu("table",J,Z))}})();var oa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
aa=function(ca,fa,J,Z){ca.addItem(J,null,mxUtils.bind(this,function(){var P=new CreateGraphDialog(C,J,Z);C.showDialog(P.container,620,420,!0,!1);P.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(ca,fa){for(var J=0;J<oa.length;J++)"-"==oa[J]?ca.addSeparator(fa):aa(ca,fa,mxResources.get(oa[J])+"...",oa[J])})))};EditorUi.prototype.installFormatToolbar=function(C){var G=this.editor.graph,V=document.createElement("div");V.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
G.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,Y){0<G.getSelectionCount()?(C.appendChild(V),V.innerHTML="Selected: "+G.getSelectionCount()):null!=V.parentNode&&V.parentNode.removeChild(V)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width=
-"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(wa,
+"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(wa,
ua,La){var Oa=O.menus.get(wa),Ca=ca.addMenu(mxResources.get(wa),mxUtils.bind(this,function(){Oa.funct.apply(this,arguments)}),aa);Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.top="6px";Ca.style.marginRight="6px";Ca.style.height="30px";Ca.style.paddingTop="6px";Ca.style.paddingBottom="6px";Ca.style.cursor="pointer";Ca.setAttribute("title",mxResources.get(wa));O.menus.menuCreated(Oa,Ca,"geMenuItem");null!=
La?(Ca.style.backgroundImage="url("+La+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px",Ca.innerText=""):ua||(Ca.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ca.style.backgroundPosition="right 6px center",Ca.style.backgroundRepeat="no-repeat",Ca.style.paddingRight="22px");return Ca}function G(wa,ua,La,Oa,Ca,Ma){var Ga=document.createElement("a");Ga.className="1"==urlParams.sketch?"geToolbarButton":
"geMenuItem";Ga.style.display="inline-block";Ga.style.boxSizing="border-box";Ga.style.height="30px";Ga.style.padding="6px";Ga.style.position="relative";Ga.style.verticalAlign="top";Ga.style.top="0px";"1"==urlParams.sketch&&(Ga.style.borderStyle="none",Ga.style.boxShadow="none",Ga.style.padding="6px",Ga.style.margin="0px");null!=O.statusContainer?oa.insertBefore(Ga,O.statusContainer):oa.appendChild(Ga);null!=Ma?(Ga.style.backgroundImage="url("+Ma+")",Ga.style.backgroundPosition="center center",Ga.style.backgroundRepeat=
@@ -4022,7 +4022,7 @@ wa[Oa]&&("1"==urlParams.sketch&&(wa[Oa].style.padding="10px 8px",wa[Oa].style.wi
null,mxResources.get("format")+" ("+O.actions.get("formatPanel").shortcut+")",O.actions.get("image"),wa?Editor.formatImage:null)],wa?60:null);ua=C("insert",!0,wa?ja:null);V([ua,G(mxResources.get("delete"),O.actions.get("delete").funct,null,mxResources.get("delete"),O.actions.get("delete"),wa?Editor.trashImage:null)],wa?60:null);411<=m&&(V([Qa,Ta],60),520<=m&&V([X,640<=m?G("",Aa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Aa,Editor.zoomInImage):null,640<=m?G("",Ka.funct,!0,mxResources.get("zoomOut")+
" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=La&&(mxEvent.disableContextMenu(La),mxEvent.addGestureListeners(La,mxUtils.bind(this,function(Oa){(mxEvent.isShiftDown(Oa)||mxEvent.isAltDown(Oa)||mxEvent.isMetaDown(Oa)||mxEvent.isControlDown(Oa)||mxEvent.isPopupTrigger(Oa))&&O.appIconClicked(Oa)}),null,null));ua=O.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.sketch?(null==la&&(ua=ca.addMenu("",ua.funct),ua.setAttribute("title",
mxResources.get("language")),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="24px 24px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="1"==urlParams.embed?"12px":"11px",oa.appendChild(ua),la=ua),O.buttonContainer.style.paddingRight="34px"):(O.buttonContainer.style.paddingRight=
-"4px",null!=la&&(la.parentNode.removeChild(la),la=null))}L.apply(this,arguments);var Y=document.createElement("div");Y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";Y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
+"4px",null!=la&&(la.parentNode.removeChild(la),la=null))}K.apply(this,arguments);var Y=document.createElement("div");Y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";Y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var O=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==O.embedViewport)mxUtils.fit(this.div);
else{var wa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),La=O.embedViewport.x+O.embedViewport.width,Oa=parseInt(this.div.offsetTop),Ca=parseInt(this.div.offsetHeight),Ma=O.embedViewport.y+O.embedViewport.height;this.div.style.left=Math.max(O.embedViewport.x,Math.min(wa,La-ua))+"px";this.div.style.top=Math.max(O.embedViewport.y,Math.min(Oa,Ma-Ca))+"px";this.div.style.height=Math.min(O.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(O.embedViewport.width,
parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),Y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Y)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));O=this;var qa=O.editor.graph;
@@ -4075,15 +4075,15 @@ GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.au
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,L=this.view.translate;E.setAttribute("viewBox",H.x+L.x-this.panDx+" "+(H.y+L.y-this.panDy)+
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,K=this.view.translate;E.setAttribute("viewBox",H.x+K.x-this.panDx+" "+(H.y+K.y-this.panDy)+
" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var Q=this.xmlNode.getElementsByTagName("diagram");if(0<
-Q.length){if(null!=this.pageId)for(var d=0;d<Q.length;d++)if(this.pageId==Q[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var L=Q[K.currentPage];return"page"==H?L.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?Q.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var L=0<=H;L&&this.selectPage(H);return L};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var L=H.src,
-C=L.indexOf(",");0<C&&(C=K.getIndexById(L.substring(C+1)),0<=C&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[C])),H.originalSrc=L))}x.apply(this,arguments)};var z=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var L=z.apply(this,arguments);H=this.backgroundImage;if(null!=H){var C=this.view.translate,G=this.view.scale;L=mxRectangle.fromRectangle(L);L.add(new mxRectangle((C.x+H.x)*G,(C.y+H.y)*G,H.width*G,H.height*G))}return L};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(H){return L.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var Q=this.xmlNode.getElementsByTagName("diagram");if(0<
+Q.length){if(null!=this.pageId)for(var d=0;d<Q.length;d++)if(this.pageId==Q[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(H){var K=Q[L.currentPage];return"page"==H?K.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==H?L.currentPage+1:"pagecount"==H?Q.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var K=0<=H;K&&this.selectPage(H);return K};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var K=H.src,
+C=K.indexOf(",");0<C&&(C=L.getIndexById(K.substring(C+1)),0<=C&&(H=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[C])),H.originalSrc=K))}x.apply(this,arguments)};var z=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var K=z.apply(this,arguments);H=this.backgroundImage;if(null!=H){var C=this.view.translate,G=this.view.scale;K=mxRectangle.fromRectangle(K);K.add(new mxRectangle((C.x+H.x)*G,(C.y+H.y)*G,H.width*G,H.height*G))}return K};this.addListener("xmlNodeChanged",d);d();
+urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.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.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var L=H.indexOf(",");K.selectPageById(H.substring(L+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var K=H.indexOf(",");L.selectPageById(H.substring(K+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var D=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(D,{attributes:!0})}else m()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
@@ -4092,33 +4092,33 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var D=0;D<m.getChildCount(m.root);D++){var p=m.getChildAt(m.root,D);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[D]:!0)}}finally{m.endUpdate()}}return e?null:k};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body);
-Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};K={left:K.left-Q.left,top:K.top-Q.top,bottom:K.bottom-Q.top,right:K.right-Q.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var Q=b.offsetWidth;Q==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body);
+Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};L={left:L.left-Q.left,top:L.top-Q.top,bottom:L.bottom-Q.top,right:L.right-Q.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var Q=b.offsetWidth;Q==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},D=Q,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=D=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var E=mxUtils.bind(this,function(K){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty||
-null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(K){e=this.graph.getGraphBounds();D=null;E(K)}};
+m);var E=mxUtils.bind(this,function(L){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
+null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(L){e=this.graph.getGraphBounds();D=null;E(L)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,D=null!=m&&0<m.length,p=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(D)for(var K=0;K<m.length;K++){var Q=b.getCell(m[K]);null!=Q&&(e=!0,p[Q.id]=!0)}else for(K=0;K<k.length;K++)Q=b.getChildAt(b.root,parseInt(k[K])),null!=Q&&(e=!0,p[Q.id]=!0);for(K=0;e&&
-K<E;K++)Q=b.getChildAt(b.root,K),b.setVisible(Q,p[Q.id]||!1)}else for(K=0;K<E;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,D=null!=m&&0<m.length,p=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(D)for(var L=0;L<m.length;L++){var Q=b.getCell(m[L]);null!=Q&&(e=!0,p[Q.id]=!0)}else for(L=0;L<k.length;L++)Q=b.getChildAt(b.root,parseInt(k[L])),null!=Q&&(e=!0,p[Q.id]=!0);for(L=0;e&&
+L<E;L++)Q=b.getChildAt(b.root,L),b.setVisible(Q,p[Q.id]||!1)}else for(L=0;L<E;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){function b(oa,aa,ca,fa){var J=document.createElement("div");J.style.borderRight="1px solid #d0d0d0";J.style.padding="3px 6px 3px 6px";mxEvent.addListener(J,"click",oa);null!=ca&&J.setAttribute("title",ca);J.style.display="inline-block";oa=document.createElement("img");oa.setAttribute("border","0");oa.setAttribute("src",aa);oa.style.width="18px";null==fa||fa?(mxEvent.addListener(J,"mouseenter",function(){J.style.backgroundColor="#ddd"}),mxEvent.addListener(J,
"mouseleave",function(){J.style.backgroundColor="#eee"}),mxUtils.setOpacity(oa,60),J.style.cursor="pointer"):mxUtils.setOpacity(J,30);J.appendChild(oa);k.appendChild(J);f++;return J}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var m=null,D=null,p=mxUtils.bind(this,function(oa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);m=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),oa||200)}),E=mxUtils.bind(this,function(oa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(E(30),p())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(oa){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(oa){E(100);mxEvent.consume(oa)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||E(30)}));var K=this.graph,Q=K.getTolerance();K.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,aa){this.startX=aa.getGraphX();
-this.startY=aa.getGraphY();this.scrollLeft=K.container.scrollLeft;this.scrollTop=K.container.scrollTop},mouseMove:function(oa,aa){},mouseUp:function(oa,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-K.container.scrollLeft)<Q&&Math.abs(this.scrollTop-K.container.scrollTop)<Q&&Math.abs(this.startX-aa.getGraphX())<Q&&Math.abs(this.startY-aa.getGraphY())<Q&&(0<parseFloat(k.style.opacity||0)?p():E(30))}})}for(var d=this.toolbarItems,f=0,g=null,x=null,z=null,u=null,H=0;H<d.length;H++){var L=
-d[H];if("pages"==L){u=e.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";k.appendChild(u);var G=
-b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";L=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",L);L()}else if("zoom"==L)this.zoomEnabled&&(b(mxUtils.bind(this,
-function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==L){if(this.layersEnabled){var V=this.graph.getModel(),
+mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(oa){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(oa){E(100);mxEvent.consume(oa)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||E(30)}));var L=this.graph,Q=L.getTolerance();L.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,aa){this.startX=aa.getGraphX();
+this.startY=aa.getGraphY();this.scrollLeft=L.container.scrollLeft;this.scrollTop=L.container.scrollTop},mouseMove:function(oa,aa){},mouseUp:function(oa,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-L.container.scrollLeft)<Q&&Math.abs(this.scrollTop-L.container.scrollTop)<Q&&Math.abs(this.startX-aa.getGraphX())<Q&&Math.abs(this.startY-aa.getGraphY())<Q&&(0<parseFloat(k.style.opacity||0)?p():E(30))}})}for(var d=this.toolbarItems,f=0,g=null,x=null,z=null,u=null,H=0;H<d.length;H++){var K=
+d[H];if("pages"==K){u=e.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";k.appendChild(u);var G=
+b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";K=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",K);K()}else if("zoom"==K)this.zoomEnabled&&(b(mxUtils.bind(this,
+function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==K){if(this.layersEnabled){var V=this.graph.getModel(),
U=b(mxUtils.bind(this,function(oa){if(null!=g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ca=this.graph.getGraphBounds(),fa=this.graph.view;0>ca.x||0>ca.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:fa.translate.clone(),scale:fa.scale}):null!=this.graph.originalViewState&&0<ca.x/fa.scale+this.graph.originalViewState.translate.x-
fa.translate.x&&0<ca.y/fa.scale+this.graph.originalViewState.translate.y-fa.translate.y&&(fa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:fa.translate.clone(),scale:fa.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=U.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";
g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var aa=mxUtils.getDocumentScrollOrigin(document);g.style.left=aa.x+oa.left-1+"px";g.style.top=aa.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");V.addListener(mxEvent.CHANGE,function(){U.style.display=
-1<V.getChildCount(V.root)?"inline-block":"none"});U.style.display=1<V.getChildCount(V.root)?"inline-block":"none"}}else if("tags"==L){if(this.tagsEnabled){var Y=b(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=
+1<V.getChildCount(V.root)?"inline-block":"none"});U.style.display=1<V.getChildCount(V.root)?"inline-block":"none"}}else if("tags"==K){if(this.tagsEnabled){var Y=b(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=
Editor.defaultHtmlFont,x.div.style.fontSize="11px",x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=z)z.parentNode.removeChild(z),z=null;else{z=x.div;mxEvent.addListener(z,"mouseleave",function(){z.parentNode.removeChild(z);z=null});oa=Y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);z.style.left=aa.x+oa.left-1+"px";z.style.top=aa.y+oa.bottom-2+
-"px";document.body.appendChild(z);x.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");V.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==L?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
-(L=this.graphConfig["toolbar-buttons"][L],null!=L&&(L.elem=b(null==L.enabled||L.enabled?L.handler:function(){},L.image,L.title,L.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=e.ownerDocument.createElement("div"),d.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",d.setAttribute("title",this.graphConfig.title),
+"px";document.body.appendChild(z);x.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");V.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==K?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+(K=this.graphConfig["toolbar-buttons"][K],null!=K&&(K.elem=b(null==K.enabled||K.enabled?K.handler:function(){},K.image,K.title,K.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=e.ownerDocument.createElement("div"),d.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",d.setAttribute("title",this.graphConfig.title),
mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,70),k.appendChild(d),this.filename=d);this.minToolbarWidth=34*f;var O=e.style.border,qa=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=e.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():
{left:-aa.x,top:-aa.y};oa={left:oa.left-aa.left,top:oa.top-aa.top,bottom:oa.bottom-aa.top,right:oa.right-aa.left};k.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=oa.top+1+"px"):k.style.top=oa.top+"px";"1px solid transparent"==O&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ca=mxUtils.bind(this,function(){null!=k.parentNode&&
k.parentNode.removeChild(k);null!=g&&(g.parentNode.removeChild(g),g=null);e.style.border=O});mxEvent.addListener(document,"mousemove",function(fa){for(fa=mxEvent.getSource(fa);null!=fa;){if(fa==e||fa==k||fa==g)return;fa=fa.parentNode}ca()});mxEvent.addListener(document.body,"mouseleave",function(fa){ca()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&
@@ -4131,10 +4131,10 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){m.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";this.tagsEnabled&&(urlParams.tags="{}");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 k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var D=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,E=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var K=m.editor.graph,Q=K.container;Q.style.overflow="hidden";this.lightboxChrome?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",D)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(Q.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){Q.style.outline="none";Q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(Q);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+m.refresh=function(){};var D=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,E=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var L=m.editor.graph,Q=L.container;Q.style.overflow="hidden";this.lightboxChrome?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(Q.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){Q.style.outline="none";Q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(Q);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
+"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var D=m[k].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&e.push(m[k]))}return e};
@@ -4143,8 +4143,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function D(){this.q=[];this.add=function(z){this.q.push(z)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function E(g,x){if(!g.resizedAttached)g.resizedAttached=
new D,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.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>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var z=g.resizeSensor.childNodes[0],u=z.childNodes[0],H=g.resizeSensor.childNodes[1],L=function(){u.style.width="100000px";u.style.height="100000px";z.scrollLeft=1E5;z.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};L();var C=!1,G=function(){g.resizedAttached&&(C&&(g.resizedAttached.call(),C=!1),b(G))};b(G);var V,U,Y,O;x=function(){if((Y=g.offsetWidth)!=V||(O=g.offsetHeight)!=U)C=!0,V=Y,U=O;L()};var qa=function(oa,
-aa,ca){oa.attachEvent?oa.attachEvent("on"+aa,ca):oa.addEventListener(aa,ca)};qa(z,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},Q=Object.prototype.toString.call(k),d="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){Q=0;for(var f=k.length;Q<f;Q++)E(k[Q],K)}else E(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
+g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var z=g.resizeSensor.childNodes[0],u=z.childNodes[0],H=g.resizeSensor.childNodes[1],K=function(){u.style.width="100000px";u.style.height="100000px";z.scrollLeft=1E5;z.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};K();var C=!1,G=function(){g.resizedAttached&&(C&&(g.resizedAttached.call(),C=!1),b(G))};b(G);var V,U,Y,O;x=function(){if((Y=g.offsetWidth)!=V||(O=g.offsetHeight)!=U)C=!0,V=Y,U=O;K()};var qa=function(oa,
+aa,ca){oa.attachEvent?oa.attachEvent("on"+aa,ca):oa.addEventListener(aa,ca)};qa(z,"scroll",x);qa(H,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},Q=Object.prototype.toString.call(k),d="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){Q=0;for(var f=k.length;Q<f;Q++)E(k[Q],L)}else E(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index d91a5b09..f9690fcb 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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:"undefined"!==typeof InstallTrigger,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||"[object SVGForeignObjectElement]"!==
@@ -2008,90 +2008,90 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(m,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,D){m=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<m.length){b.getModel();D=[];for(var p=0;p<m.length;p++)null!=
b.view.getState(m[p])&&D.push(m[p]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,D,p,E,K,Q,d,f){var g=Q?57:0,x=k,z=m,u=Q?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var L=H.height,C=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((L-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,L-u);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=L+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";C+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-G+=b.embedViewport.y,C+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var V=b.createDiv(Q?"geTransDialog":"geDialog");D=this.getPosition(C,G,k,m);C=D.x;G=D.y;V.style.width=k+"px";V.style.height=m+"px";V.style.left=C+"px";V.style.top=G+"px";V.style.zIndex=this.zIndex;V.appendChild(e);document.body.appendChild(V);!K&&e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+function Dialog(b,e,k,m,D,p,E,L,Q,d,f){var g=Q?57:0,x=k,z=m,u=Q?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var K=H.height,C=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((K-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,K-u);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=K+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";C+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+G+=b.embedViewport.y,C+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var V=b.createDiv(Q?"geTransDialog":"geDialog");D=this.getPosition(C,G,k,m);C=D.x;G=D.y;V.style.width=k+"px";V.style.height=m+"px";V.style.left=C+"px";V.style.top=G+"px";V.style.zIndex=this.zIndex;V.appendChild(e);document.body.appendChild(V);!L&&e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=C+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var U=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Y){U=!0}),null,mxUtils.bind(this,function(Y){U&&(b.hideDialog(!0),U=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Y=d();
-null!=Y&&(x=k=Y.w,z=m=Y.h)}Y=mxUtils.getDocumentSize();L=Y.height;this.bg.style.height=L+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((Y.width-k-u)/2));G=Math.max(1,Math.round((L-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(z,L-u);Y=this.getPosition(C,G,k,m);C=Y.x;G=Y.y;V.style.left=C+"px";V.style.top=G+"px";V.style.width=k+"px";V.style.height=m+"px";!K&&
+null!=Y&&(x=k=Y.w,z=m=Y.h)}Y=mxUtils.getDocumentSize();K=Y.height;this.bg.style.height=K+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((Y.width-k-u)/2));G=Math.max(1,Math.round((K-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(z,K-u);Y=this.getPosition(C,G,k,m);C=Y.x;G=Y.y;V.style.left=C+"px";V.style.top=G+"px";V.style.width=k+"px";V.style.height=m+"px";!L&&
e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=C+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=V;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,D,p,E,K,Q,d,f){Q=null!=Q?Q:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
+var ErrorDialog=function(b,e,k,m,D,p,E,L,Q,d,f){Q=null!=Q?Q:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var z=mxUtils.button(m,function(){Q&&b.hideDialog();null!=D&&D()});
-z.className="geBtn";k.appendChild(z);null!=E&&(m=mxUtils.button(E,function(){Q&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){z.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(z){var u=E.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var L=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(u){var G=E.checked?1:parseInt(f.value);isNaN(G)||(C=mxUtils.getScaleForPageCount(G,k,L))}k.getGraphBounds();var V=G=0;L=mxRectangle.fromRectangle(L);L.width=Math.ceil(L.width*H);L.height=Math.ceil(L.height*H);C*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*L.width,V-=H.y*L.height):
-u=!0;u=PrintDialog.createPrintPreview(k,C,L,0,G,V,u);u.open();z&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(E);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage"));
-K.appendChild(Q);mxEvent.addListener(Q,"click",function(z){E.checked=!E.checked;d.checked=!E.checked;mxEvent.consume(z)});mxEvent.addListener(E,"change",function(){d.checked=!E.checked});p.appendChild(K);D.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");K.appendChild(Q);mxEvent.addListener(Q,
-"click",function(z){d.checked=!d.checked;E.checked=!d.checked;mxEvent.consume(z)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);D.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");E.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);D.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
-K.style.paddingTop="20px";K.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&K.appendChild(Q);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst||
-K.appendChild(Q);p.appendChild(K);D.appendChild(p);m.appendChild(D);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,D,p,E){e=new mxPrintPreview(b,e,k,m,D,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(Q){K.apply(this,arguments);Q.writeln('<style type="text/css">');Q.writeln("@media screen {");Q.writeln(" body > div { padding:30px;box-sizing:content-box; }");Q.writeln("}");Q.writeln("</style>")};return e};
+z.className="geBtn";k.appendChild(z);null!=E&&(m=mxUtils.button(E,function(){Q&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){z.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(z){var u=E.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var K=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(u){var G=E.checked?1:parseInt(f.value);isNaN(G)||(C=mxUtils.getScaleForPageCount(G,k,K))}k.getGraphBounds();var V=G=0;K=mxRectangle.fromRectangle(K);K.width=Math.ceil(K.width*H);K.height=Math.ceil(K.height*H);C*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*K.width,V-=H.y*K.height):
+u=!0;u=PrintDialog.createPrintPreview(k,C,K,0,G,V,u);u.open();z&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(E);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage"));
+L.appendChild(Q);mxEvent.addListener(Q,"click",function(z){E.checked=!E.checked;d.checked=!E.checked;mxEvent.consume(z)});mxEvent.addListener(E,"change",function(){d.checked=!E.checked});p.appendChild(L);D.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");L.appendChild(Q);mxEvent.addListener(Q,
+"click",function(z){d.checked=!d.checked;E.checked=!d.checked;mxEvent.consume(z)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);D.appendChild(p);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");E.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);D.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
+L.style.paddingTop="20px";L.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&L.appendChild(Q);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
+L.appendChild(Q);p.appendChild(L);D.appendChild(p);m.appendChild(D);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,m,D,p,E){e=new mxPrintPreview(b,e,k,m,D,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(Q){L.apply(this,arguments);Q.writeln('<style type="text/css">');Q.writeln("@media screen {");Q.writeln(" body > div { padding:30px;box-sizing:content-box; }");Q.writeln("}");Q.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var L=u;null!=L&&Graph.isPageLink(L.src)&&(L=b.createImageForPageLink(L.src,null));null!=L&&null!=L.src?(z.setAttribute("src",L.src),z.style.display=""):(z.removeAttribute("src"),z.style.display="none")}var m=b.editor.graph,D=document.createElement("table");D.style.width=
-"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");E.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var Q=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td");
-mxUtils.write(K,mxResources.get("background")+":");E.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(L){b.pickColor(f||"none",function(C){f=C;e()});mxEvent.consume(L)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var L=parseInt(g.value);g.value=Math.max(1,isNaN(L)?m.getGridSize():L)});E.appendChild(K);p.appendChild(E);E=document.createElement("tr");
-K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");E.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var z=document.createElement("img");z.setAttribute("valign","middle");z.style.verticalAlign="middle";z.style.border="1px solid lightGray";z.style.borderRadius="4px";z.style.marginRight="14px";z.style.maxWidth="100px";z.style.cursor="pointer";z.style.height=
-"60px";z.style.padding="4px";var u=m.backgroundImage,H=function(L){b.showBackgroundImageDialog(function(C,G){G||(u=C,k())},u);mxEvent.consume(L)};mxEvent.addListener(x,"click",H);mxEvent.addListener(z,"click",H);k();K.appendChild(z);K.appendChild(x);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var L=parseInt(g.value);isNaN(L)||m.gridSize===L||m.setGridSize(L);L=new ChangePageSetup(b,f,u,Q.get());L.ignoreColor=m.background==f;L.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==L.previousFormat.width&&m.pageFormat.height==L.previousFormat.height&&L.ignoreColor&&L.ignoreImage||m.model.execute(L)});H.className="geBtn gePrimaryBtn";
-K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);E.appendChild(K);p.appendChild(E);D.appendChild(p);this.container=D};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function D(Y,O,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Y=!1;for(O=0;O<u.length;O++)qa=u[O],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,Y=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,Y=E.checked=!0));Y?(Q.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),K.value="custom",Q.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px";
+var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var K=u;null!=K&&Graph.isPageLink(K.src)&&(K=b.createImageForPageLink(K.src,null));null!=K&&null!=K.src?(z.setAttribute("src",K.src),z.style.display=""):(z.removeAttribute("src"),z.style.display="none")}var m=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");E.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var Q=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);E.appendChild(L);p.appendChild(E);E=document.createElement("tr");L=document.createElement("td");
+mxUtils.write(L,mxResources.get("background")+":");E.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
+"click",function(K){b.pickColor(f||"none",function(C){f=C;e()});mxEvent.consume(K)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var K=parseInt(g.value);g.value=Math.max(1,isNaN(K)?m.getGridSize():K)});E.appendChild(L);p.appendChild(E);E=document.createElement("tr");
+L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");E.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var z=document.createElement("img");z.setAttribute("valign","middle");z.style.verticalAlign="middle";z.style.border="1px solid lightGray";z.style.borderRadius="4px";z.style.marginRight="14px";z.style.maxWidth="100px";z.style.cursor="pointer";z.style.height=
+"60px";z.style.padding="4px";var u=m.backgroundImage,H=function(K){b.showBackgroundImageDialog(function(C,G){G||(u=C,k())},u);mxEvent.consume(K)};mxEvent.addListener(x,"click",H);mxEvent.addListener(z,"click",H);k();L.appendChild(z);L.appendChild(x);E.appendChild(L);p.appendChild(E);E=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
+b.editor.cancelFirst&&L.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var K=parseInt(g.value);isNaN(K)||m.gridSize===K||m.setGridSize(K);K=new ChangePageSetup(b,f,u,Q.get());K.ignoreColor=m.background==f;K.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==K.previousFormat.width&&m.pageFormat.height==K.previousFormat.height&&K.ignoreColor&&K.ignoreImage||m.model.execute(K)});H.className="geBtn gePrimaryBtn";
+L.appendChild(H);b.editor.cancelFirst||L.appendChild(x);E.appendChild(L);p.appendChild(E);D.appendChild(p);this.container=D};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function D(Y,O,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Y=!1;for(O=0;O<u.length;O++)qa=u[O],G?"custom"==qa.key&&(L.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
+qa.format.width&&k.height==qa.format.height?(L.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,Y=!0):k.width==qa.format.height&&k.height==qa.format.width&&(L.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,Y=E.checked=!0));Y?(Q.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
+"checked"),L.value="custom",Q.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
var Q=document.createElement("div");Q.style.marginLeft="4px";Q.style.width="210px";Q.style.height="24px";p.style.marginRight="6px";Q.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));Q.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";Q.appendChild(E);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));Q.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");Q.style.display="none";f.style.display="none";for(var z={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var L=u[H];z[L.key]=L;var C=document.createElement("option");C.setAttribute("value",
-L.key);mxUtils.write(C,L.title);K.appendChild(C)}var G=!1;D();b.appendChild(K);mxUtils.br(b);b.appendChild(Q);b.appendChild(f);var V=k,U=function(Y,O){Y=z[K.value];null!=Y.format?(g.value=Y.format.width/100,x.value=Y.format.height/100,f.style.display="none",Q.style.display=""):(Q.style.display="none",f.style.display="");Y=parseFloat(g.value);if(isNaN(Y)||0>=Y)g.value=k.width/100;Y=parseFloat(x.value);if(isNaN(Y)||0>=Y)x.value=k.height/100;Y=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&E.checked&&(Y=new mxRectangle(0,0,Y.height,Y.width));O&&G||Y.width==V.width&&Y.height==V.height||(V=Y,null!=m&&m(V))};mxEvent.addListener(e,"click",function(Y){p.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(d,"click",function(Y){E.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(g,"blur",U);mxEvent.addListener(g,"click",U);mxEvent.addListener(x,"blur",U);mxEvent.addListener(x,"click",U);mxEvent.addListener(E,"change",U);mxEvent.addListener(p,
-"change",U);mxEvent.addListener(K,"change",function(Y){G="custom"==K.value;U(Y,!0)});U();return{set:function(Y){k=Y;D(null,null,!0)},get:function(){return V},widthInput:g,heightInput:x}};
+"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");Q.style.display="none";f.style.display="none";for(var z={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var K=u[H];z[K.key]=K;var C=document.createElement("option");C.setAttribute("value",
+K.key);mxUtils.write(C,K.title);L.appendChild(C)}var G=!1;D();b.appendChild(L);mxUtils.br(b);b.appendChild(Q);b.appendChild(f);var V=k,U=function(Y,O){Y=z[L.value];null!=Y.format?(g.value=Y.format.width/100,x.value=Y.format.height/100,f.style.display="none",Q.style.display=""):(Q.style.display="none",f.style.display="");Y=parseFloat(g.value);if(isNaN(Y)||0>=Y)g.value=k.width/100;Y=parseFloat(x.value);if(isNaN(Y)||0>=Y)x.value=k.height/100;Y=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
+Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&E.checked&&(Y=new mxRectangle(0,0,Y.height,Y.width));O&&G||Y.width==V.width&&Y.height==V.height||(V=Y,null!=m&&m(V))};mxEvent.addListener(e,"click",function(Y){p.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(d,"click",function(Y){E.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(g,"blur",U);mxEvent.addListener(g,"click",U);mxEvent.addListener(x,"blur",U);mxEvent.addListener(x,"click",U);mxEvent.addListener(E,"change",U);mxEvent.addListener(p,
+"change",U);mxEvent.addListener(L,"change",function(Y){G="custom"==L.value;U(Y,!0)});U();return{set:function(Y){k=Y;D(null,null,!0)},get:function(){return V},widthInput:g,heightInput:x}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,D,p,E,K,Q,d,f,g,x){Q=null!=Q?Q:!0;var z=document.createElement("table"),u=document.createElement("tbody");z.style.position="absolute";z.style.top="30px";z.style.left="20px";var H=document.createElement("tr");var L=document.createElement("td");L.style.textOverflow="ellipsis";L.style.textAlign="right";L.style.maxWidth=(x?x+15:100)+"px";L.style.fontSize="10pt";L.style.width=(x?x:84)+"px";mxUtils.write(L,(D||mxResources.get("filename"))+":");H.appendChild(L);var C=
+var FilenameDialog=function(b,e,k,m,D,p,E,L,Q,d,f,g,x){Q=null!=Q?Q:!0;var z=document.createElement("table"),u=document.createElement("tbody");z.style.position="absolute";z.style.top="30px";z.style.left="20px";var H=document.createElement("tr");var K=document.createElement("td");K.style.textOverflow="ellipsis";K.style.textAlign="right";K.style.maxWidth=(x?x+15:100)+"px";K.style.fontSize="10pt";K.style.width=(x?x:84)+"px";mxUtils.write(K,(D||mxResources.get("filename"))+":");H.appendChild(K);var C=
document.createElement("input");C.setAttribute("value",e||"");C.style.marginLeft="4px";C.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(C.value))Q&&b.hideDialog(),m(C.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var V=z.parentNode;if(null!=V){var U=null;mxEvent.addListener(V,"dragleave",
function(Y){null!=U&&(U.style.backgroundColor="",U=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=C,U.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=U&&(U.style.backgroundColor="",U=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")),
-G.click());Y.stopPropagation();Y.preventDefault()}))}}};L=document.createElement("td");L.style.whiteSpace="nowrap";L.appendChild(C);H.appendChild(L);if(null!=D||null==E)u.appendChild(H),null!=f&&(L.appendChild(FilenameDialog.createTypeHint(b,C,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),L=document.createElement("td"),L.style.textOverflow="ellipsis",L.style.textAlign="right",L.style.maxWidth="100px",L.style.fontSize="10pt",L.style.width="84px",mxUtils.write(L,mxResources.get("type")+
-":"),H.appendChild(L),L=document.createElement("td"),L.style.whiteSpace="nowrap",H.appendChild(L),e=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",L.appendChild(e),C.style.width=null!=g?g-40+"px":"190px",H.appendChild(L),u.appendChild(H)));null!=E&&(H=document.createElement("tr"),L=document.createElement("td"),L.colSpan=2,L.appendChild(E),H.appendChild(L),u.appendChild(H));H=document.createElement("tr");L=document.createElement("td");L.colSpan=
-2;L.style.paddingTop=null!=f?"12px":"20px";L.style.whiteSpace="nowrap";L.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&L.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",L.appendChild(g));mxEvent.addListener(C,"keypress",function(V){13==V.keyCode&&G.click()});L.appendChild(G);b.editor.cancelFirst||L.appendChild(f);
-H.appendChild(L);u.appendChild(H);z.appendChild(u);this.container=z};FilenameDialog.filenameHelpLink=null;
+G.click());Y.stopPropagation();Y.preventDefault()}))}}};K=document.createElement("td");K.style.whiteSpace="nowrap";K.appendChild(C);H.appendChild(K);if(null!=D||null==E)u.appendChild(H),null!=f&&(K.appendChild(FilenameDialog.createTypeHint(b,C,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),K=document.createElement("td"),K.style.textOverflow="ellipsis",K.style.textAlign="right",K.style.maxWidth="100px",K.style.fontSize="10pt",K.style.width="84px",mxUtils.write(K,mxResources.get("type")+
+":"),H.appendChild(K),K=document.createElement("td"),K.style.whiteSpace="nowrap",H.appendChild(K),e=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",K.appendChild(e),C.style.width=null!=g?g-40+"px":"190px",H.appendChild(K),u.appendChild(H)));null!=E&&(H=document.createElement("tr"),K=document.createElement("td"),K.colSpan=2,K.appendChild(E),H.appendChild(K),u.appendChild(H));H=document.createElement("tr");K=document.createElement("td");K.colSpan=
+2;K.style.paddingTop=null!=f?"12px":"20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&K.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",K.appendChild(g));mxEvent.addListener(C,"keypress",function(V){13==V.keyCode&&G.click()});K.appendChild(G);b.editor.cancelFirst||K.appendChild(f);
+H.appendChild(K);u.appendChild(H);z.appendChild(u);this.container=z};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var D=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(m,"click",function(p){var E=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
D();return m};
FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(D)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,K=0;K<k.length;K++){var Q=k[K].extension,d=null;"drawio"!=Q&&(d=Q,Q=".drawio."+Q);if(p.substring(p.length-Q.length-1)=="."+Q||null!=d&&p.substring(p.length-d.length-1)=="."+d){E=K;break}}m.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,D,p,E){var K=b.createSidebarContainer();E(K);this.window=new mxWindow(e,K,k,m,D,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&b.isSelectionAllowed(Q)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=E.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,L=0;L<k.length;L++){var Q=k[L].extension,d=null;"drawio"!=Q&&(d=Q,Q=".drawio."+Q);if(p.substring(p.length-Q.length-1)=="."+Q||null!=d&&p.substring(p.length-d.length-1)=="."+d){E=L;break}}m.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+var WrapperWindow=function(b,e,k,m,D,p,E){var L=b.createSidebarContainer();E(L);this.window=new mxWindow(e,L,k,m,D,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&b.isSelectionAllowed(Q)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=E.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),Q.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,Q),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){E.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(d)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,K=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,Q=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(E.isGridEnabled()||E.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(Q))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=E.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=Q=0;null!=E.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),Q=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-Q,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}Q=E.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=f,E.view.backgroundPageShape.node.style.backgroundImage=d,E.view.backgroundPageShape.node.style.backgroundColor=K,E.view.backgroundPageShape.node.style.borderColor=
-E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",Q.style.backgroundImage="none",Q.style.backgroundColor=""):(E.container.className="geDiagramContainer",Q.style.backgroundPosition=f,Q.style.backgroundColor=K,Q.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(E){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var Q=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+Q+" "+g+" M "+g+" 0 L "+g+
-" "+Q)}return'<svg width="'+Q+'" height="'+Q+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+Q+'" height="'+Q+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+Q+" 0 L 0 0 0 "+Q+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+E,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";Q.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,z=this.view.getBackgroundPageBounds();
-K=z.width;Q=z.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(E=E&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(Q/u.height)-1:0,L=E?Math.ceil(K/u.width)-1:0,C=z.x+K,G=z.y+Q;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<L&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(V){if(null!=V){for(var U=V==this.horizontalPageBreaks?H:L,Y=0;Y<=U;Y++){var O=V==this.horizontalPageBreaks?[new mxPoint(Math.round(z.x),
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(d)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,L=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,Q=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(E.isGridEnabled()||E.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(Q))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=E.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
+")";var g=Q=0;null!=E.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),Q=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-Q,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}Q=E.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=f,E.view.backgroundPageShape.node.style.backgroundImage=d,E.view.backgroundPageShape.node.style.backgroundColor=L,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",Q.style.backgroundImage="none",Q.style.backgroundColor=""):(E.container.className="geDiagramContainer",Q.style.backgroundPosition=f,Q.style.backgroundColor=L,Q.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(E){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var Q=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+Q+" "+g+" M "+g+" 0 L "+g+
+" "+Q)}return'<svg width="'+Q+'" height="'+Q+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+Q+'" height="'+Q+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+Q+" 0 L 0 0 0 "+Q+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,L){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+E,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";Q.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(E,L,Q){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,z=this.view.getBackgroundPageBounds();
+L=z.width;Q=z.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(E=E&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(Q/u.height)-1:0,K=E?Math.ceil(L/u.width)-1:0,C=z.x+L,G=z.y+Q;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<K&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(V){if(null!=V){for(var U=V==this.horizontalPageBreaks?H:K,Y=0;Y<=U;Y++){var O=V==this.horizontalPageBreaks?[new mxPoint(Math.round(z.x),
Math.round(z.y+(Y+1)*u.height)),new mxPoint(Math.round(C),Math.round(z.y+(Y+1)*u.height))]:[new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(z.y)),new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(G))];null!=V[Y]?(V[Y].points=O,V[Y].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),V[Y]=O)}for(Y=U;Y<V.length;Y++)V[Y].destroy();V.splice(U,V.length-U)}});E(this.horizontalPageBreaks);
-E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,Q){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
-k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,Q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,Q=0<E.height?E.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,Q)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,Q+E.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,Q,d,f,g){var x=D.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(z){mxEvent.consume(z)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(E,K,Q){var d=this.graph.model.getParent(E);if(K){var f=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(E)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(E))}else if(f=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(Q.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),Q=K.getParent(E),d=this.graph.view.getState(Q),f=this.graph.isCellSelected(E);null!=d&&(K.isVertex(Q)||K.isEdge(Q));){var g=this.graph.isCellSelected(Q);f=f||g;if(g||!f&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=Q;Q=K.getParent(Q)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var D=m.getGraphBounds;m.getGraphBounds=function(){var P=D.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ja=this.view.translate,ka=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((ja.x+da.x)*ka,(ja.y+da.y)*ka,da.width*ka,da.height*ka))}return P};m.useCssTransforms&&
+E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,L,Q){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
+k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(L,Q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),L=0<E.width?E.x/this.scale-this.translate.x:0,Q=0<E.height?E.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
+f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,Q)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+E.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,Q+E.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,L,Q,d,f,g){var x=D.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(z){mxEvent.consume(z)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(E,L,Q){var d=this.graph.model.getParent(E);if(L){var f=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(E)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(E))}else if(f=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(Q.getEvent())||
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var L=this.graph.getModel(),Q=L.getParent(E),d=this.graph.view.getState(Q),f=this.graph.isCellSelected(E);null!=d&&(L.isVertex(Q)||L.isEdge(Q));){var g=this.graph.isCellSelected(Q);f=f||g;if(g||!f&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=Q;Q=L.getParent(Q)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var D=m.getGraphBounds;m.getGraphBounds=function(){var P=D.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ja=this.view.translate,ka=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((ja.x+da.x)*ka,(ja.y+da.y)*ka,da.width*ka,da.height*ka))}return P};m.useCssTransforms&&
(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(P,da){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(P){return!mxEvent.isPopupTrigger(P.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),Q=!1,d=!1;this.setDefaultStyle=function(P){try{var da=m.getCellStyle(P,!1),ja=[],ka=[],q;for(q in da)ja.push(da[q]),ka.push(q);m.getModel().isEdge(P)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[P]));m.getModel().isEdge(P)?d=!0:Q=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){m.currentEdgeStyle=
+L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),Q=!1,d=!1;this.setDefaultStyle=function(P){try{var da=m.getCellStyle(P,!1),ja=[],ka=[],q;for(q in da)ja.push(da[q]),ka.push(q);m.getModel().isEdge(P)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[P]));m.getModel().isEdge(P)?d=!0:Q=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){m.currentEdgeStyle=
mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);Q=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);var z=function(P,da,ja,ka,q,F,R){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;F=null!=F?F:!0;ja=null!=ja?ja:m.getModel();if(R){R=[];for(var W=0;W<P.length;W++)R=R.concat(ja.getDescendants(P[W]));P=R}ja.beginUpdate();try{for(W=0;W<P.length;W++){var T=
P[W];if(da)var ba=["fontSize","fontFamily","fontColor"];else{var ia=ja.getStyle(T),ra=null!=ia?ia.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var ma=ra[ta],pa=ma.indexOf("=");if(0<=pa){var za=ma.substring(0,pa),Ba=mxUtils.indexOf(ba,za);0<=Ba&&ba.splice(Ba,1);for(R=0;R<x.length;R++){var Ia=x[R];if(0<=mxUtils.indexOf(Ia,za))for(var Aa=0;Aa<Ia.length;Aa++){var Ka=mxUtils.indexOf(ba,Ia[Aa]);0<=Ka&&ba.splice(Ka,1)}}}}}var Da=ja.isEdge(T);R=Da?q:ka;var Ra=ja.getStyle(T);for(ta=0;ta<ba.length;ta++){za=
-ba[ta];var Qa=R[za];null!=Qa&&"edgeStyle"!=za&&("shape"!=za||Da)&&(!Da||F||0>mxUtils.indexOf(K,za))&&(Ra=mxUtils.setStyle(Ra,za,Qa))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ja.setStyle(T,Ra)}}finally{ja.endUpdate()}return P};m.addListener("cellsInserted",function(P,da){z(da.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(P,da){z(da.getProperty("cells"),!0)});this.insertHandler=z;this.createDivs();this.createUi();
+ba[ta];var Qa=R[za];null!=Qa&&"edgeStyle"!=za&&("shape"!=za||Da)&&(!Da||F||0>mxUtils.indexOf(L,za))&&(Ra=mxUtils.setStyle(Ra,za,Qa))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ja.setStyle(T,Ra)}}finally{ja.endUpdate()}return P};m.addListener("cellsInserted",function(P,da){z(da.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(P,da){z(da.getProperty("cells"),!0)});this.insertHandler=z;this.createDivs();this.createUi();
this.refresh();var u=mxUtils.bind(this,function(P){null==P&&(P=window.event);return m.isEditing()||null!=P&&this.isSelectionAllowed(P)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown=u,this.formatContainer.onselectstart=u,
this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(P){if(null!=P){var da=mxEvent.getSource(P);if("A"==da.nodeName)for(;null!=da;){if("geHint"==da.className)return!0;da=da.parentNode}}return u(P)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=ca.hoverIcons&&ca.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(P){var da=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(P)-da.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(P)-da.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var L=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(P,da){return L||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(P){32!=P.which||m.isEditing()?mxEvent.isConsumed(P)||
-27!=P.keyCode||this.hideDialog(null,!0):(L=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(P)!=m.container||mxEvent.consume(P))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(P){m.container.style.cursor="";L=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(P){return G.apply(this,arguments)||L||mxEvent.isMouseEvent(P.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(P.getEvent()))&&(!mxEvent.isControlDown(P.getEvent())&&mxEvent.isRightMouseButton(P.getEvent())||mxEvent.isMiddleMouseButton(P.getEvent()))};var V=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(P){return V.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var U=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return L||
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(P)-da.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(P)-da.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var K=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(P,da){return K||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(P){32!=P.which||m.isEditing()?mxEvent.isConsumed(P)||
+27!=P.keyCode||this.hideDialog(null,!0):(K=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(P)!=m.container||mxEvent.consume(P))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(P){m.container.style.cursor="";K=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(P){return G.apply(this,arguments)||K||mxEvent.isMouseEvent(P.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(P.getEvent()))&&(!mxEvent.isControlDown(P.getEvent())&&mxEvent.isRightMouseButton(P.getEvent())||mxEvent.isMiddleMouseButton(P.getEvent()))};var V=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(P){return V.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var U=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return K||
U.apply(this,arguments)};var Y=!1,O=null,qa=null,oa=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&Y!=m.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,da=[];null!=P;){var ja=P.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,P)&&(P.parentNode.removeChild(P),da.push(P));P=ja}P=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]);this.toolbar.fontMenu=
O;this.toolbar.sizeMenu=qa}Y=m.cellEditor.isContentEditing();O=P;qa=ja;oa=da}}),ca=this,fa=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){fa.apply(this,arguments);aa();if(m.cellEditor.isContentEditing()){var P=!1,da=function(){P||(P=!0,window.setTimeout(function(){var ja=m.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=ca.toolbar&&(ca.toolbar.setFontName(Graph.stripQuotes(ja.fontFamily)),ca.toolbar.setFontSize(parseInt(ja.fontSize))));P=!1},0))};
mxEvent.addListener(m.cellEditor.textarea,"input",da);mxEvent.addListener(m.cellEditor.textarea,"touchend",da);mxEvent.addListener(m.cellEditor.textarea,"mouseup",da);mxEvent.addListener(m.cellEditor.textarea,"keyup",da);da()}};var J=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(P,da){try{J.apply(this,arguments),aa()}catch(ja){ca.handleError(ja)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(P){}var Z=
@@ -2105,7 +2105,7 @@ da=String(m.currentVertexStyle.fontSize||"12"),ja=m.getView().getState(m.getSele
m.getModel().isLayer(da)&&!m.isCellVisible(da)&&null!=P&&0<P.length&&m.getModel().setVisible(da,!0)});this.gestureHandler=mxUtils.bind(this,function(P){null!=this.currentMenu&&mxEvent.getSource(P)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});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(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(K,Q){var d=p;p+=Q;return K.substring(d,p)}function D(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=D(b);var E=m(b,4);if(null!=e&&e(p-8,E,k))break;value=m(b,k);m(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function m(L,Q){var d=p;p+=Q;return L.substring(d,p)}function D(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=D(b);var E=m(b,4);if(null!=e&&e(p-8,E,k))break;value=m(b,k);m(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2113,7 +2113,7 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,D=0;D<e.length;D++){var p=b.getCurrentCellStyle(e[D]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[D],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
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,rounded:!0,autoSize:!1,image:!0,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){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),D=k.getParent(m),p=m.getIndex(e[0]),E=D.getIndex(m),K=null,Q=1,d=1,f=0,g=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&Q!=K||(K=Q,Q=0,d++,m=k.getParent(g),g=E+d<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+d),p):null);var z=this.editor.graph.view.getState(x);
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),D=k.getParent(m),p=m.getIndex(e[0]),E=D.getIndex(m),L=null,Q=1,d=1,f=0,g=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&Q!=L||(L=Q,Q=0,d++,m=k.getParent(g),g=E+d<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+d),p):null);var z=this.editor.graph.view.getState(x);
if(x==k.getChildAt(m,p+Q)&&null!=z&&1==mxUtils.getValue(z.style,"colspan",1)&&1==mxUtils.getValue(z.style,"rowspan",1))Q++;else break}f==d*Q-1&&(b.mergeCell=e[0],b.colspan=Q,b.rowspan=d)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var p=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
@@ -2121,15 +2121,15 @@ b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.wid
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(Q,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(Q)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q));mxEvent.consume(Q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(Q,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?E.apply(this,arguments):this.graph.connectVertex(Q.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,z,u){var H=b.getCompositeParent(Q.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell=
-H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(L){u(L);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(L))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var z=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-z.x;z=b.container.scrollTop+f.y-z.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),L=e.showShapePicker(u,z,H,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,V,U){U(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},
-function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(L,f,u,z,g);mxUtils.setOpacity(L,30);mxEvent.addListener(L,"mouseenter",function(){mxUtils.setOpacity(L,100)});mxEvent.addListener(L,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K)}))}};
+H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(K){u(K);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(K))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
+d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var z=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-z.x;z=b.container.scrollTop+f.y-z.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),K=e.showShapePicker(u,z,H,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,V,U){U(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},
+function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(K,f,u,z,g);mxUtils.setOpacity(K,30);mxEvent.addListener(K,"mouseenter",function(){mxUtils.setOpacity(K,100)});mxEvent.addListener(K,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,d){null!=L&&window.clearTimeout(L)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,m,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,m,D,p){b=this.createShapePicker(b,e,k,m,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,D,p,E,K){var Q=null;if(null!=E&&0<E.length){var d=this,f=this.editor.graph;Q=document.createElement("div");D=f.view.getState(k);var g=null==k||null!=D&&f.isTransparentState(D)?null:f.copyStyle(k);k=6>E.length?35*E.length:140;Q.className="geToolbarContainer geSidebarContainer";Q.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(Q.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(Q.style.backgroundColor=f.background);f.container.appendChild(Q);k=mxUtils.bind(this,function(x){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";Q.appendChild(z);null!=g&&"1"!=urlParams.sketch?
+EditorUi.prototype.createShapePicker=function(b,e,k,m,D,p,E,L){var Q=null;if(null!=E&&0<E.length){var d=this,f=this.editor.graph;Q=document.createElement("div");D=f.view.getState(k);var g=null==k||null!=D&&f.isTransparentState(D)?null:f.copyStyle(k);k=6>E.length?35*E.length:140;Q.className="geToolbarContainer geSidebarContainer";Q.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(Q.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(Q.style.backgroundColor=f.background);f.container.appendChild(Q);k=mxUtils.bind(this,function(x){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";Q.appendChild(z);null!=g&&"1"!=urlParams.sketch?
this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,z,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(z,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u);
-f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(D=0;D<(K?Math.min(E.length,4):E.length);D++)k(E[D]);E=Q.offsetTop+Q.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<E&&(Q.style.top=Math.max(f.container.scrollTop+22,e-E)+"px");E=Q.offsetLeft+Q.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<E&&(Q.style.left=Math.max(f.container.scrollLeft+22,b-E)+"px")}return Q};
+f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(D=0;D<(L?Math.min(E.length,4):E.length);D++)k(E[D]);E=Q.offsetTop+Q.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<E&&(Q.style.top=Math.max(f.container.scrollTop+22,e-E)+"px");E=Q.offsetLeft+Q.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<E&&(Q.style.left=Math.max(f.container.scrollLeft+22,b-E)+"px")}return Q};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,D,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,D||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2144,8 +2144,8 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.
"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var K={},Q=p.createCellLookup(E),d=p.cloneCells(E,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var z=p.view.getState(E[x]);if(null!=z){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(E[x])&&null==Q[mxObjectIdentity.get(f.getParent(E[x]))]&&(u.offset=null,u.relative=!1,u.x=z.x/z.view.scale-z.view.translate.x,u.y=z.y/z.view.scale-z.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,Q),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var L={},Q=p.createCellLookup(E),d=p.cloneCells(E,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),x=0;x<d.length;x++){f.add(g,d[x]);var z=p.view.getState(E[x]);if(null!=z){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(E[x])&&null==Q[mxObjectIdentity.get(f.getParent(E[x]))]&&(u.offset=null,u.relative=!1,u.x=z.x/z.view.scale-z.view.translate.x,u.y=z.y/z.view.scale-z.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,Q),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;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 P=this.graph.getPageLayout(),da=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*da.width),this.scale*(this.translate.y+P.y*da.height),this.scale*P.width*da.width,
@@ -2156,14 +2156,14 @@ ra||q.height<ia)b.view.scaleAndTranslate(P,Math.floor(da-T.x),Math.floor(ta-T.y)
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(P,da,ja){E++;
var ka=document.createElement("span");ka.style.paddingLeft="8px";ka.style.paddingRight="8px";ka.style.cursor="pointer";mxEvent.addListener(ka,"click",P);null!=ja&&ka.setAttribute("title",ja);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",da);P.style.width="36px";P.style.filter="invert(100%)";ka.appendChild(P);this.chromelessToolbar.appendChild(ka);return ka});null!=D.backBtn&&p(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
-Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var K=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),Q=document.createElement("div");Q.style.fontFamily=Editor.defaultHtmlFont;Q.style.display="inline-block";Q.style.verticalAlign="top";Q.style.fontWeight="bold";Q.style.marginTop="8px";Q.style.fontSize="14px";Q.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(Q);var d=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(Q.innerText="",mxUtils.write(Q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});K.style.paddingLeft="0px";K.style.paddingRight="4px";d.style.paddingLeft="4px";d.style.paddingRight="0px";var g=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(d.style.display="",K.style.display="",Q.style.display="inline-block"):(d.style.display="none",K.style.display="none",Q.style.display="none");f()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",f)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var L=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),Q=document.createElement("div");Q.style.fontFamily=Editor.defaultHtmlFont;Q.style.display="inline-block";Q.style.verticalAlign="top";Q.style.fontWeight="bold";Q.style.marginTop="8px";Q.style.fontSize="14px";Q.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
+this.chromelessToolbar.appendChild(Q);var d=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(Q.innerText="",mxUtils.write(Q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});L.style.paddingLeft="0px";L.style.paddingRight="4px";d.style.paddingLeft="4px";d.style.paddingRight="0px";var g=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(d.style.display="",L.style.display="",Q.style.display="inline-block"):(d.style.display="none",L.style.display="none",Q.style.display="none");f()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",f)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var x=null,z=null,u=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);x=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);x=null;z=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";z=null}),600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var da=L.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+0);x=null;z=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";z=null}),600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var K=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var da=K.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
"4px 2px 4px 2px";this.layersDialog.style.left=da.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));da=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=da.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){L.style.display=1<C.getChildCount(C.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=
+this.layersDialog.style.zIndex=da.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){K.style.display=1<C.getChildCount(C.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var G=this.lightboxToolbarActions[g];G.elem=p(G.fn,G.icon,G.tooltip)}null!=D.refreshBtn&&p(mxUtils.bind(this,function(P){D.refreshBtn.url?window.location.href=D.refreshBtn.url:
window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,
function(P){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||(mxEvent.isShiftDown(P)||
@@ -2198,7 +2198,7 @@ b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Ma
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,D=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,D=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-D);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(D,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),d=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-Q));p=Math.max(0,Math.min(p,K-d));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,d)};var m=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),d=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-Q));p=Math.max(0,Math.min(p,L-d));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,d)};var m=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,k,m,D){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
@@ -2208,7 +2208,7 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(E,K){p.apply(this,arguments);m()};m()};
+this.editor.graph.cellEditor.stopEditing=function(E,L){p.apply(this,arguments);m()};m()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<m.length;D++)this.actions.get(m[D]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
@@ -2218,9 +2218,9 @@ this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEn
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+m;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
-this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
+this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2231,19 +2231,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function D(g){if(null!=E){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-E.x:E.y-x.y)-k));mxEvent.consume(g);K!=f()&&(Q=!0,d=null)}}function p(g){D(g);E=K=null}var E=null,K=null,Q=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){E=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));K=f();Q=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!Q&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,m){function D(g){if(null!=E){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-E.x:E.y-x.y)-k));mxEvent.consume(g);L!=f()&&(Q=!0,d=null)}}function p(g){D(g);E=L=null}var E=null,L=null,Q=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){E=new mxPoint(mxEvent.getClientX(g),
+mxEvent.getClientY(g));L=f();Q=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!Q&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,m,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(e,D,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,D,p,E,K,Q,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,D,p,E,g,K,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,D,p,E,K,Q,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,D,p,E,K,Q,d);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,m,D,p,E,L,Q,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,D,p,E,g,L,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,D,p,E,L,Q,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,D,p,E,L,Q,d);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],D=0;D<e.length;D++){var p=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(E){this.handleError(E)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,D,!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.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=E.lastIndexOf("%3E");
-0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(f){}try{var Q=p.getElementsByTagName("span"),d=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(E);this.isCompatibleString(d)&&(E=d)}catch(f){}}catch(f){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=E.lastIndexOf("%3E");
+0<=L&&L<E.length-3&&(E=E.substring(0,L+3))}catch(f){}try{var Q=p.getElementsByTagName("span"),d=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(E);this.isCompatibleString(d)&&(E=d)}catch(f){}}catch(f){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2259,11 +2259,11 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,z){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(z){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var L=m.getCellGeometry(u[H]);null!=L&&(L=L.clone(),37==g?L.width=Math.max(0,L.width-x):38==g?L.height=Math.max(0,L.height-x):39==g?L.width+=x:40==g&&(L.height+=x),m.getModel().setGeometry(u[H],
-L))}}finally{m.getModel().endUpdate()}}else{L=m.model.getParent(H);var C=m.getView().scale;z=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(z=m.layoutManager.getLayout(L));if(null!=z&&z.constructor==mxStackLayout)x=L.getIndex(H),37==g||38==g?m.model.add(L,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(L,H,Math.min(m.model.getChildCount(L),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
+EditorUi.prototype.createKeyHandler=function(b){function e(g,x,z){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(z){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var K=m.getCellGeometry(u[H]);null!=K&&(K=K.clone(),37==g?K.width=Math.max(0,K.width-x):38==g?K.height=Math.max(0,K.height-x):39==g?K.width+=x:40==g&&(K.height+=x),m.getModel().setGeometry(u[H],
+K))}}finally{m.getModel().endUpdate()}}else{K=m.model.getParent(H);var C=m.getView().scale;z=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(z=m.layoutManager.getLayout(K));if(null!=z&&z.constructor==mxStackLayout)x=K.getIndex(H),37==g||38==g?m.model.add(K,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(K,H,Math.min(m.model.getChildCount(K),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*C,G.currentDy+=H*C,G.checkPreview(),G.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=G.first){var V=G.roundLength(G.currentDx/C),U=G.roundLength(G.currentDy/C);G.moveCells(G.cells,V,U);G.reset()}},400))}}}}var k=this,m=this.editor.graph,D=new mxKeyHandler(m),p=D.isEventIgnored;D.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var E=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=D.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var z=m.connectVertex(m.getSelectionCell(),K[g.keyCode],
+89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var E=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=D.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var z=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
m.defaultEdgeLength,g,!0);null!=z&&0<z.length&&(1==z.length&&m.model.isEdge(z[0])?m.setSelectionCell(m.model.getTerminal(z[0],!1)):m.setSelectionCell(z[z.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return Q.apply(this,arguments)};D.bindAction=mxUtils.bind(this,
function(g,x,z,u){var H=this.actions.get(z);null!=H&&(z=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?D.bindControlShiftKey(g,z):D.bindControlKey(g,z):u?D.bindShiftKey(g,z):D.bindKey(g,z))});var d=this,f=D.escape;D.escape=function(g){f.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){m.exitGroup()});D.bindControlShiftKey(35,function(){m.enterGroup()});D.bindShiftKey(36,function(){m.home()});D.bindKey(35,function(){m.refresh()});D.bindAction(107,!0,"zoomIn");
D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),D.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),D.bindControlKey(13,function(){d.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
@@ -2276,33 +2276,33 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var D=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var K=Number(D.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var Q=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=D[d],Q[d]=p?"undefined"===typeof E?p(f,d):p.call(E,f,d):f,d+=1;Q.length=K;return Q}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var L=Number(D.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var Q=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=D[d],Q[d]=p?"undefined"===typeof E?p(f,d):p.call(E,f,d):f,d+=1;Q.length=L;return Q}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,e,k,m,D,p){mxGraph.call(this,b,e,k,m);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(J){J=this.getCurrentCellStyle(J);
-return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,K=null,Q=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){J=Z.getProperty("event");var P=J.getState();Z=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),f=this.isCellSelected(P.cell),Q=P,K=J,null!=P.text&&null!=
+return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,L=null,Q=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){J=Z.getProperty("event");var P=J.getState();Z=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),f=this.isCellSelected(P.cell),Q=P,L=J,null!=P.text&&null!=
P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,J.getGraphX(),J.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var da=this.selectionCellsHandler.getHandler(P.cell);null!=da&&null!=da.bends&&0<da.bends.length&&(d=da.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(da=this.selectionCellsHandler.getHandler(P.cell),null==da||null==da.getHandleForEvent(J))){var ja=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),ka=mxEvent.isTouchEvent(J.getEvent())?
mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;da=ka+2;ja.grow(ka);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,J.getGraphX()-da,J.getGraphY()-da)&&mxUtils.contains(P,J.getGraphX()-da,J.getGraphY()+da)&&mxUtils.contains(P,J.getGraphX()+da,J.getGraphY()+da)&&mxUtils.contains(P,J.getGraphX()+da,J.getGraphY()-da))){var q=this.model.getParent(P.cell);da=this.model.getParent(q);if(!this.isCellSelected(da)){ka*=Z;var F=2*ka;if(this.model.getChildAt(da,
0)!=q&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y-ka,P.width,F))||this.model.getChildAt(q,0)!=P.cell&&mxUtils.intersects(ja,new mxRectangle(P.x-ka,P.y,F,P.height))||mxUtils.intersects(ja,new mxRectangle(P.x,P.y+P.height-ka,P.width,F))||mxUtils.intersects(ja,new mxRectangle(P.x+P.width-ka,P.y,F,P.height)))q=this.selectionCellsHandler.isHandled(da),this.selectCellForEvent(da,J.getEvent()),da=this.selectionCellsHandler.getHandler(da),null!=da&&(ka=da.getHandleForEvent(J),null!=ka&&(da.start(J.getGraphX(),
J.getGraphY(),ka),da.blockDelayedSelection=!q,J.consume()))}}for(;!J.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(da=this.getActualStartSize(P.cell),(0<da.x||0<da.width)&&mxUtils.intersects(ja,new mxRectangle(P.x+(da.x-da.width-1)*Z+(0==da.x?P.width:0),P.y,1,P.height))||(0<da.y||0<da.height)&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y+(da.y-da.height-1)*Z+(0==da.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,
J.getEvent()),da=this.selectionCellsHandler.getHandler(P.cell),null!=da&&(ka=mxEvent.CUSTOM_HANDLE-da.customHandles.length+1,da.start(J.getGraphX(),J.getGraphY(),ka),J.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(J,Z){},mouseMove:mxUtils.bind(this,function(J,Z){J=this.selectionCellsHandler.handlers.map;for(var P in J)if(null!=J[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(Z.getEvent())){var da=
-this.tolerance;if(null!=E&&null!=Q&&null!=K){if(P=Q,Math.abs(E.x-Z.getGraphX())>da||Math.abs(E.y-Z.getGraphY())>da){var ja=this.selectionCellsHandler.getHandler(P.cell);null==ja&&this.model.isEdge(P.cell)&&(ja=this.createHandler(P));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){J=ja.getHandleForEvent(K);var ka=this.view.getEdgeStyle(P);da=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(J=d);if(da&&0!=J&&J!=ja.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!da||null==P.visibleSourceState&&null==
+this.tolerance;if(null!=E&&null!=Q&&null!=L){if(P=Q,Math.abs(E.x-Z.getGraphX())>da||Math.abs(E.y-Z.getGraphY())>da){var ja=this.selectionCellsHandler.getHandler(P.cell);null==ja&&this.model.isEdge(P.cell)&&(ja=this.createHandler(P));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){J=ja.getHandleForEvent(L);var ka=this.view.getEdgeStyle(P);da=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(J=d);if(da&&0!=J&&J!=ja.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!da||null==P.visibleSourceState&&null==
P.visibleTargetState||(this.graphHandler.reset(),Z.consume());else if(J==mxEvent.LABEL_HANDLE||0==J||null!=P.visibleSourceState||J==ja.bends.length-1||null!=P.visibleTargetState)da||J==mxEvent.LABEL_HANDLE||(da=P.absolutePoints,null!=da&&(null==ka&&null==J||ka==mxEdgeStyle.OrthConnector)&&(J=d,null==J&&(J=new mxRectangle(E.x,E.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,da[0].x,da[0].y)?J=0:mxUtils.contains(J,da[da.length-1].x,da[da.length-1].y)?J=ja.bends.length-1:null!=
ka&&(2==da.length||3==da.length&&(0==Math.round(da[0].x-da[1].x)&&0==Math.round(da[1].x-da[2].x)||0==Math.round(da[0].y-da[1].y)&&0==Math.round(da[1].y-da[2].y)))?J=2:(J=mxUtils.findNearestSegment(P,E.x,E.y),J=null==ka?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),ja.start(Z.getGraphX(),Z.getGraphX(),J),Z.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,
-ja),this.selectCellForEvent(P.cell,Z.getEvent())):this.isCellSelected(P.cell)||ja.destroy());f=!1;E=K=Q=d=null}}else if(P=Z.getState(),null!=P&&this.isCellEditable(P.cell)){ja=null;if(this.model.isEdge(P.cell)){if(J=new mxRectangle(Z.getGraphX(),Z.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),da=P.absolutePoints,null!=da)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,Z.getGraphX(),Z.getGraphY()))ja="move";else if(mxUtils.contains(J,da[0].x,da[0].y)||
+ja),this.selectCellForEvent(P.cell,Z.getEvent())):this.isCellSelected(P.cell)||ja.destroy());f=!1;E=L=Q=d=null}}else if(P=Z.getState(),null!=P&&this.isCellEditable(P.cell)){ja=null;if(this.model.isEdge(P.cell)){if(J=new mxRectangle(Z.getGraphX(),Z.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),da=P.absolutePoints,null!=da)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,Z.getGraphX(),Z.getGraphY()))ja="move";else if(mxUtils.contains(J,da[0].x,da[0].y)||
mxUtils.contains(J,da[da.length-1].x,da[da.length-1].y))ja="pointer";else if(null!=P.visibleSourceState||null!=P.visibleTargetState)J=this.view.getEdgeStyle(P),ja="crosshair",J!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(Z=mxUtils.findNearestSegment(P,Z.getGraphX(),Z.getGraphY()),Z<da.length-1&&0<=Z&&(ja=0==Math.round(da[Z].x-da[Z+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(Z.getEvent())){da=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(Z.getGraphX(),Z.getGraphY());
J.grow(da);if(this.isTableCell(P.cell)&&(Z=this.model.getParent(P.cell),da=this.model.getParent(Z),!this.isCellSelected(da)))if(mxUtils.intersects(J,new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(da,0)!=Z||mxUtils.intersects(J,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ja="row-resize";else if(mxUtils.intersects(J,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(Z,0)!=P.cell||mxUtils.intersects(J,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ja="col-resize";for(Z=P;null==
ja&&null!=Z&&(this.isTableCell(Z.cell)||this.isTableRow(Z.cell)||this.isTable(Z.cell));)this.isSwimlane(Z.cell)&&(da=this.getActualStartSize(Z.cell),ka=this.view.scale,(0<da.x||0<da.width)&&mxUtils.intersects(J,new mxRectangle(Z.x+(da.x-da.width-1)*ka+(0==da.x?Z.width*ka:0),Z.y,1,Z.height))?ja="col-resize":(0<da.y||0<da.height)&&mxUtils.intersects(J,new mxRectangle(Z.x,Z.y+(da.y-da.height-1)*ka+(0==da.y?Z.height:0),Z.width,1))&&(ja="row-resize")),Z=this.view.getState(this.model.getParent(Z.cell))}null!=
-ja&&P.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,function(J,Z){d=E=K=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(Z=1!=J.style.html?mxUtils.htmlEntities(Z,!1):J.view.graph.sanitizeHtml(Z));return Z};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);
+ja&&P.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,function(J,Z){d=E=L=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(Z=1!=J.style.html?mxUtils.htmlEntities(Z,!1):J.view.graph.sanitizeHtml(Z));return Z};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(J,Z){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=g.apply(this,arguments);
if(this.graph.pageVisible){var Z=[],P=this.graph.pageFormat,da=this.graph.pageScale,ja=P.width*da;P=P.height*da;da=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)Z.push(new mxRectangle(((q.x+F)*ja+da.x)*ka,(q.y*P+da.y)*ka,ja*ka,P*ka));for(F=1;F<q.height;F++)Z.push(new mxRectangle((q.x*ja+da.x)*ka,((q.y+F)*P+da.y)*ka,ja*ka,P*ka));J=Z.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(J,Z){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(J){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(J){for(var Z=x.apply(this,arguments),P=new mxDictionary,da=[],ja=0;ja<Z.length;ja++){var ka=this.graph.isTableCell(J)&&this.graph.isTableCell(Z[ja])&&
this.graph.isCellSelected(Z[ja])?this.graph.model.getParent(Z[ja]):this.graph.isTableRow(J)&&this.graph.isTableRow(Z[ja])&&this.graph.isCellSelected(Z[ja])?Z[ja]:this.graph.getCompositeParent(Z[ja]);null==ka||P.get(ka)||(P.put(ka,!0),da.push(ka))}return da};var z=this.graphHandler.start;this.graphHandler.start=function(J,Z,P,da){var ja=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?ja=!0:J=this.graph.model.getParent(J));ja||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));
-z.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),L=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;C.apply(this,arguments);J!=this.currentState?(H=(new Date).getTime(),L=0):L=(new Date).getTime()-H};var G=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(J){return V.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var U=
+z.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),K=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;C.apply(this,arguments);J!=this.currentState?(H=(new Date).getTime(),K=0):K=(new Date).getTime()-H};var G=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<K||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(J){return V.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var U=
u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(J){return U.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};var Y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Y=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=Y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(J){return mxEvent.isMouseEvent(J.getEvent())};var O=this.click;this.click=function(J){var Z=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!Z||J.isConsumed())return O.apply(this,arguments);var P=Z?J.sourceState.cell:J.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?
this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&Z&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var J=this.div.getElementsByTagName("a"),Z=0;Z<J.length;Z++)null!=J[Z].getAttribute("href")&&null==J[Z].getAttribute("target")&&J[Z].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};
@@ -2329,33 +2329,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),D=m.indexOf("<svg");if(0<=D){k.innerHTML=Graph.sanitizeHtml(m.substring(D));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var E=p[0].getAttribute("width"),K=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var Q=p[0].getAttribute("viewBox");if(null!=Q&&!isNaN(E)&&!isNaN(K)){var d=Q.split(" ");4<=Q.length&&(e=parseFloat(d[2])/E,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+1;var E=p[0].getAttribute("width"),L=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var Q=p[0].getAttribute("viewBox");if(null!=Q&&!isNaN(E)&&!isNaN(L)){var d=Q.split(" ");4<=Q.length&&(e=parseFloat(d[2])/E,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");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.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;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?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.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,p=!0,E=null,K=mxUtils.bind(this,function(f){p=!0;E=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),Q=mxUtils.bind(this,function(f){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(f))<D&&Math.abs(E.y-mxEvent.getClientY(f))<D}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,p=!0,E=null,L=mxUtils.bind(this,function(f){p=!0;E=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),Q=mxUtils.bind(this,function(f){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(f))<D&&Math.abs(E.y-mxEvent.getClientY(f))<D}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
+g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
-"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var K=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(E){return"1"==
-mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,K){E=null!=E?E:!0;K=null!=K?K:!0;var Q=this.model;return Q.filterDescendants(function(d){return E&&Q.isVertex(d)||K&&Q.isEdge(d)},Q.getRoot())};Graph.prototype.getCommonStyle=
-function(E){for(var K={},Q=0;Q<E.length;Q++){var d=this.view.getState(E[Q]);this.mergeStyle(d.style,K,0==Q)}return K};Graph.prototype.mergeStyle=function(E,K,Q){if(null!=E){var d={},f;for(f in E){var g=E[f];null!=g&&(d[f]=!0,null==K[f]&&Q?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&
-0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),K=this.getCellStyle(E),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(K=0;K<this.model.getChildCount(E);K++){var Q=this.model.getChildAt(E,K);if(this.isCellEditable(Q)){E=Q;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,K,Q){Q=null!=Q?Q:Graph.pasteStyles;
-Graph.removeKeys(E,function(d){return 0>mxUtils.indexOf(Q,d)});this.updateCellStyles(E,K)};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var Q=0;Q<K.length;Q++)if(this.model.isVertex(K[Q])||this.model.isEdge(K[Q])){var d=this.getCellStyle(K[Q],!1),f;for(f in E){var g=E[f];d[f]!=g&&this.setCellStyles(f,g,[K[Q]])}}}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(E,K,Q,d,f,g){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,Q,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,K,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.getState(z),null!=u&&(null==g||!g(u,E,K))&&this.intersects(u,E,K)))return z}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
-!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var K=this.getCellGeometry(E);null!=K&&K.relative;)E=this.getModel().getParent(E),K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K=
-new mxDictionary,Q=[],d=0;d<E.length;d++){var f=this.getCompositeParent(E[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),Q.push(f))}return Q};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var K=this.model.getParent(E);if(!this.model.isVertex(K))break;E=K}return E};Graph.prototype.filterSelectionCells=function(E){var K=this.getSelectionCells();if(null!=E){for(var Q=[],d=0;d<K.length;d++)E(K[d])||
-Q.push(K[d]);K=Q}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var K=this.currentScale,Q=this.currentTranslate;E=new mxRectangle((E.x+2*Q.x)*K-Q.x,(E.y+2*Q.y)*K-Q.y,E.width*K,E.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
-if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,Q=this.graph.currentScale;E=new mxRectangle((E.x+K.x)*Q,(E.y+K.y)*Q,E.width*Q,E.height*Q)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=m.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTable(E[Q])||this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var K=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
-"scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,K=this.scale,Q=this.translate;
-E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=K,this.translate=Q)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
+"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var L=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(E){return"1"==
+mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,L){E=null!=E?E:!0;L=null!=L?L:!0;var Q=this.model;return Q.filterDescendants(function(d){return E&&Q.isVertex(d)||L&&Q.isEdge(d)},Q.getRoot())};Graph.prototype.getCommonStyle=
+function(E){for(var L={},Q=0;Q<E.length;Q++){var d=this.view.getState(E[Q]);this.mergeStyle(d.style,L,0==Q)}return L};Graph.prototype.mergeStyle=function(E,L,Q){if(null!=E){var d={},f;for(f in E){var g=E[f];null!=g&&(d[f]=!0,null==L[f]&&Q?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(E,L){L=this.getCellStyle(E);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==L)&&""==this.getLabel(E)&&
+0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),L=this.getCellStyle(E),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==L)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(L=0;L<this.model.getChildCount(E);L++){var Q=this.model.getChildAt(E,L);if(this.isCellEditable(Q)){E=Q;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,L,Q){Q=null!=Q?Q:Graph.pasteStyles;
+Graph.removeKeys(E,function(d){return 0>mxUtils.indexOf(Q,d)});this.updateCellStyles(E,L)};Graph.prototype.updateCellStyles=function(E,L){this.model.beginUpdate();try{for(var Q=0;Q<L.length;Q++)if(this.model.isVertex(L[Q])||this.model.isEdge(L[Q])){var d=this.getCellStyle(L[Q],!1),f;for(f in E){var g=E[f];d[f]!=g&&this.setCellStyles(f,g,[L[Q]])}}}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(E,L,Q,d,f,g){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,L,Q,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
+null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,L,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.getState(z),null!=u&&(null==g||!g(u,E,L))&&this.intersects(u,E,L)))return z}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var L=this.getCellGeometry(E);null!=L&&L.relative;)E=this.getModel().getParent(E),L=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var L=
+new mxDictionary,Q=[],d=0;d<E.length;d++){var f=this.getCompositeParent(E[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),Q.push(f))}return Q};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var L=this.model.getParent(E);if(!this.model.isVertex(L))break;E=L}return E};Graph.prototype.filterSelectionCells=function(E){var L=this.getSelectionCells();if(null!=E){for(var Q=[],d=0;d<L.length;d++)E(L[d])||
+Q.push(L[d]);L=Q}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var L=this.currentScale,Q=this.currentTranslate;E=new mxRectangle((E.x+2*Q.x)*L-Q.x,(E.y+2*Q.y)*L-Q.y,E.width*L,E.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
+if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,Q=this.graph.currentScale;E=new mxRectangle((E.x+L.x)*Q,(E.y+L.y)*Q,E.width*Q,E.height*Q)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var L=[],Q=0;Q<E.length;Q++)this.isTableRow(E[Q])||this.isTableCell(E[Q])||L.push(E[Q]);return L};var m=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=m.apply(this,arguments);for(var L=[],Q=0;Q<E.length;Q++)this.isTable(E[Q])||this.isTableRow(E[Q])||this.isTableCell(E[Q])||L.push(E[Q]);return L};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var L=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
+"scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,L=this.scale,Q=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=L,this.translate=Q)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,L,Q){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2369,10 +2369,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,D={};D.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)D[m[p].nodeName]=m[p].nodeValue;else D.label=this.convertValueToString(b[k]);e.push(D)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var D=this.cellRenderer.getShapesForState(m),p=0;p<D.length;p++)null!=D[p]&&null!=D[p].node&&e.push(D[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var D=this.view.getState(b[m]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?k.push(this.createEdgeWipeAnimation(D,e)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&k.push(this.createVertexWipeAnimation(D,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,D=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var Q=[k[0]];K=E/K;e||(K=1-K);for(var d=D*K,f=1;f<p;f++)if(d<=m[f-1]){Q.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],Q.push(k[f]);b.shape.points=Q;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,D=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,L){if(null!=b.shape){var Q=[k[0]];L=E/L;e||(L=1-L);for(var d=D*L,f=1;f<p;f++)if(d<=m[f-1]){Q.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],Q.push(k[f]);b.shape.points=Q;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,D){null!=b.shape&&(D=m/D,e||(D=1-D),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*D,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(D);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});D=window.setInterval(E,m);E()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(D);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});D=window.setInterval(E,m);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2383,27 +2383,27 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(C,G){C=String(C);for(G=G||2;C.length<G;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",Q=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),z=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),L={d:Q,dd:E(Q),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:E(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:E(x%12||12),H:x,HH:E(x),M:z,MM:E(z),s:u,ss:E(u),l:E(K,3),L:E(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in L?L[C]:C.slice(1,
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",Q=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),z=b[L+"Minutes"](),u=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),K={d:Q,dd:E(Q),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:E(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:E(x%12||12),H:x,HH:E(x),M:z,MM:E(z),s:u,ss:E(u),l:E(L,3),L:E(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in K?K[C]:C.slice(1,
C.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),D=m.getChildCount(m.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function K(){m.isVisible(E)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var Q=this.convertValueToString(E)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),D=m.getChildCount(m.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function L(){m.isVisible(E)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var Q=this.convertValueToString(E)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(E)?"hideIt":"show",[Q]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,Q);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(E,!m.isVisible(E));K();null!=b&&b(E)});K()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)E=b.id;else if(0>K.indexOf("{"))for(var Q=b;null==E&&null!=Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=Q.getAttribute(K+"_"+Graph.diagramLanguage)),
-null==E&&(E=Q.hasAttribute(K)?null!=Q.getAttribute(K)?Q.getAttribute(K):"":null)),Q=this.model.getParent(Q);null==E&&(E=this.getGlobalVariable(K));null==E&&null!=k&&(E=k[K])}m.push(e.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}m.push(e.substring(D))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
+mxEvent.addListener(d,"click",function(){m.setVisible(E,!m.isVisible(E));L();null!=b&&b(E)});L()})(m.getChildAt(m.root,p));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)E=b.id;else if(0>L.indexOf("{"))for(var Q=b;null==E&&null!=Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=Q.getAttribute(L+"_"+Graph.diagramLanguage)),
+null==E&&(E=Q.hasAttribute(L)?null!=Q.getAttribute(L)?Q.getAttribute(L):"":null)),Q=this.model.getParent(Q);null==E&&(E=this.getGlobalVariable(L));null==E&&null!=k&&(E=k[L])}m.push(e.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}m.push(e.substring(D))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),D=this.model.getParent(m),p=this.model.getParent(e);if(D==this.model.getParent(p)){b=m.getIndex(b);m=D.getIndex(m);var E=p.getIndex(e),K=D.getIndex(p);p=Math.max(m,K);e=Math.min(b,E);b=Math.max(b,E);E=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(D,m);for(var Q=e;Q<=b;Q++)E.push(this.model.getChildAt(K,Q))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),D=this.model.getParent(m),p=this.model.getParent(e);if(D==this.model.getParent(p)){b=m.getIndex(b);m=D.getIndex(m);var E=p.getIndex(e),L=D.getIndex(p);p=Math.max(m,L);e=Math.min(b,E);b=Math.max(b,E);E=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(D,m);for(var Q=e;Q<=b;Q++)E.push(this.model.getChildAt(L,Q))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],D=this.getCellGeometry(m);if(null!=D){D=D.clone();if(this.getModel().isVertex(m))D.x=Math.round(D.x/e)*e,D.y=Math.round(D.y/e)*e,D.width=Math.round(D.width/e)*e,D.height=Math.round(D.height/e)*e;else if(this.getModel().isEdge(m)&&null!=D.points)for(var p=0;p<D.points.length;p++)D.points[p].x=Math.round(D.points[p].x/e)*e,D.points[p].y=Math.round(D.points[p].y/e)*e;this.getModel().setGeometry(m,
D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,D,p,E,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),d=Q?b:this.getCompositeParent(b),f=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(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
+Graph.prototype.connectVertex=function(b,e,k,m,D,p,E,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),d=Q?b:this.getCompositeParent(b),f=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(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var z=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==z||p[H]==this.model.getParent(b)))z=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var L=this.view.getState(p[H]);null==g||null==L||mxUtils.intersects(g,L)||(u=p[H])}}var C=
+this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var z=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==z||p[H]==this.model.getParent(b)))z=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var K=this.view.getState(p[H]);null==g||null==K||mxUtils.intersects(g,K)||(u=p[H])}}var C=
!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||D;C&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],V=u;u=z;D=mxUtils.bind(this,function(U){if(null==E||null!=U||null==u&&Q){this.model.beginUpdate();try{if(null==V&&C){var Y=this.getAbsoluteParent(null!=U?U:b);Y=Q?b:this.getCompositeParent(Y);V=null!=U?U:this.duplicateCells([Y],
!1)[0];null!=U&&this.addCells([V],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(V);null!=O&&(null!=U&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=O.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-O.width/2:f.x+O.width/2),O.x=f.x-O.width/2,O.y=f.y-O.height/2);null!=z?(this.addCells([V],z,null,null,null,!0),u=null):C&&!Q&&this.addCells([V],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&&
mxEvent.isShiftDown(m)&&C||null==u&&Q?null:this.insertEdge(this.model.getParent(b),null,"",b,V,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(U=b;null!=U.parent&&null!=U.geometry&&U.geometry.relative&&U.parent!=qa.parent;)U=this.model.getParent(U);null!=U&&null!=U.parent&&U.parent==qa.parent&&(oa=U.parent.getIndex(U),this.model.add(U.parent,qa,oa))}null==u&&null!=V&&null!=b.parent&&Q&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent,
-V,oa));null!=qa&&G.push(qa);null==u&&null!=V&&G.push(V);null==V&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==E||null!=V||!C||null==u&&Q)return D(V);E(d+f.x*k,x+f.y*k,D)};
+V,oa));null!=qa&&G.push(qa);null==u&&null!=V&&G.push(V);null==V&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=L)L(G);else return G});if(null==E||null!=V||!C||null==u&&Q)return D(V);E(d+f.x*k,x+f.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,D=0;D<b.length;D++)if(m=b[D],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}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){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2412,7 +2412,7 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=E&&null!=K){var Q=Math.round(K.width-E.width/this.view.scale),d=Math.round(K.height-E.height/this.view.scale);if(0!=d||0!=Q){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
+Graph.prototype.foldCells=function(b,e,k,m,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=E&&null!=L){var Q=Math.round(L.width-E.width/this.view.scale),d=Math.round(L.height-E.height/this.view.scale);if(0!=d||0!=Q){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
null==g?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,f,Q,d):null!=D&&mxEvent.isAltDown(D)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,Q,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var p=this.view.getState(D[e]),E=this.getCellGeometry(D[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(D[e],E))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=m+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
@@ -2450,52 +2450,52 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),D=k.getGraphX(),p=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,Q,d){if(null!=k){var f=new mxRectangle(Q,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?Q+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(Q-=f.x+f.width-k.x))}K.style.left=Q+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,Q,d){if(null!=k){var f=new mxRectangle(Q,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?Q+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(Q-=f.x+f.width-k.x))}L.style.left=Q+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==D&&D==b&&(b=D=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(K,Q){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K,
-this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});E(e,this.arrowRight);E(m,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==D&&D==b&&(b=D=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(L,Q){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
+this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});E(e,this.arrowRight);E(m,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,
e,k))&&(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.createParent=function(b,e,k,m,D){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),K=this.getCellGeometry(E);null!=K&&(K.x+=p*m,K.y+=p*D);b.insert(E)}return b};
-Graph.prototype.createTable=function(b,e,k,m,D,p,E,K,Q){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=D?D:"",0,0,e*k,b*m+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,Q),e,k,0),b,0,m)};
+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.createParent=function(b,e,k,m,D){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),L=this.getCellGeometry(E);null!=L&&(L.x+=p*m,L.y+=p*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,m,D,p,E,L,Q){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,e*k,b*m+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,Q),e,k,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),D=0;D<m.length;D++)if(null!=k&&(m[D].value=k[D]),null!=e)for(var p=this.model.getChildCells(m[D],!0),E=0;E<p.length;E++)null!=e[D][E]&&(p[E].value=e[D][E]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,D,p,E,K,Q){k=null!=k?k:120;m=null!=m?m:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;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;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,D,p,E,L,Q){k=null!=k?k:120;m=null!=m?m:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;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;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
Q=null!=Q?Q:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=p;D.geometry.height+=p;E=this.createVertex(null,
-null,"",0,p,e*k+p,m,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(E.geometry.y=m+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,k,m,Q),e,k,0),b-1,0,m)):D};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<m.length;D++){for(var p=this.getActualStartSize(m[D],!0),E=this.model.getChildCells(m[D],!0),K=this.getCellStyle(m[D],!0),Q=null,d=[],f=0;f<E.length;f++){var g=this.getCellGeometry(E[f]),x={cell:E[f],rospan:1,colspan:1,row:D,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=Q?Q.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=Q&&1<Q.colspan?(x.rowspan=Q.rowspan,x.colspan=Q.colspan-1,x.actual=Q.actual):(Q=this.getCurrentCellStyle(E[f],!0),null!=Q&&(x.rowspan=parseInt(Q.rowspan||1),x.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,E.length,
-m.length,b.x+(Q?p.x:0),b.y+(Q?p.y:0));d.push(x);Q=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,K,Q,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(Q,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return m.concat(D)};
+null,"",0,p,e*k+p,m,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(E.geometry.y=m+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,k,m,Q),e,k,0),b-1,0,m)):D};
+Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<m.length;D++){for(var p=this.getActualStartSize(m[D],!0),E=this.model.getChildCells(m[D],!0),L=this.getCellStyle(m[D],!0),Q=null,d=[],f=0;f<E.length;f++){var g=this.getCellGeometry(E[f]),x={cell:E[f],rospan:1,colspan:1,row:D,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=Q?Q.point.x:b.x+p.x),g.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=Q&&1<Q.colspan?(x.rowspan=Q.rowspan,x.colspan=Q.colspan-1,x.actual=Q.actual):(Q=this.getCurrentCellStyle(E[f],!0),null!=Q&&(x.rowspan=parseInt(Q.rowspan||1),x.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,E.length,
+m.length,b.x+(Q?p.x:0),b.y+(Q?p.y:0));d.push(x);Q=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,L,Q,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(Q,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return m.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;m.setGeometry(b,D);var p=m.getParent(b),E=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var Q=E[K+1],d=this.getCellGeometry(Q);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(Q,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==E[E.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),D=m.getParent(b),p=m.getParent(D),E=m.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(p,!0),d=0;d<Q.length;d++){D=Q[d];E=m.getChildCells(D,!0);var f=E[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<E.length-1&&(f=E[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;m.setGeometry(b,D);var p=m.getParent(b),E=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(E,b);if(L<E.length-1){var Q=E[L+1],d=this.getCellGeometry(Q);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(Q,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==E[E.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),D=m.getParent(b),p=m.getParent(D),E=m.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var L=b==E.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(p,!0),d=0;d<Q.length;d++){D=Q[d];E=m.getChildCells(D,!0);var f=E[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<E.length-1&&(f=E[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
+g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var D=this.graph.getCellGeometry(b[m]);null!=D&&(k+=e?D.width:D.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var D=[];m=m.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(m+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,D.push(Math.round(m)))}return D};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<p.length;Q++){var d=this.graph.getCellGeometry(p[Q]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[Q],d.width=e[Q+1]-d.x,Q==p.length-1&&Q<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=E,E+=d.width,Q==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),D.setGeometry(p[Q],d))}return K};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var Q=k.height-e.y-e.height,d=k.width-e.x-e.width,f=E.getChildCells(b,!0),g=0;g<f.length;g++)E.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<Q&&0<d&&0<
-f.length&&0<x){if(D){var z=this.graph.getCellGeometry(f[f.length-1]);null!=z&&(z=z.clone(),z.height=Q-x+z.height,E.setGeometry(f[f.length-1],z))}var u=p?null:this.getRowLayout(f[0],d),H=[],L=e.y;for(g=0;g<f.length;g++)z=this.graph.getCellGeometry(f[g]),null!=z&&(z=z.clone(),z.x=e.x,z.width=d,z.y=Math.round(L),L=D||m?L+z.height:L+z.height/x*Q,z.height=Math.round(L)-z.y,E.setGeometry(f[g],z)),K=Math.max(K,this.layoutRow(f[g],u,z.height,d,H));m&&Q<x&&(k=k.clone(),k.height=L+e.height,E.setGeometry(b,
-k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=G.width}C.actual.col==C.col&&(G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)E.setVisible(f[g],
+TableLayout.prototype.layoutRow=function(b,e,k,m){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<p.length;Q++){var d=this.graph.getCellGeometry(p[Q]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[Q],d.width=e[Q+1]-d.x,Q==p.length-1&&Q<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=E,E+=d.width,Q==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
+0,d.width,d.height),D.setGeometry(p[Q],d))}return L};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var E=this.graph.getModel(),L=0;E.beginUpdate();try{for(var Q=k.height-e.y-e.height,d=k.width-e.x-e.width,f=E.getChildCells(b,!0),g=0;g<f.length;g++)E.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<Q&&0<d&&0<
+f.length&&0<x){if(D){var z=this.graph.getCellGeometry(f[f.length-1]);null!=z&&(z=z.clone(),z.height=Q-x+z.height,E.setGeometry(f[f.length-1],z))}var u=p?null:this.getRowLayout(f[0],d),H=[],K=e.y;for(g=0;g<f.length;g++)z=this.graph.getCellGeometry(f[g]),null!=z&&(z=z.clone(),z.x=e.x,z.width=d,z.y=Math.round(K),K=D||m?K+z.height:K+z.height/x*Q,z.height=Math.round(K)-z.y,E.setGeometry(f[g],z)),L=Math.max(L,this.layoutRow(f[g],u,z.height,d,H));m&&Q<x&&(k=k.clone(),k.height=K+e.height,E.setGeometry(b,
+k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=G.width}C.actual.col==C.col&&(G=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)E.setVisible(f[g],
!1)}finally{E.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(f){D.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,z=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(ca,fa,J){var Z=new mxPoint(fa,J);Z.type=ca;z.push(Z);Z=null!=f.routedPoints?f.routedPoints[z.length-1]:null;return null==Z||Z.type!=
-ca||Z.x!=fa||Z.y!=J},H=.5*this.scale;x=!1;z=[];for(var L=0;L<g.length-1;L++){for(var C=g[L+1],G=g[L],V=[],U=g[L+2];L<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,U.x,U.y,C.x,C.y)<1*this.scale*this.scale;)C=U,L++,U=g[L+2];x=u(0,G.x,G.y)||x;for(var Y=0;Y<this.validEdges.length;Y++){var O=this.validEdges[Y],qa=O.absolutePoints;if(null!=qa&&mxUtils.intersects(f,O)&&"1"!=O.style.noJump)for(O=0;O<qa.length-1;O++){var oa=qa[O+1],aa=qa[O];for(U=qa[O+2];O<qa.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,oa.x,
+ca||Z.x!=fa||Z.y!=J},H=.5*this.scale;x=!1;z=[];for(var K=0;K<g.length-1;K++){for(var C=g[K+1],G=g[K],V=[],U=g[K+2];K<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,U.x,U.y,C.x,C.y)<1*this.scale*this.scale;)C=U,K++,U=g[K+2];x=u(0,G.x,G.y)||x;for(var Y=0;Y<this.validEdges.length;Y++){var O=this.validEdges[Y],qa=O.absolutePoints;if(null!=qa&&mxUtils.intersects(f,O)&&"1"!=O.style.noJump)for(O=0;O<qa.length-1;O++){var oa=qa[O+1],aa=qa[O];for(U=qa[O+2];O<qa.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,oa.x,
oa.y)<1*this.scale*this.scale;)oa=U,O++,U=qa[O+2];U=mxUtils.intersection(G.x,G.y,C.x,C.y,aa.x,aa.y,oa.x,oa.y);if(null!=U&&(Math.abs(U.x-G.x)>H||Math.abs(U.y-G.y)>H)&&(Math.abs(U.x-C.x)>H||Math.abs(U.y-C.y)>H)&&(Math.abs(U.x-aa.x)>H||Math.abs(U.y-aa.y)>H)&&(Math.abs(U.x-oa.x)>H||Math.abs(U.y-oa.y)>H)){oa=U.x-G.x;aa=U.y-G.y;U={distSq:oa*oa+aa*aa,x:U.x,y:U.y};for(oa=0;oa<V.length;oa++)if(V[oa].distSq>U.distSq){V.splice(oa,0,U);U=null;break}null==U||0!=V.length&&V[V.length-1].x===U.x&&V[V.length-1].y===
U.y||V.push(U)}}}for(O=0;O<V.length;O++)x=u(1,V[O].x,V[O].y)||x}U=g[g.length-1];x=u(0,U.x,U.y)||x}f.routedPoints=z;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){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)p.apply(this,arguments);else{var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),L=!0,C=null,G=null,V=[],U=null;f.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var O=this.state.routedPoints[Y],qa=new mxPoint(O.x/this.scale,O.y/this.scale);0==Y?qa=g[0]:Y==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=C&&1==O.type){var aa=this.state.routedPoints[Y+1];O=aa.x/this.scale-qa.x;aa=aa.y/this.scale-qa.y;
-O=O*O+aa*aa;null==U&&(U=new mxPoint(qa.x-C.x,qa.y-C.y),G=Math.sqrt(U.x*U.x+U.y*U.y),0<G?(U.x=U.x*u/G,U.y=U.y*u/G):U=null);O>u*u&&0<G&&(O=C.x-qa.x,aa=C.y-qa.y,O=O*O+aa*aa,O>u*u&&(oa=new mxPoint(qa.x-U.x,qa.y-U.y),O=new mxPoint(qa.x+U.x,qa.y+U.y),V.push(oa),this.addPoints(f,V,x,z,!1,null,L),V=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,L=!1,"sharp"==H?(f.lineTo(oa.x-U.y*V,oa.y+U.x*V),f.lineTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x,O.y)):"line"==H?(f.moveTo(oa.x+U.y*V,oa.y-U.x*V),f.lineTo(oa.x-
-U.y*V,oa.y+U.x*V),f.moveTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x+U.y*V,O.y-U.x*V),f.moveTo(O.x,O.y)):"arc"==H?(V*=1.3,f.curveTo(oa.x-U.y*V,oa.y+U.x*V,O.x-U.y*V,O.y+U.x*V,O.x,O.y)):(f.moveTo(O.x,O.y),L=!0),V=[O],oa=!0))}else U=null;oa||(V.push(qa),C=qa)}this.addPoints(f,V,x,z,!1,null,L);f.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,z){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
-g.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,z){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,z);var u=this.getNextPoint(f,x,z),H=this.graph.isOrthogonal(f),L=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=L){var G=Math.cos(-L),V=
-Math.sin(-L);u=mxUtils.getRotatedPoint(u,G,V,C)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[z?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==L&&H,G);0!=L&&(G=Math.cos(L),V=Math.sin(L),u=mxUtils.getRotatedPoint(u,G,V,C));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,z,u),z)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,z,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
-z=x=null;if(null!=f)for(var H=0;H<f.length;H++){var L=this.graph.getConnectionPoint(g,f[H]);if(null!=L){var C=(L.x-u.x)*(L.x-u.x)+(L.y-u.y)*(L.y-u.y);if(null==z||C<z)x=L,z=C}}null!=x&&(u=x)}return u};var Q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var z=Q.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(z=x.state.view.graph.replacePlaceholders(x.state.cell,z));return z};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),K=!0,C=null,G=null,V=[],U=null;f.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var O=this.state.routedPoints[Y],qa=new mxPoint(O.x/this.scale,O.y/this.scale);0==Y?qa=g[0]:Y==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=C&&1==O.type){var aa=this.state.routedPoints[Y+1];O=aa.x/this.scale-qa.x;aa=aa.y/this.scale-qa.y;
+O=O*O+aa*aa;null==U&&(U=new mxPoint(qa.x-C.x,qa.y-C.y),G=Math.sqrt(U.x*U.x+U.y*U.y),0<G?(U.x=U.x*u/G,U.y=U.y*u/G):U=null);O>u*u&&0<G&&(O=C.x-qa.x,aa=C.y-qa.y,O=O*O+aa*aa,O>u*u&&(oa=new mxPoint(qa.x-U.x,qa.y-U.y),O=new mxPoint(qa.x+U.x,qa.y+U.y),V.push(oa),this.addPoints(f,V,x,z,!1,null,K),V=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,K=!1,"sharp"==H?(f.lineTo(oa.x-U.y*V,oa.y+U.x*V),f.lineTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x,O.y)):"line"==H?(f.moveTo(oa.x+U.y*V,oa.y-U.x*V),f.lineTo(oa.x-
+U.y*V,oa.y+U.x*V),f.moveTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x+U.y*V,O.y-U.x*V),f.moveTo(O.x,O.y)):"arc"==H?(V*=1.3,f.curveTo(oa.x-U.y*V,oa.y+U.x*V,O.x-U.y*V,O.y+U.x*V,O.x,O.y)):(f.moveTo(O.x,O.y),K=!0),V=[O],oa=!0))}else U=null;oa||(V.push(qa),C=qa)}this.addPoints(f,V,x,z,!1,null,K);f.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,z){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
+g.getCenterY()):E.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,z){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,z);var u=this.getNextPoint(f,x,z),H=this.graph.isOrthogonal(f),K=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=K){var G=Math.cos(-K),V=
+Math.sin(-K);u=mxUtils.getRotatedPoint(u,G,V,C)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[z?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==K&&H,G);0!=K&&(G=Math.cos(K),V=Math.sin(K),u=mxUtils.getRotatedPoint(u,G,V,C));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,z,u),z)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,z,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
+z=x=null;if(null!=f)for(var H=0;H<f.length;H++){var K=this.graph.getConnectionPoint(g,f[H]);if(null!=K){var C=(K.x-u.x)*(K.x-u.x)+(K.y-u.y)*(K.y-u.y);if(null==z||C<z)x=K,z=C}}null!=x&&(u=x)}return u};var Q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var z=Q.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(z=x.state.view.graph.replacePlaceholders(x.state.cell,z));return z};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),z=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(z.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var D=e[m];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
@@ -2504,7 +2504,7 @@ mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"stri
mxStencilRegistry.loadStencilSet=function(b,e,k,m){var D=mxStencilRegistry.packages[b];if(null!=k&&k||null==D){var p=!1;if(null==D)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){D=D.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+p.toLowerCase(),new mxStencil(m));if(null!=e){var E=m.getAttribute("w"),
-K=m.getAttribute("h");E=null==E?80:parseInt(E,10);K=null==K?80:parseInt(K,10);e(D,p,b,E,K)}}m=m.nextSibling}}};
+L=m.getAttribute("h");E=null==E?80:parseInt(E,10);L=null==L?80:parseInt(L,10);e(D,p,b,E,L)}}m=m.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,M){switch(M){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/mxConstants.PIXELS_PER_INCH).toFixed(2)}}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_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return m.apply(this,arguments)||
@@ -2518,7 +2518,7 @@ ha=0;ha<X;ha++)this.createCellLookup([this.model.getChildAt(S,ha)],M)}return M};
xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<xa.length;ha++)ya=this.model.getChildren(this.moveCells([xa[ha]],M,N,!1,this.model.getRoot())[0]),null!=ya&&(y=y.concat(ya));else{var ya=ha.getChildren(xa[0]);null!=ya&&(y=this.moveCells(ya,M,N,!1,this.getDefaultParent()),la[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(X,sa,la),this.updateCustomLinks(la,y),S)){this.isGridEnabled()&&
(M=this.snap(M),N=this.snap(N));var Fa=this.getBoundingBoxFromGeometry(y,!0);null!=Fa&&this.moveCells(y,M-Fa.x,N-Fa.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var M={},N=this.cloneCells(y,null,M),S=new mxDictionary,X=0;X<y.length;X++)S.put(y[X],!0);var ha=new mxCodec,la=new mxGraphModel,xa=la.getChildAt(la.getRoot(),0);for(X=0;X<N.length;X++){la.add(xa,N[X]);var sa=this.view.getState(y[X]);if(null!=sa){var ya=this.getCellGeometry(N[X]);null!=ya&&ya.relative&&
!this.model.isEdge(y[X])&&null==S.get(this.model.getParent(y[X]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,this.createCellLookup(y)),N);return ha.encode(la)};Graph.prototype.isSwimlane=function(y,M){var N=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(N=this.getCurrentCellStyle(y,M)[mxConstants.STYLE_SHAPE]);return N==mxConstants.SHAPE_SWIMLANE||
-"table"==N||"tableRow"==N};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var M=this.model.getParent(y);if(null!=M){var N=this.getCurrentCellStyle(M);if(null!=N.expand)return"0"!=N.expand}return K.apply(this,arguments)&&(null==M||!this.isTable(M))};var Q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,M,N,S,X,ha,la,xa){null==xa&&(xa=this.model.getParent(y),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ha,la,null,!0,!1));N=null;this.model.beginUpdate();
+"table"==N||"tableRow"==N};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var M=this.model.getParent(y);if(null!=M){var N=this.getCurrentCellStyle(M);if(null!=N.expand)return"0"!=N.expand}return L.apply(this,arguments)&&(null==M||!this.isTable(M))};var Q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,M,N,S,X,ha,la,xa){null==xa&&(xa=this.model.getParent(y),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ha,la,null,!0,!1));N=null;this.model.beginUpdate();
try{N=Q.apply(this,[y,M,N,S,X,ha,la,xa]);this.model.setValue(N,"");var sa=this.getChildCells(N,!0);for(M=0;M<sa.length;M++){var ya=this.getCellGeometry(sa[M]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[M])}var Fa=this.getChildCells(y,!0);for(M=0;M<Fa.length;M++)ya=this.getCellGeometry(Fa[M]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[N]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[N]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var wa=this.model.getTerminal(N,!1);if(null!=wa){var ua=this.getCurrentCellStyle(wa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
function(y,M,N){if(M||N)d.apply(this,arguments);else{var S=this.getSelectionCell(),X=null,ha=[],la=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ha.push(xa),xa==S)X=ha.length-1;else if(y&&null==S&&0<ha.length||null!=X&&y&&ha.length>X||!y&&0<X)return;for(var sa=0;sa<this.model.getChildCount(xa);sa++)la(this.model.getChildAt(xa,sa))});la(this.model.root);0<ha.length&&(X=null!=X?mxUtils.mod(X+(y?1:-1),ha.length):0,this.setSelectionCell(ha[X]))}};
@@ -2600,7 +2600,7 @@ this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea
y.style.whiteSpace="pre";y.appendChild(document.createTextNode(S));N.insertNode(y);N.setStartAfter(y);N.setEndAfter(y);M.removeAllRanges();M.addRange(N)};mxCellEditor.prototype.alignText=function(y,M){var N=null!=M&&mxEvent.isShiftDown(M);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(X){N||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"),X.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+
y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var M=[],N=0,S=y.rangeCount;N<S;++N)M.push(y.getRangeAt(N));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var M=0,N=y.length;M<
N;++M)sel.addRange(y[M])}else document.selection&&y.select&&y.select()}catch(S){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,M){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,M){y=this.graph.getStartEditingCell(y,M);L.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);
+function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var K=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,M){y=this.graph.getStartEditingCell(y,M);K.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);
N=this.graph.getModel().getParent(y);var S=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(N)&&null!=S&&S.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function M(X,ha){ha.originalNode=X;X=X.firstChild;for(var la=ha.firstChild;null!=X&&null!=la;)M(X,la),X=X.nextSibling,la=la.nextSibling;
return ha}function N(X,ha){if(null!=X)if(ha.originalNode!=X)S(X);else for(X=X.firstChild,ha=ha.firstChild;null!=X;){var la=X.nextSibling;null==ha?S(X):(N(X,ha),ha=ha.nextSibling);X=la}}function S(X){for(var ha=X.firstChild;null!=ha;){var la=ha.nextSibling;S(ha);ha=la}1==X.nodeType&&("BR"===X.nodeName||null!=X.firstChild)||3==X.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(X)).length?(3==X.nodeType&&mxUtils.setTextContent(X,mxUtils.getTextContent(X).replace(/\n|\r/g,"")),1==X.nodeType&&(X.removeAttribute("style"),
X.removeAttribute("class"),X.removeAttribute("width"),X.removeAttribute("cellpadding"),X.removeAttribute("cellspacing"),X.removeAttribute("border"))):X.parentNode.removeChild(X)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(X){var ha=M(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
@@ -2688,8 +2688,8 @@ this.linkHint.style.top=Math.round(N+this.verticalOffset/2+Editor.hintOffset)+"p
null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}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 Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Pa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function z(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function L(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
+function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function z(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function qa(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,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function J(){mxActor.call(this)}function Z(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function da(){mxCylinder.call(this)}function ja(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
function R(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function T(){mxShape.call(this)}function ba(){mxShape.call(this)}function ia(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function ma(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Ka(){mxArrowConnector.call(this);
@@ -2705,8 +2705,8 @@ e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.r
A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(D,
mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0,
.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(Q,mxCylinder);Q.prototype.size=30;Q.prototype.darkOpacity=0;Q.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
+l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
+-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(Q,mxCylinder);Q.prototype.size=30;Q.prototype.darkOpacity=0;Q.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
c.end(),c.stroke())};mxCellRenderer.registerShape("note",Q);mxUtils.extend(d,Q);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*
@@ -2719,8 +2719,8 @@ c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c
"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,t));l=Math.min(l,.5*n,.5*t);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,t-l);c.arcTo(l,l,0,0,1,n-l,t);c.lineTo(A+l,t);c.arcTo(l,l,0,0,1,A,t-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=
-function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",L);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(K,mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=
+function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",K);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};C.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",C);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};G.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
0);c.lineTo(n,0);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",G);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
@@ -2900,7 +2900,7 @@ Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doub
["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(fa.prototype.size,!0,null,!0,fa.prototype.fixedSize),hexagon:wb(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:wb(Y.prototype.size,!1),display:wb(Ma.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,L.prototype.size,!0),loopLimit:Bb(.5,X.prototype.size,!0),trapezoid:rb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:rb(1,V.prototype.size,V.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+m.prototype.size,!1),card:Bb(.5,K.prototype.size,!0),loopLimit:Bb(.5,X.prototype.size,!0),trapezoid:rb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:rb(1,V.prototype.size,V.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.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=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[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=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ea=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
null==ea&&null!=l&&(ea=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ea){c=function(Ea,Na,Ja){Ea-=bb.x;var Ha=Na-bb.y;Na=(Xa*Ea-na*Ha)/(I*Xa-va*na);Ea=(va*Ea-I*Ha)/(va*na-I*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+I*Na,bb.y+va*Na),t.push(bb)),bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea)):(Ja&&(bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea),t.push(bb)),
@@ -2914,7 +2914,7 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))))
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))];ua.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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*(v+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};L.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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,
+.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};K.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,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*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2962,10 +2962,10 @@ window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.pa
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var z=!0,u=0;u<
-x.length&&z;u++)z=z&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var L=H.x,C=H.y;H=null;if(1==x.length&&z){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,z);null!=H&&(z=Math.round(p.snap(p.popupMenuHandler.triggerX/u-L)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-C)),p.cellsMoved(x,z-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+x.length&&z;u++)z=z&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var K=H.x,C=H.y;H=null;if(1==x.length&&z){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,z);null!=H&&(z=Math.round(p.snap(p.popupMenuHandler.triggerX/u-K)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-C)),p.cellsMoved(x,z-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var L=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==L||isNaN(L.nodeType)||H.setAttribute("placeholders",L.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
+null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var K=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==K||isNaN(K.nodeType)||H.setAttribute("placeholders",K.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
try{var z=p.getEditableCells(p.getSelectionCells());if(0==z.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<z.length;f++)g(z[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
@@ -2990,15 +2990,15 @@ d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new m
Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-
10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/
p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid",
-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
-K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled});
-K.isEnabled=E;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=E;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=E;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var Q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var z=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,z);(f&mxConstants.FONT_BOLD)==
+300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",
+function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
+L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});
+L.isEnabled=E;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=E;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=E;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+d+".html")});var Q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var z=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,z);(f&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?p.updateLabelElements(z,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(z,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(z,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<z.length;u++)0==p.model.getChildCount(z[u])&&p.autoSizeCell(z[u],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
@@ -3009,15 +3009,15 @@ g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles
mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=D.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,z=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)z+=u.x,g+=u.y,d=
p.getModel().getParent(d),u=p.getCellGeometry(d);z=Math.round(p.snap(p.popupMenuHandler.triggerX/x-z));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,z,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var z=g[x];if(p.getModel().isEdge(z)){var u=p.getCellGeometry(z);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[z])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(z,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var z=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,L,C,G,V){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(z),p.insertImage(u,H,L);else{var U=p.getSelectionCells();if(null!=u&&(0<u.length||0<U.length)){var Y=null;p.getModel().beginUpdate();try{if(0==U.length){U=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,L,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+0;x<g.length;x++){var z=g[x];if(p.getModel().isEdge(z)){var u=p.getCellGeometry(z);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[z])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(z,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
+g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var z=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,K,C,G,V){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(z),p.insertImage(u,H,K);else{var U=p.getSelectionCells();if(null!=u&&(0<u.length||0<U.length)){var Y=null;p.getModel().beginUpdate();try{if(0==U.length){U=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,K,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
var O=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(U,!0));U[0].geometry.x=O.x;U[0].geometry.y=O.y;null!=C&&k(U[0],C,G,V,p);Y=U;p.fireEvent(new mxEventObject("cellsInserted","cells",Y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,U);var qa=p.getCurrentCellStyle(U[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",U):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,U);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,U);if(null!=H&&null!=L)for(u=0;u<U.length;u++){var oa=U[u];if("0"!=p.getCurrentCellStyle(oa).expand){var aa=p.getModel().getGeometry(oa);null!=aa&&(aa=aa.clone(),aa.width=H,aa.height=L,p.getModel().setGeometry(oa,aa))}null!=C&&k(oa,C,G,V,p)}}finally{p.getModel().endUpdate()}null!=Y&&(p.setSelectionCells(Y),p.scrollCellToVisible(Y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=E;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(z,u,H){k(d,z,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
+null,U);if(null!=H&&null!=K)for(u=0;u<U.length;u++){var oa=U[u];if("0"!=p.getCurrentCellStyle(oa).expand){var aa=p.getModel().getGeometry(oa);null!=aa&&(aa=aa.clone(),aa.width=H,aa.height=K,p.getModel().setGeometry(oa,aa))}null!=C&&k(oa,C,G,V,p)}}finally{p.getModel().endUpdate()}null!=Y&&(p.setSelectionCells(Y),p.scrollCellToVisible(Y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=E;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(z,u,H){k(d,z,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=E;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,m,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
@@ -3026,25 +3026,25 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=D?this.mergeFile(D,b,e,m):this.reloadFile(b,
e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var K=[this.ui.diffPages(null!=m?m:p,E)],Q=this.ignorePatches(K);this.setShadowPages(E);if(Q)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};Q={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(E,Q);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(E)),z=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(Q)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+z,null,"mergeFile");return}if(null!=this.sync){var L=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==L||mxUtils.isEmptyObject(L)||K.push(L)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(V){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(V);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,V);else{var C=this.getCurrentUser(),G=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,V)}}catch(U){}}};
+DrawioFile.prototype.mergeFile=function(b,e,k,m){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var L=[this.ui.diffPages(null!=m?m:p,E)],Q=this.ignorePatches(L);this.setShadowPages(E);if(Q)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};Q={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
+m),g=this.ui.getHashValueForPages(E,Q);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(E)),z=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(Q)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+z,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var K=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==K||mxUtils.isEmptyObject(K)||L.push(K)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(V){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(V);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,V);else{var C=this.getCurrentUser(),G=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,V)}}catch(U){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var D=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var p=0;p<e.length;p++)this.ui.anonymizePatch(e[p]);var E=mxUtils.bind(this,function(g){var x=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
-25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+x+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==m?E(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==m?E(g):E(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",d=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(e).length;b=null;if(null!=e&&this.constructor==DriveFile&&400>f){for(p=0;p<e.length;p++)this.ui.anonymizePatch(e[p]);
-b=JSON.stringify(e);b=null!=b&&250>b.length?Graph.compress(b):null}EditorUi.logError("Checksum "+(null!=b?"Report":"Error")+" in "+D+" "+d,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+(null!=b?"-json_"+b:"")+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+d,action:D,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+
-"-size_"+this.getSize()})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");E="xml";0<f&&(E=d.substring(f));var g=null!=k?k.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()+" ("+E+")\nUser="+K+Q+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,k,m,D,p,E,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]);var d=mxUtils.bind(this,function(H){var K=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+K+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",z=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>z){for(Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]);
+u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var K=null!=u?"Report":"Error",C=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+K+" in "+D+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=L?
+"-rev_"+this.ui.hashValue(L):"")+(null!=C?"-latest_"+C:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:D,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),L=null!=E?this.ui.hashValue(E.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");E="xml";0<f&&(E=d.substring(f));var g=null!=k?k.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()+" ("+E+")\nUser="+L+Q+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+D+"\n\nData:\n"+p,m)}catch(x){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,D=m.getSelectionCells(),p=m.getViewState(),E=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,D=m.history.slice(),p=m.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var Q=E.foldingEnabled,d=E.mathEnabled,f=E.cellRenderer.redraw;E.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=D,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=E.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,D=m.history.slice(),p=m.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var Q=E.foldingEnabled,d=E.mathEnabled,f=E.cellRenderer.redraw;E.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=D,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=E.mathEnabled?
(this.ui.editor.updateGraphComponents(),E.refresh()):(Q!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,m,D,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",D,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3091,7 +3091,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,m,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,D)}catch(Q){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(Q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,Q);else{var E=this.getCurrentUser(),K=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,Q)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=m&&m(Q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,Q);else{var E=this.getCurrentUser(),L=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,Q)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=m&&m(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};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"))};
@@ -3100,10 +3100,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,D,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),Q=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,m,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),Q=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[z],"conflict",this.desc.lastModified!=z.lastModified);this.desc.lastModified==z.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(E,H,K,f);this.removeDraft()}catch(L){f(L)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(z){this.invalidFileHandle=!0;f(z)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){Q(d)}),m,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):Q(E)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(E,H,L,f);this.removeDraft()}catch(K){f(K)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(z){this.invalidFileHandle=!0;f(z)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){Q(d)}),m,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):Q(E)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(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.prototype.appName="diagrams.net";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"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];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.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3228,8 +3228,8 @@ ha.scale=la;xa="data:image/svg+xml;base64,"+xa;var sa=za.gridSize*ha.gridSteps*r
T&&T(Ca)}});Za.onerror=function(y){null!=T&&T(y)};ma&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Pa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(y){null!=T&&T(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(Ta,y),this.loadFonts(Pa)}catch(M){null!=T&&T(M)}}))}catch(y){null!=T&&T(y)}}),R,pa)}catch(Ta){null!=T&&T(Ta)}};
Editor.crcTable=[];for(var D=0;256>D;D++)for(var p=D,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[D]=p;Editor.updateCRC=function(q,F,R,W){for(var T=0;T<W;T++)q=Editor.crcTable[(q^F.charCodeAt(R+T))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,R=0;R<q.length;R++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(R))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,R,W,T){function ba(pa,za){var Ba=ta;ta+=za;return pa.substring(Ba,ta)}function ia(pa){pa=ba(pa,4);return pa.charCodeAt(3)+
(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(ba(q,4),"IHDR"!=ba(q,4))null!=T&&T();else{ba(q,17);T=q.substring(0,ta);do{var ma=ia(q);if("IDAT"==ba(q,4)){T=q.substring(0,ta-8);"pHYs"==F&&"dpi"==R?(R=Math.round(W/.0254),
-R=ra(R)+ra(R)+String.fromCharCode(1)):R=R+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,F,0,4);W=Editor.updateCRC(W,R,0,R.length);T+=ra(R.length)+F+R+ra(W^4294967295);T+=q.substring(ta-8,q.length);break}T+=q.substring(ta-8,ta-4+ma);ba(q,ma);ba(q,4)}while(ma);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor;
-ColorDialog.addRecentColor=function(q,F){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var R=null;null!=q.editor.graph.getModel().getParent(F)?R=F.getId():null!=q.currentPage&&(R=q.currentPage.getId());return R});
+R=ra(R)+ra(R)+String.fromCharCode(1)):R=R+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,F,0,4);W=Editor.updateCRC(W,R,0,R.length);T+=ra(R.length)+F+R+ra(W^4294967295);T+=q.substring(ta-8,q.length);break}T+=q.substring(ta-8,ta-4+ma);ba(q,ma);ba(q,4)}while(ma);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;
+ColorDialog.addRecentColor=function(q,F){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var R=null;null!=q.editor.graph.getModel().getParent(F)?R=F.getId():null!=q.currentPage&&(R=q.currentPage.getId());return R});
if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,R=F.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return R.shadowVisible},function(T){var ba=new ChangePageSetup(F);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible=
T;R.model.execute(ba)},{install:function(T){this.listener=function(){T(R.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));q.appendChild(W)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var F=this.editorUi,R=F.editor.graph;
@@ -3298,7 +3298,7 @@ return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCas
null);null!=R&&Graph.addFont(R,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(T){F=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(T){F=null});this.isMouseInsertPoint=function(){return null!=F};var R=this.getInsertPoint;
this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):R.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var ba=this.graph.getCellStyle(T);if(null!=ba&&"rack"==ba.childLayout){var ia=new mxStackLayout(this.graph,!1);ia.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ia.marginLeft=ba.marginLeft||0;ia.marginRight=ba.marginRight||0;ia.marginTop=ba.marginTop||
-0;ia.marginBottom=ba.marginBottom||0;ia.allowGaps=ba.allowGaps||0;ia.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ia.resizeParent=!1;ia.fill=!0;return ia}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var L=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(L.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,F,R,W,T,ba,ia,ra,ta,ma,
+0;ia.marginBottom=ba.marginBottom||0;ia.allowGaps=ba.allowGaps||0;ia.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ia.resizeParent=!1;ia.fill=!0;return ia}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var K=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(K.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,F,R,W,T,ba,ia,ra,ta,ma,
pa){C.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,R){function W(){for(var Aa=ia.getSelectionCells(),Ka=[],Da=0;Da<Aa.length;Da++)ia.isCellVisible(Aa[Da])&&Ka.push(Aa[Da]);ia.setSelectionCells(Ka)}function T(Aa){ia.setHiddenTags(Aa?[]:ra.slice());W();ia.refresh()}function ba(Aa,
Ka){ma.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Ra=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Qa=0;Qa<Aa.length;Qa++)(function(Ta){var Za=0>mxUtils.indexOf(ia.hiddenTags,Ta),Pa=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var M=document.createElement("img");M.setAttribute("src",
Za?Editor.visibleImage:Editor.hiddenImage);M.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(M,Za?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(F||Editor.isDarkMode())M.style.filter="invert(100%)";y.appendChild(M);mxEvent.addListener(M,"click",function(S){mxEvent.isShiftDown(S)?T(0<=mxUtils.indexOf(ia.hiddenTags,Ta)):(ia.toggleHiddenTag(Ta),W(),ia.refresh());mxEvent.consume(S)});Pa.appendChild(y);y=document.createElement("td");
@@ -3383,11 +3383,11 @@ function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.u
this.shadowVisible)}}else da.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ja=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ja.getContext("2d").drawImage(ka,
0,0);var q=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.1";EditorUi.compactUi="atlas"!=uiTheme;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))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,z,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var L=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";z=null!=z?z:Error(d);(new Image).src=L+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var K=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";z=null!=z?z:Error(d);(new Image).src=K+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
encodeURIComponent(x):"")+(null!=z&&null!=z.stack?"&stack="+encodeURIComponent(z.stack):"")}}catch(C){}try{H||null==window.console||console.error(u,d,f,g,x,z)}catch(C){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
@@ -3397,9 +3397,9 @@ f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.leng
EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(z){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var z=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=z.spin;z.spin=function(L,C){var G=!1;this.active||(u.call(this,L),this.active=!0,null!=C&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var z=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=z.spin;z.spin=function(K,C){var G=!1;this.active||(u.call(this,K),this.active=!0,null!=C&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),G.innerHTML=C,L.appendChild(G),z.status=G),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(L,C)}));this.stop();return V}),G=!0);return G};var H=z.stop;z.stop=function(){H.call(this);this.active=!1;null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status);z.status=null};z.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),G.innerHTML=C,K.appendChild(G),z.status=G),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(K,C)}));this.stop();return V}),G=!0);return G};var H=z.stop;z.stop=function(){H.call(this);this.active=!1;null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status);z.status=null};z.pause=function(){return function(){}};
return z};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,z=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var H=z.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&z.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&z.movePage(H,0)};if(39==u.keyCode)return function(){H<z.pages.length-1&&z.movePage(H,
@@ -3408,75 +3408,75 @@ x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isCo
""))}else{var z=mxUtils.parseXml(d),u=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var z=x.length-1;0<=z;z--){var u=this.updatePageRoot(new DiagramPage(x[z]));null==u.getName()&&
u.setName(mxResources.get("pageWithNumber",[z+1]));f.model.execute(new ChangePage(this,u,0==z?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(z=0;z<g.length;z++)f.model.execute(new ChangePage(this,g[z],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,z,u,H,L,C,G,V){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;C=null!=C?C:!0;var U=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Y="_blank";else U=Y=x;if(null==d)return"";var O=d;if("mxfile"!=O.nodeName.toLowerCase()){if(V){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
+if(null!=g)for(z=0;z<g.length;z++)f.model.execute(new ChangePage(this,g[z],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,z,u,H,K,C,G,V){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;C=null!=C?C:!0;var U=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Y="_blank";else U=Y=x;if(null==d)return"";var O=d;if("mxfile"!=O.nodeName.toLowerCase()){if(V){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));O=Graph.compress(qa);if(Graph.decompress(O)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,O)}O=d.ownerDocument.createElement("mxfile");O.appendChild(qa)}G?(O=O.cloneNode(!0),O.removeAttribute("modified"),O.removeAttribute("host"),O.removeAttribute("agent"),O.removeAttribute("etag"),O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"),
O.removeAttribute("type")):(O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"),O.removeAttribute("pages"),O.removeAttribute("type"),mxClient.IS_CHROMEAPP?O.setAttribute("host","Chrome"):EditorUi.isElectronApp?O.setAttribute("host","Electron"):O.setAttribute("host",window.location.hostname),O.setAttribute("modified",(new Date).toISOString()),O.setAttribute("agent",navigator.appVersion),O.setAttribute("version",EditorUi.VERSION),O.setAttribute("etag",Editor.guid()),
d=null!=g?g.getMode():this.mode,null!=d&&O.setAttribute("type",d),1<O.getElementsByTagName("diagram").length&&null!=this.pages&&O.setAttribute("pages",this.pages.length));V=V?mxUtils.getPrettyXml(O):mxUtils.getXml(O);if(!u&&!z&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))V=this.getHtml2(mxUtils.getXml(O),f,null!=g?g.getTitle():null,Y,U);else if(u||!z&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),V=this.getEmbeddedSvg(V,f,
-x,null,L,C,U);return V};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var z=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(C){var G=C.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&C.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?C=
-C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(G)));z.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(z)),z=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
-L,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(L));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
-null!=u.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,L,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(L))));d(H)}return z};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var z=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?g.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?g.push(String.fromCharCode(65+Math.round(25*
+x,null,K,C,U);return V};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var z=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(C){var G=C.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&C.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?C=
+C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(G)));z.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(z)),z=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var K=new mxCodec(mxUtils.createXmlDocument());K=K.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
+K,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(K));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
+null!=u.viewState.backgroundImage.originalSrc&&(K=new mxCodec(mxUtils.createXmlDocument()),K=K.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,K,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(K))));d(H)}return z};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var z=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?g.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?g.push(String.fromCharCode(65+Math.round(25*
Math.random()))):z.toUpperCase()!=z?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var z=d[EditorUi.DIFF_UPDATE][x];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(u){var H=z.cells[u];if(null!=H){for(var L in H)null!=H[L].value&&(H[L].value="["+H[L].value.length+"]"),null!=H[L].xmlValue&&(H[L].xmlValue="["+H[L].xmlValue.length+"]"),null!=H[L].style&&(H[L].style=
-"["+H[L].style.length+"]"),mxUtils.isEmptyObject(H[L])&&delete H[L];mxUtils.isEmptyObject(H)&&delete z.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var z=d[EditorUi.DIFF_UPDATE][x];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(u){var H=z.cells[u];if(null!=H){for(var K in H)null!=H[K].value&&(H[K].value="["+H[K].value.length+"]"),null!=H[K].xmlValue&&(H[K].xmlValue="["+H[K].xmlValue.length+"]"),null!=H[K].style&&(H[K].style=
+"["+H[K].style.length+"]"),mxUtils.isEmptyObject(H[K])&&delete H[K];mxUtils.isEmptyObject(H)&&delete z.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,z,u,H,
-L,C,G,V){z=null!=z?z:!0;u=null!=u?u:!1;var U=this.editor.graph;if(f||!d&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var Y=null!=U.themes&&"darkTheme"==U.defaultThemeName;G=!1;if(Y||null!=this.pages&&this.currentPage!=this.pages[0]){var O=U.getGlobalVariable;U=this.createTemporaryGraph(Y?U.getDefaultStylesheet():U.getStylesheet());U.setBackgroundImage=this.editor.graph.setBackgroundImage;U.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?U.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=qa.viewState&&null!=qa.viewState&&U.setBackgroundImage(qa.viewState.backgroundImage);U.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(z,u,G,V);C=null!=C?C:this.getCurrentFile();d=this.createFileData(H,U,C,window.location.href,d,f,g,x,z,L,G);U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,z,u){u=null!=u?u:!0;var H=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var C=f.view.scale;u=Math.floor(H.x/C-f.view.translate.x);C=Math.floor(H.y/C-f.view.translate.y);H=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(L=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",C)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
+K,C,G,V){z=null!=z?z:!0;u=null!=u?u:!1;var U=this.editor.graph;if(f||!d&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var Y=null!=U.themes&&"darkTheme"==U.defaultThemeName;G=!1;if(Y||null!=this.pages&&this.currentPage!=this.pages[0]){var O=U.getGlobalVariable;U=this.createTemporaryGraph(Y?U.getDefaultStylesheet():U.getStylesheet());U.setBackgroundImage=this.editor.graph.setBackgroundImage;U.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?U.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=qa.viewState&&null!=qa.viewState&&U.setBackgroundImage(qa.viewState.backgroundImage);U.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(z,u,G,V);C=null!=C?C:this.getCurrentFile();d=this.createFileData(H,U,C,window.location.href,d,f,g,x,z,K,G);U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,x,z,u){u=null!=u?u:!0;var H=null,K=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var C=f.view.scale;u=Math.floor(H.x/C-f.view.translate.x);C=Math.floor(H.y/C-f.view.translate.y);H=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(K=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",C)}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!=x&&d.setAttribute("edit",x));null!=z&&(z=z.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+K+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&amp;"));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==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&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);if(null!=urlParams["layer-ids"])try{var z=urlParams["layer-ids"].split(" ");f={};for(x=0;x<z.length;x++)f[z[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var L=H[x];u.setVisible(L,f[L.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+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);if(null!=urlParams["layer-ids"])try{var z=urlParams["layer-ids"].split(" ");f={};for(x=0;x<z.length;x++)f[z[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var K=H[x];u.setVisible(K,f[K.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(d){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(".")));!d&&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(d,f,g,x,z,u,H,L,C,G,V,U){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename("remoteSvg"==d?!1:!z),O=Y+("xml"==d||"pdf"==d&&V?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,z,null,null,null,f);this.saveData(O,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(O,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)O=Y+".png";else if("jpeg"==d)O=Y+".jpg";else if("remoteSvg"==d){O=Y+".svg";d="svg";var oa=parseInt(C);"string"===typeof L&&0<L.indexOf("%")&&(L=parseInt(L)/100);if(0<oa){var aa=this.editor.graph,ca=aa.getGraphBounds();var fa=Math.ceil(ca.width*L/aa.view.scale+2*oa);var J=Math.ceil(ca.height*L/aa.view.scale+2*oa)}}this.saveRequest(O,d,mxUtils.bind(this,function(ka,q){try{var F=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var R=this.createDownloadRequest(ka,d,x,q,H,z,L,C,
+function(d,f,g,x,z,u,H,K,C,G,V,U){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename("remoteSvg"==d?!1:!z),O=Y+("xml"==d||"pdf"==d&&V?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,z,null,null,null,f);this.saveData(O,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(O,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
+d)O=Y+".png";else if("jpeg"==d)O=Y+".jpg";else if("remoteSvg"==d){O=Y+".svg";d="svg";var oa=parseInt(C);"string"===typeof K&&0<K.indexOf("%")&&(K=parseInt(K)/100);if(0<oa){var aa=this.editor.graph,ca=aa.getGraphBounds();var fa=Math.ceil(ca.width*K/aa.view.scale+2*oa);var J=Math.ceil(ca.height*K/aa.view.scale+2*oa)}}this.saveRequest(O,d,mxUtils.bind(this,function(ka,q){try{var F=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var R=this.createDownloadRequest(ka,d,x,q,H,z,K,C,
G,V,U,fa,J);this.editor.graph.pageVisible=F;return R}catch(W){this.handleError(W)}}))}else{var Z=null,P=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==d){var da=this.editor.graph.background;if(H||da==mxConstants.NONE)da=null;var ja=this.editor.graph.getSvg(da,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ja);
-this.editor.convertImages(ja,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();P(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else O=Y+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();P(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){var O=this.editor.graph,qa=O.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
+this.editor.convertImages(ja,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();P(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else O=Y+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();P(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){var O=this.editor.graph,qa=O.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
null,null,!1,"pdf"==f);var oa="",aa="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=V?aa="&from="+V.from+"&to="+V.to:0==u&&(aa="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=O.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=u&&u!=mxConstants.NONE||
-(u="#ffffff"):u=mxConstants.NONE;z={globalVars:O.getExportVariables()};C&&(z.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+aa+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(null!=H?"&scale="+H:"")+(null!=L?"&border="+
-L:"")+(U&&isFinite(U)?"&w="+U:"")+(Y&&isFinite(Y)?"&h="+Y:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,z=mxUtils.bind(this,function(H){var L=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<L.length&&(L+="\n"),L+=H);H=new LocalFile(this,"csv"!=d.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
-"csv"==d.format&&this.importCsv(L,mxUtils.bind(this,function(Y){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,G=null,V=mxUtils.bind(this,function(){var Y=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Y===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):
+(u="#ffffff"):u=mxConstants.NONE;z={globalVars:O.getExportVariables()};C&&(z.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+aa+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(null!=H?"&scale="+H:"")+(null!=K?"&border="+
+K:"")+(U&&isFinite(U)?"&w="+U:"")+(Y&&isFinite(Y)?"&h="+Y:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,z=mxUtils.bind(this,function(H){var K=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<K.length&&(K+="\n"),K+=H);H=new LocalFile(this,"csv"!=d.format&&0<K.length?K:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
+"csv"==d.format&&this.importCsv(K,mxUtils.bind(this,function(Y){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,G=null,V=mxUtils.bind(this,function(){var Y=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Y===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):
this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(V,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();V()}));U();V()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=d.url;if(/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))u=this.editor.getProxiedUrl(u);this.editor.loadUrl(u,
mxUtils.bind(this,function(H){z(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else z("")};EditorUi.prototype.updateDiagram=function(d){function f(J){var Z=new mxCellOverlay(J.image||z.warningImage,J.tooltip,J.align,J.valign,J.offset);Z.addListener(mxEvent.CLICK,function(P,da){x.alert(J.tooltip)});return Z}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var z=this.editor.graph,u=z.getModel();u.beginUpdate();var H=
-null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var L=u.getCell(d.getAttribute("id"));if(null!=L){try{var C=d.getAttribute("value");if(null!=C){var G=mxUtils.parseXml(C).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(L,G);else for(var V=G.attributes,U=0;U<V.length;U++)z.setAttributeForCell(L,V[U].nodeName,0<V[U].nodeValue.length?V[U].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+L.id+": "+J)}try{var Y=d.getAttribute("style");
-null!=Y&&z.model.setStyle(L,Y)}catch(J){null!=window.console&&console.log("Error in style for "+L.id+": "+J)}try{var O=d.getAttribute("icon");if(null!=O){var qa=0<O.length?JSON.parse(O):null;null!=qa&&qa.append||z.removeCellOverlays(L);null!=qa&&z.addCellOverlay(L,f(qa))}}catch(J){null!=window.console&&console.log("Error in icon for "+L.id+": "+J)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var aa=z.getCellGeometry(L);if(null!=aa){aa=aa.clone();for(key in oa){var ca=parseFloat(oa[key]);
-"dx"==key?aa.x+=ca:"dy"==key?aa.y+=ca:"dw"==key?aa.width+=ca:"dh"==key?aa.height+=ca:aa[key]=parseFloat(oa[key])}z.model.setGeometry(L,aa)}}}catch(J){null!=window.console&&console.log("Error in icon for "+L.id+": "+J)}}}else if("model"==d.nodeName){for(var fa=d.firstChild;null!=fa&&fa.nodeType!=mxConstants.NODETYPE_ELEMENT;)fa=fa.nextSibling;null!=fa&&(new mxCodec(d.firstChild)).decode(fa,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(z.view.scale=parseFloat(d.getAttribute("scale"))),
+null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var K=u.getCell(d.getAttribute("id"));if(null!=K){try{var C=d.getAttribute("value");if(null!=C){var G=mxUtils.parseXml(C).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(K,G);else for(var V=G.attributes,U=0;U<V.length;U++)z.setAttributeForCell(K,V[U].nodeName,0<V[U].nodeValue.length?V[U].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+K.id+": "+J)}try{var Y=d.getAttribute("style");
+null!=Y&&z.model.setStyle(K,Y)}catch(J){null!=window.console&&console.log("Error in style for "+K.id+": "+J)}try{var O=d.getAttribute("icon");if(null!=O){var qa=0<O.length?JSON.parse(O):null;null!=qa&&qa.append||z.removeCellOverlays(K);null!=qa&&z.addCellOverlay(K,f(qa))}}catch(J){null!=window.console&&console.log("Error in icon for "+K.id+": "+J)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var aa=z.getCellGeometry(K);if(null!=aa){aa=aa.clone();for(key in oa){var ca=parseFloat(oa[key]);
+"dx"==key?aa.x+=ca:"dy"==key?aa.y+=ca:"dw"==key?aa.width+=ca:"dh"==key?aa.height+=ca:aa[key]=parseFloat(oa[key])}z.model.setGeometry(K,aa)}}}catch(J){null!=window.console&&console.log("Error in icon for "+K.id+": "+J)}}}else if("model"==d.nodeName){for(var fa=d.firstChild;null!=fa&&fa.nodeType!=mxConstants.NODETYPE_ELEMENT;)fa=fa.nextSibling;null!=fa&&(new mxCodec(d.firstChild)).decode(fa,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(z.view.scale=parseFloat(d.getAttribute("scale"))),
d.hasAttribute("dx")||d.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=
-x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var z=new Date;g=z.getFullYear();x=z.getMonth()+1;var u=z.getDate(),H=z.getHours(),L=z.getMinutes();z=z.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+L+"-"+z))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),
+x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var z=new Date;g=z.getFullYear();x=z.getMonth()+1;var u=z.getDate(),H=z.getHours(),K=z.getMinutes();z=z.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+K+"-"+z))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),
g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var z=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!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();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=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_"+u})}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(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(L){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+
-H.stack})}catch(L){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||z():z()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);
-var H=d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var L=z.encode(x);this.editor.graph.saveViewState(d[u].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");H.appendChild(L);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(C,G,V,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==C.nodeName&&
+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(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(K){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+
+H.stack})}catch(K){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||z():z()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);
+var H=d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var K=z.encode(x);this.editor.graph.saveViewState(d[u].viewState,K,!0);K.removeAttribute("pageWidth");K.removeAttribute("pageHeight");H.appendChild(K);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(C,G,V,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==C.nodeName&&
"previous"==G?null:V:Math.round(V)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var z=0;z<d.attributes.length;z++){var u=d.attributes[z].name,H=null!=f?f(d,u,d.attributes[z].value,!0):d.attributes[z].value;null!=H&&(x^=this.hashValue(u,
f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(z=0;z<d.childNodes.length;z++)x=(x<<5)-x+this.hashValue(d.childNodes[z],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(z=0;z<d.length;z++)f=(f<<5)-f+d.charCodeAt(z)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,z,u,H){};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){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};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 f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var 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:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(fa,J){0==fa.length&&d.isEditable()?
-(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),J.appendChild(u)):this.addLibraryEntries(fa,J)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var L=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(fa){H(f,fa)}));this.repositionLibrary(z);var C=L.parentNode.previousSibling;x=C.getAttribute("title");
+(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),J.appendChild(u)):this.addLibraryEntries(fa,J)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var K=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(fa){H(f,fa)}));this.repositionLibrary(z);var C=K.parentNode.previousSibling;x=C.getAttribute("title");
null!=x&&0<x.length&&".scratchpad"!=d.title&&C.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";C.style.position="relative";var V=document.createElement("img");V.className="geAdaptiveAsset";V.setAttribute("src",Editor.crossImage);V.setAttribute("title",mxResources.get("close"));V.setAttribute("valign","absmiddle");V.setAttribute("border",
"0");V.style.position="relative";V.style.top="2px";V.style.width="14px";V.style.cursor="pointer";V.style.margin="0 3px";var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(V),mxEvent.addListener(V,"click",mxUtils.bind(this,function(fa){if(!mxEvent.isConsumed(fa)){var J=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(fa)}}));if(d.isEditable()){var Y=
-this.editor.graph,O=null,qa=mxUtils.bind(this,function(fa){this.showLibraryDialog(d.getTitle(),L,f,d,d.getMode());mxEvent.consume(fa)}),oa=mxUtils.bind(this,function(fa){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=V.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),C.style.paddingRight=18*G.childNodes.length+
+this.editor.graph,O=null,qa=mxUtils.bind(this,function(fa){this.showLibraryDialog(d.getTitle(),K,f,d,d.getMode());mxEvent.consume(fa)}),oa=mxUtils.bind(this,function(fa){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=V.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),C.style.paddingRight=18*G.childNodes.length+
"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&(O.parentNode.removeChild(O),C.style.paddingRight=18*G.childNodes.length+"px")})):null==U&&(U=V.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),G.insertBefore(U,G.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(J){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(C.style.paddingRight=
-18*G.childNodes.length+"px",U.parentNode.removeChild(U),U=null)});mxEvent.consume(J)})),C.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(fa,J,Z,P){fa=Y.cloneCells(mxUtils.sortCells(Y.model.getTopmostCells(fa)));for(var da=0;da<fa.length;da++){var ja=Y.getCellGeometry(fa[da]);null!=ja&&ja.translate(-J.x,-J.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(fa,J.width,J.height,P||"",!0,null,!1));fa={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(fa))),
+18*G.childNodes.length+"px",U.parentNode.removeChild(U),U=null)});mxEvent.consume(J)})),C.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(fa,J,Z,P){fa=Y.cloneCells(mxUtils.sortCells(Y.model.getTopmostCells(fa)));for(var da=0;da<fa.length;da++){var ja=Y.getCellGeometry(fa[da]);null!=ja&&ja.translate(-J.x,-J.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(fa,J.width,J.height,P||"",!0,null,!1));fa={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(fa))),
w:J.width,h:J.height};null!=P&&(fa.title=P);f.push(fa);oa(Z);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),ca=mxUtils.bind(this,function(fa){if(Y.isSelectionEmpty())Y.getRubberband().isActive()?(Y.getRubberband().execute(fa),Y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=Y.getSelectionCells(),Z=Y.view.getBounds(J),P=Y.view.scale;Z.x/=P;Z.y/=P;Z.width/=P;Z.height/=P;Z.x-=Y.view.translate.x;
-Z.y-=Y.view.translate.y;aa(J,Z)}mxEvent.consume(fa)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler.first&&(Y.graphHandler.suspend(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor="#f1f3f4",L.style.cursor="copy",Y.panningManager.stop(),Y.autoScroll=!1,mxEvent.consume(fa))}),mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler&&
-(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,Y.panningManager.stop(),Y.graphHandler.reset(),Y.isMouseDown=!1,Y.autoScroll=!0,ca(fa),mxEvent.consume(fa))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.graphHandler.first&&(Y.graphHandler.resume(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",Y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,
-"dragover",mxUtils.bind(this,function(fa){L.style.backgroundColor="#f1f3f4";fa.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(fa){L.style.cursor="";L.style.backgroundColor="";0<fa.dataTransfer.files.length&&this.importFiles(fa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,Z,P,da,ja,ka,q,F,R){if(null!=J&&"image/"==Z.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+Z.y-=Y.view.translate.y;aa(J,Z)}mxEvent.consume(fa)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler.first&&(Y.graphHandler.suspend(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="#f1f3f4",K.style.cursor="copy",Y.panningManager.stop(),Y.autoScroll=!1,mxEvent.consume(fa))}),mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler&&
+(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,Y.panningManager.stop(),Y.graphHandler.reset(),Y.isMouseDown=!1,Y.autoScroll=!0,ca(fa),mxEvent.consume(fa))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(fa){Y.isMouseDown&&null!=Y.graphHandler.first&&(Y.graphHandler.resume(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",Y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,
+"dragover",mxUtils.bind(this,function(fa){K.style.backgroundColor="#f1f3f4";fa.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(fa){K.style.cursor="";K.style.backgroundColor="";0<fa.dataTransfer.files.length&&this.importFiles(fa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,Z,P,da,ja,ka,q,F,R){if(null!=J&&"image/"==Z.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(J),J=[new mxCell("",new mxGeometry(0,0,ja,ka),J)],J[0].vertex=!0,aa(J,new mxRectangle(0,0,ja,ka),fa,mxEvent.isAltDown(fa)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var W=!1,T=mxUtils.bind(this,function(ba,ia){null!=ba&&"application/pdf"==ia&&(ia=Editor.extractGraphModelFromPdf(ba),null!=ia&&0<ia.length&&(ba=ia));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=
-JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,L);f=f.concat(ra);oa(fa);this.spinner.stop();W=!0}catch(za){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var ma=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(ma);aa(ma,new mxRectangle(0,0,pa.width,pa.height),fa)}W=!0}catch(za){null!=window.console&&console.log("error in drop handler:",za)}W||(this.spinner.stop(),
+JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,K);f=f.concat(ra);oa(fa);this.spinner.stop();W=!0}catch(za){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var ma=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(ma);aa(ma,new mxRectangle(0,0,pa.width,pa.height),fa)}W=!0}catch(za){null!=window.console&&console.log("error in drop handler:",za)}W||(this.spinner.stop(),
this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=R&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(R,function(ba){T(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,q)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?T(ba.responseText,
-"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(J,Z)}}));fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(L,"dragleave",function(fa){L.style.cursor="";L.style.backgroundColor="";fa.stopPropagation();fa.preventDefault()}));V=V.cloneNode(!1);V.setAttribute("src",Editor.editImage);V.setAttribute("title",
-mxResources.get("edit"));G.insertBefore(V,G.firstChild);mxEvent.addListener(V,"click",qa);mxEvent.addListener(L,"dblclick",function(fa){mxEvent.getSource(fa)==L&&qa(fa)});x=V.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",ca);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText=
+"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(J,Z)}}));fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"dragleave",function(fa){K.style.cursor="";K.style.backgroundColor="";fa.stopPropagation();fa.preventDefault()}));V=V.cloneNode(!1);V.setAttribute("src",Editor.editImage);V.setAttribute("title",
+mxResources.get("edit"));G.insertBefore(V,G.firstChild);mxEvent.addListener(V,"click",qa);mxEvent.addListener(K,"dblclick",function(fa){mxEvent.getSource(fa)==K&&qa(fa)});x=V.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",ca);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText=
"color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(fa){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(fa)})),G.insertBefore(x,G.firstChild))}C.appendChild(G);C.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var x=d[g],z=x.data;if(null!=z){z=this.convertDataUri(z);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+z,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(z=this.stringToCells(Graph.decompress(x.xml)),0<z.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(z,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=
@@ -3486,28 +3486,28 @@ rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",start
f,g,x,z,u,H){d=new ImageDialog(this,d,f,g,x,z,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,z){d=new LibraryDialog(this,
d,f,g,x,z);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");
d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,
-"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,z,u,H){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,
-d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(O){}if(null!=C||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),V=null;f=null!=f?f:mxResources.get("error");if(null!=C){null!=C.retry&&(G=mxResources.get("cancel"),V=function(){L();C.retry()});if(404==C.code||404==C.status||403==C.code){H=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,z,u,H){var K=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,
+d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(O){}if(null!=C||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),V=null;f=null!=f?f:mxResources.get("error");if(null!=C){null!=C.retry&&(G=mxResources.get("cancel"),V=function(){K();C.retry()});if(404==C.code||404==C.status||403==C.code){H=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var U=null!=z?null:null!=u?u: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==C.code||404==C.status)){U="#U"==U.substring(0,
2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);this.handleError(d,f,g,x,z)}),V,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){ca.innerText="";for(var fa=0;fa<qa.length;fa++){var J=document.createElement("option");mxUtils.write(J,qa[fa].displayName);J.value=fa;ca.appendChild(J);J=document.createElement("option");J.innerHTML=
"&nbsp;&nbsp;&nbsp;";mxUtils.write(J,"<"+qa[fa].email+">");J.setAttribute("disabled","disabled");ca.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=qa.length;ca.appendChild(J)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),aa=document.createElement("span");aa.style.marginTop="6px";mxUtils.write(aa,mxResources.get("changeUser")+": ");oa.appendChild(aa);var ca=document.createElement("select");ca.style.width="200px";O();mxEvent.addListener(ca,
"change",mxUtils.bind(this,function(){var fa=ca.value,J=qa.length!=fa;J&&this.drive.setUser(qa[fa]);this.drive.authorize(J,mxUtils.bind(this,function(){J||(qa=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));oa.appendChild(ca);oa=new CustomDialog(this,oa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=
g&&g()}),480,150);return}}null!=C.message?H=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name):mxUtils.htmlEntities(C.message):null!=C.response&&null!=C.response.error?H=mxUtils.htmlEntities(C.response.error):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):C.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof C&&0<C.length&&(H=mxUtils.htmlEntities(C)))}var Y=u=null;null!=C&&null!=C.helpLink?(u=
mxResources.get("help"),Y=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+C.ownerEmail+")"),Y=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))}));this.showError(f,H,G,g,V,null,null,u,Y,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);
-this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,z,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,z,null,null,null,null,L);this.showDialog(d.container,340,46+L,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var z=!1;if(!(this.bannerShowing||this["hideBanner"+d]||
+this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,z,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,z,null,null,null,null,K);this.showDialog(d.container,340,46+K,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var z=!1;if(!(this.bannerShowing||this["hideBanner"+d]||
isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(u.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition",
"all 1s ease");u.className="geBtn gePrimaryBtn";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;";u.appendChild(z);z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));z.setAttribute("border","0");z.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-u.appendChild(z);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var L=document.createElement("label");L.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(L,mxResources.get("doNotShowAgain"));f.appendChild(L);
+u.appendChild(z);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var K=document.createElement("label");K.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(K,mxResources.get("doNotShowAgain"));f.appendChild(K);
u.style.paddingBottom="30px";u.appendChild(f)}var C=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(z,"click",mxUtils.bind(this,function(V){mxEvent.consume(V);C()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){C()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(V){var U=mxEvent.getSource(V);U!=H&&U!=L?(null!=g&&g(),C(),mxEvent.consume(V)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,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.isExportToCanvas=
+function(){C()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(V){var U=mxEvent.getSource(V);U!=H&&U!=K?(null!=g&&g(),C(),mxEvent.consume(V)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,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.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,z){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,
f,g,z);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!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,f){d=new TextareaDialog(this,d,f,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,f,g,x,z,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),
-g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(L?parseInt(L[2],10):
+g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var K=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(K?parseInt(K[2],10):
!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(C){}}else this.createEchoRequest(d,f,g,x,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,z,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
-g?"&mime="+g:"")+(null!=z?"&format="+z:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),z=Array(x),u=0;u<x;++u){for(var H=1024*u,L=Math.min(H+1024,g),C=Array(L-H),G=0;H<L;++G,++H)C[G]=d[H].charCodeAt(0);z[u]=new Uint8Array(C)}return new Blob(z,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,z,u,H,L){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=
+g?"&mime="+g:"")+(null!=z?"&format="+z:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),z=Array(x),u=0;u<x;++u){for(var H=1024*u,K=Math.min(H+1024,g),C=Array(K-H),G=0;H<K;++G,++H)C[G]=d[H].charCodeAt(0);z[u]=new Uint8Array(C)}return new Blob(z,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,z,u,H,K){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=
z&&(!mxClient.IS_IOS||!navigator.standalone);z=this.getServiceCount(u);isLocalStorage&&z++;var C=4>=z?2:6<z?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,V){try{if("_blank"==V)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var U=new EmbedDialog(this,d);this.showDialog(U.container,450,240,!0,!0);U.init()}else{var Y=window.open("about:blank");null==Y?mxUtils.popup(d,!0):(Y.document.write("<pre>"+mxUtils.htmlEntities(d,
-!1)+"</pre>"),Y.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(d,G,g,x,null,L):null!=G&&0<G.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(d,G,g,x,V,O)}catch(qa){this.handleError(qa)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<z,C,d,g,x);u=this.isServices(z)?z>C?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=
+!1)+"</pre>"),Y.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(d,G,g,x,null,K):null!=G&&0<G.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(d,G,g,x,V,O)}catch(qa){this.handleError(qa)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<z,C,d,g,x);u=this.isServices(z)?z>C?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=
function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
@@ -3518,108 +3518,108 @@ Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListen
this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this);
else{this.exportDialog=document.createElement("div");var u=g.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,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(L){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border","0");L.setAttribute("src",C);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",z);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,z){this.isLocalFileSave()?
-this.saveLocalFile(g,d,x,z,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,z,f,H)}),g,z,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,z,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var L=this.getServiceCount(!1);isLocalStorage&&L++;var C=4>=L?2:6<L?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,V){if("_blank"==V||null!=G&&0<G.length){var U=g("_blank"==V?null:G,V==App.MODE_DEVICE||"download"==V||null==V||"_blank"==V?"0":"1");
+function(K){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(K,null,"png");K=document.createElement("img");K.style.maxWidth="140px";K.style.maxHeight="140px";K.style.cursor="pointer";K.style.backgroundColor="white";K.setAttribute("title",mxResources.get("openInNewWindow"));K.setAttribute("border","0");K.setAttribute("src",C);this.exportDialog.appendChild(K);mxEvent.addListener(K,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",z);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,z){this.isLocalFileSave()?
+this.saveLocalFile(g,d,x,z,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,z,f,H)}),g,z,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,z,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var K=this.getServiceCount(!1);isLocalStorage&&K++;var C=4>=K?2:6<K?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,V){if("_blank"==V||null!=G&&0<G.length){var U=g("_blank"==V?null:G,V==App.MODE_DEVICE||"download"==V||null==V||"_blank"==V?"0":"1");
null!=U&&(V==App.MODE_DEVICE||"download"==V||"_blank"==V?U.simulate(document,"_blank"):this.pickFolder(V,mxUtils.bind(this,function(Y){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.spinner.spin(document.body,mxResources.get("saving"))&&U.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=U.getStatus()&&299>=U.getStatus())try{this.exportFile(U.getText(),G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(O){this.spinner.stop();this.handleError(O)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<L,C,x,u,z);L=this.isServices(L)?4<L?390:280:160;this.showDialog(d.container,420,L,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,z,u){};EditorUi.prototype.pickFolder=function(d,
-f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,z,u,H,L,C,G,V,U,Y,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=V?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(oa,d,H,L,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Y,V,U);x&&this.editor.graph.addSvgShadow(aa);
+function(O){this.spinner.stop();this.handleError(O)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<K,C,x,u,z);K=this.isServices(K)?4<K?390:280:160;this.showDialog(d.container,420,K,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,z,u){};EditorUi.prototype.pickFolder=function(d,
+f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,z,u,H,K,C,G,V,U,Y,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=V?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(oa,d,H,K,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Y,V,U);x&&this.editor.graph.addSvgShadow(aa);
var ca=this.getBaseFilename()+(z?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});var fa=mxUtils.bind(this,function(Z){this.spinner.stop();z&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,C,null,null,null,!1));O(Graph.xmlDeclaration+"\n"+(z?
Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(aa);var J=mxUtils.bind(this,function(Z){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,fa,this.thumbImageCache)):fa(Z)});Y?this.embedFonts(aa,J):(this.editor.addFontCss(aa),J(aa))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,z,u,H){return this.addCheckbox(d,g,x,z,u,H,!0,f)};EditorUi.prototype.addCheckbox=
-function(d,f,g,x,z,u,H,L){u=null!=u?u:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();C.id=H;null!=L&&C.setAttribute("name",L);g&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);x&&C.setAttribute("disabled","disabled");u&&(d.appendChild(C),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),z||mxUtils.br(d));return C};EditorUi.prototype.addEditButton=
+function(d,f,g,x,z,u,H,K){u=null!=u?u:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();C.id=H;null!=K&&C.setAttribute("name",K);g&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);x&&C.setAttribute("disabled","disabled");u&&(d.appendChild(C),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),z||mxUtils.br(d));return C};EditorUi.prototype.addEditButton=
function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),z="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));
-u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var H=new FilenameDialog(this,z,mxResources.get("ok"),function(L){null!=L?z=L:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",
-mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":z:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var L=document.createElement("div");L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(L.style.border=
-"1px solid black",L.style.backgroundColor=u):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(L)}mxUtils.write(d,mxResources.get("links")+":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,
+u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var H=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?z=K:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",
+mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":z:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var K=document.createElement("div");K.style.width="100%";K.style.height="100%";K.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(K.style.border=
+"1px solid black",K.style.backgroundColor=u):(K.style.backgroundPosition="center center",K.style.backgroundRepeat="no-repeat",K.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(K)}mxUtils.write(d,mxResources.get("links")+":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,
mxResources.get("automatic"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));x.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);
-mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(u||"none",function(C){u=C;g()});mxEvent.consume(L)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},
+mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(K){this.pickColor(u||"none",function(C){u=C;g()});mxEvent.consume(K)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},
getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,z,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=z&&0<z.length&&H.push("edit="+encodeURIComponent(z)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=
-this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,z,u,H,L,C,G){C=this.createUrlParameters(d,f,g,x,z,u,C);d=this.getCurrentFile();f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),L||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(C.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,z,u,H,L,C,G,V,U){this.getBasenames();
-var Y={};""!=z&&z!=mxConstants.NONE&&(Y.highlight=z);"auto"!==x&&(Y.target=x);G||(Y.lightbox=!1);Y.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Y.zoom=g/100);g=[];H&&(g.push("pages"),Y.resize=!0,null!=this.pages&&null!=this.currentPage&&(Y.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Y.resize=!0);L&&g.push("layers");C&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Y.toolbar=g.join(" "));null!=V&&0<V.length&&(Y.edit=V);null!=d?Y.url=d:Y.xml=this.getFileData(!0,
+this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,z,u,H,K,C,G){C=this.createUrlParameters(d,f,g,x,z,u,C);d=this.getCurrentFile();f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),K||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(C.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,z,u,H,K,C,G,V,U){this.getBasenames();
+var Y={};""!=z&&z!=mxConstants.NONE&&(Y.highlight=z);"auto"!==x&&(Y.target=x);G||(Y.lightbox=!1);Y.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Y.zoom=g/100);g=[];H&&(g.push("pages"),Y.resize=!0,null!=this.pages&&null!=this.currentPage&&(Y.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Y.resize=!0);K&&g.push("layers");C&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Y.toolbar=g.join(" "));null!=V&&0<V.length&&(Y.edit=V);null!=d?Y.url=d:Y.xml=this.getFileData(!0,
null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Y))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
-EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");
-L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","type-embedhtmldialog");u=L.cloneNode(!0);u.setAttribute("value","copy");H.appendChild(u);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(C);mxUtils.br(H);H.appendChild(L);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));H.appendChild(C);var G=this.getCurrentFile();
-null==g&&null!=G&&G.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),H.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&L.setAttribute("disabled","disabled");z.appendChild(H);var V=this.addLinkSection(z),U=this.addCheckbox(z,mxResources.get("zoom"),
+EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var K=document.createElement("input");
+K.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","type-embedhtmldialog");u=K.cloneNode(!0);u.setAttribute("value","copy");H.appendChild(u);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(C);mxUtils.br(H);H.appendChild(K);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));H.appendChild(C);var G=this.getCurrentFile();
+null==g&&null!=G&&G.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),H.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&K.setAttribute("disabled","disabled");z.appendChild(H);var V=this.addLinkSection(z),U=this.addCheckbox(z,mxResources.get("zoom"),
!0,null,!0);mxUtils.write(z,":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value="100%";z.appendChild(Y);var O=this.addCheckbox(z,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(z,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(z,mxResources.get("layers"),!0),aa=this.addCheckbox(z,mxResources.get("tags"),!0),ca=this.addCheckbox(z,
-mxResources.get("lightbox"),!0),fa=null;H=380;if(EditorUi.enableHtmlEditOption){fa=this.addEditButton(z,ca);var J=fa.getEditInput();J.style.marginBottom="16px";H+=50;mxEvent.addListener(ca,"change",function(){ca.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&ca.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,z,mxUtils.bind(this,function(){x(L.checked?g:null,U.checked,Y.value,
-V.getTarget(),V.getColor(),O.checked,qa.checked,oa.checked,aa.checked,ca.checked,null!=fa?fa.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,x,z,u,H,L){var C=document.createElement("div");C.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(G);var V=this.getCurrentFile();
+mxResources.get("lightbox"),!0),fa=null;H=380;if(EditorUi.enableHtmlEditOption){fa=this.addEditButton(z,ca);var J=fa.getEditInput();J.style.marginBottom="16px";H+=50;mxEvent.addListener(ca,"change",function(){ca.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&ca.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,z,mxUtils.bind(this,function(){x(K.checked?g:null,U.checked,Y.value,
+V.getTarget(),V.getColor(),O.checked,qa.checked,oa.checked,aa.checked,ca.checked,null!=fa?fa.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,x,z,u,H,K){var C=document.createElement("div");C.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(G);var V=this.getCurrentFile();
d=0;if(null==V||V.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var U=document.createElement("div");U.style.whiteSpace="normal";mxUtils.write(U,mxResources.get("linkAccountRequired"));G.appendChild(U);
U=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(V.getId())}));U.style.marginTop="12px";U.className="geBtn";G.appendChild(U);C.appendChild(G);U=document.createElement("a");U.style.paddingLeft="12px";U.style.color="gray";U.style.fontSize="11px";U.style.cursor="pointer";mxUtils.write(U,mxResources.get("check"));G.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
mxUtils.bind(this,function(P){this.spinner.stop();P=new ErrorDialog(this,null,mxResources.get(null!=P?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(P.container,300,80,!0,!1);P.init()}))}))}var Y=null,O=null;if(null!=g||null!=x)d+=30,mxUtils.write(C,mxResources.get("width")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.marginRight="16px",Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginRight="16px",Y.style.marginBottom="10px",
Y.value="100%",C.appendChild(Y),mxUtils.write(C,mxResources.get("height")+":"),O=document.createElement("input"),O.setAttribute("type","text"),O.style.width="50px",O.style.marginLeft="6px",O.style.marginBottom="10px",O.value=x+"px",C.appendChild(O),mxUtils.br(C);var qa=this.addLinkSection(C,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==V||V.constructor!=window.DriveFile||f)oa=this.addCheckbox(C,mxResources.get("allPages"),g,!g);var aa=this.addCheckbox(C,mxResources.get("lightbox"),
!0,null,null,!u),ca=this.addEditButton(C,aa),fa=ca.getEditInput();u&&(fa.style.marginLeft=aa.style.marginLeft,aa.style.display="none",d-=20);var J=this.addCheckbox(C,mxResources.get("layers"),!0);J.style.marginLeft=fa.style.marginLeft;J.style.marginTop="8px";var Z=this.addCheckbox(C,mxResources.get("tags"),!0);Z.style.marginLeft=fa.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(aa,"change",function(){aa.checked?(J.removeAttribute("disabled"),fa.removeAttribute("disabled")):
-(J.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&aa.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){z(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,aa.checked,ca.getLink(),J.checked,null!=Y?Y.value:null,null!=O?O.value:null,Z.checked)}),null,mxResources.get("create"),H,L);this.showDialog(f.container,340,300+d,!0,!0);null!=Y?(Y.focus(),
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";u.appendChild(H);if(z){mxUtils.write(u,mxResources.get("zoom")+":");var L=document.createElement("input");
-L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";u.appendChild(L);mxUtils.write(u,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";u.appendChild(C);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),V=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var U=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Y=parseInt(L.value)/100||1,O=parseInt(C.value)||0;g(!G.checked,null!=V?V.checked:!1,null!=U?U.checked:!1,Y,O)}),null,d,f);
-this.showDialog(d.container,300,(z?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,z,u,H,L,C){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var V=this.editor.graph,U="jpeg"==L?220:300,Y=document.createElement("h3");mxUtils.write(Y,d);Y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Y);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");
+(J.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&aa.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){z(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,aa.checked,ca.getLink(),J.checked,null!=Y?Y.value:null,null!=O?O.value:null,Z.checked)}),null,mxResources.get("create"),H,K);this.showDialog(f.container,340,300+d,!0,!0);null!=Y?(Y.focus(),
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";u.appendChild(H);if(z){mxUtils.write(u,mxResources.get("zoom")+":");var K=document.createElement("input");
+K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.style.marginRight="12px";K.value=this.lastExportZoom||"100%";u.appendChild(K);mxUtils.write(u,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";u.appendChild(C);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),V=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var U=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Y=parseInt(K.value)/100||1,O=parseInt(C.value)||0;g(!G.checked,null!=V?V.checked:!1,null!=U?U.checked:!1,Y,O)}),null,d,f);
+this.showDialog(d.container,300,(z?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,z,u,H,K,C){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var V=this.editor.graph,U="jpeg"==K?220:300,Y=document.createElement("h3");mxUtils.write(Y,d);Y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Y);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");
O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),
!1,V.isSelectionEmpty()),aa=document.createElement("input");aa.style.marginTop="16px";aa.style.marginRight="8px";aa.style.marginLeft="24px";aa.setAttribute("disabled","disabled");aa.setAttribute("type","checkbox");var ca=document.createElement("select");ca.style.marginTop="16px";ca.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var fa={};for(Y=0;Y<d.length;Y++)if(!V.isSelectionEmpty()||"selectionOnly"!=d[Y]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(d[Y]));
J.setAttribute("value",d[Y]);ca.appendChild(J);fa[d[Y]]=J}C?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ca),mxUtils.br(G),U+=26,mxEvent.addListener(ca,"change",function(){"selectionOnly"==ca.value&&(oa.checked=!0)})):u&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),U+=30,mxEvent.addListener(oa,"change",function(){oa.checked?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")}));V.isSelectionEmpty()?C&&(oa.style.display="none",oa.nextSibling.style.display=
-"none",oa.nextSibling.nextSibling.style.display="none",U-=30):(ca.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){ca.value=oa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=L),P=null;Editor.isDarkMode()&&(P=this.addCheckbox(G,mxResources.get("dark"),!0),U+=26);var da=this.addCheckbox(G,mxResources.get("shadow"),V.shadowVisible),ja=null;if("png"==L||"jpeg"==
-L)ja=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=L);ka.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var F=document.createElement("select");F.style.maxWidth="260px";F.style.marginLeft=
+"none",oa.nextSibling.nextSibling.style.display="none",U-=30):(ca.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){ca.value=oa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=K),P=null;Editor.isDarkMode()&&(P=this.addCheckbox(G,mxResources.get("dark"),!0),U+=26);var da=this.addCheckbox(G,mxResources.get("shadow"),V.shadowVisible),ja=null;if("png"==K||"jpeg"==
+K)ja=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=K);ka.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var F=document.createElement("select");F.style.maxWidth="260px";F.style.marginLeft=
"8px";F.style.marginRight="10px";F.style.marginBottom="16px";F.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||
F.appendChild(u);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){"lblToSvg"==F.value?(q.checked=!0,q.setAttribute("disabled","disabled"),fa.page.style.display="none","page"==ca.value&&(ca.value="diagram"),da.checked=!1,da.setAttribute("disabled","disabled"),W.style.display="inline-block",R.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),da.removeAttribute("disabled"),fa.page.style.display="",W.style.display="none",R.style.display=
"")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(F),mxUtils.br(G),U+=60);var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value",
-"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));R.appendChild(f);var W=document.createElement("div");mxUtils.write(W,mxResources.get("LinksLost"));W.style.margin="7px";W.style.display="none";"svg"==L&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(R),G.appendChild(W),mxUtils.br(G),mxUtils.br(G),U+=50);g=new CustomDialog(this,G,mxUtils.bind(this,
+"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));R.appendChild(f);var W=document.createElement("div");mxUtils.write(W,mxResources.get("LinksLost"));W.style.margin="7px";W.style.display="none";"svg"==K&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(R),G.appendChild(W),mxUtils.br(G),mxUtils.br(G),U+=50);g=new CustomDialog(this,G,mxUtils.bind(this,
function(){this.lastExportBorder=qa.value;this.lastExportZoom=O.value;z(O.value,Z.checked,!oa.checked,da.checked,ka.checked,q.checked,qa.value,aa.checked,!1,R.value,null!=ja?ja.checked:null,null!=P?P.checked:null,ca.value,"embedFonts"==F.value,"lblToSvg"==F.value)}),null,g,x);this.showDialog(g.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
-function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var L=document.createElement("h3");mxUtils.write(L,f);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(L)}var C=this.addCheckbox(u,mxResources.get("fit"),!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),V=this.addCheckbox(u,g),U=this.addCheckbox(u,mxResources.get("lightbox"),!0),Y=this.addEditButton(u,U),O=Y.getEditInput(),
+function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var K=document.createElement("h3");mxUtils.write(K,f);K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(K)}var C=this.addCheckbox(u,mxResources.get("fit"),!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),V=this.addCheckbox(u,g),U=this.addCheckbox(u,mxResources.get("lightbox"),!0),Y=this.addEditButton(u,U),O=Y.getEditInput(),
qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=O.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(qa&&oa.removeAttribute("disabled"),O.removeAttribute("disabled")):(oa.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?Y.getEditSelect().removeAttribute("disabled"):Y.getEditSelect().setAttribute("disabled",
-"disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(C.checked,G.checked,V.checked,U.checked,Y.getLink(),oa.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,z,u,H,L){function C(O){var qa=" ",oa="";x&&(qa=" 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('"+
+"disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(C.checked,G.checked,V.checked,U.checked,Y.getLink(),oa.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,z,u,H,K){function C(O){var qa=" ",oa="";x&&(qa=" 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!=V?"&page="+V:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var aa="";g&&(aa=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+O+'"'+aa+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),V=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var qa=x?this.getFileData(!0):
-null;O=this.createImageDataUri(O,qa,"png");C(O)}),null,null,null,mxUtils.bind(this,function(O){L({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";g&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Y=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+U+"&xml="+encodeURIComponent(f));Y.send(mxUtils.bind(this,function(){200<=
-Y.getStatus()&&299>=Y.getStatus()?C("data:image/png;base64,"+Y.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,x,z,u,H){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),C=L.getElementsByTagName("a");if(null!=C)for(var G=0;G<C.length;G++){var V=C[G].getAttribute("href");null!=V&&"#"==V.charAt(0)&&"_blank"==C[G].getAttribute("target")&&C[G].removeAttribute("target")}x&&
-L.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(L);if(g){var U=" ",Y="";x&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(u?"&layers=1":
-"")+"');}})(this);\"",Y+="cursor:pointer;");d&&(Y+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(O){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Y?' style="'+Y+'"':"")+U+"/>")}))}else Y="",x&&(f=this.getSelectedPageIndex(),L.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Y+="cursor:pointer;"),d&&(d=parseInt(L.getAttribute("width")),z=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+d+" "+z),Y+="max-width:100%;max-height:"+z+"px;",L.removeAttribute("height")),""!=Y&&L.setAttribute("style",Y),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),H(mxUtils.getXml(L))};EditorUi.prototype.timeSince=function(d){d=
+null;O=this.createImageDataUri(O,qa,"png");C(O)}),null,null,null,mxUtils.bind(this,function(O){K({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";g&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Y=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+U+"&xml="+encodeURIComponent(f));Y.send(mxUtils.bind(this,function(){200<=
+Y.getStatus()&&299>=Y.getStatus()?C("data:image/png;base64,"+Y.getText()):K({message:mxResources.get("unknownError")})}))}else K({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,x,z,u,H){var K=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),C=K.getElementsByTagName("a");if(null!=C)for(var G=0;G<C.length;G++){var V=C[G].getAttribute("href");null!=V&&"#"==V.charAt(0)&&"_blank"==C[G].getAttribute("target")&&C[G].removeAttribute("target")}x&&
+K.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(K);if(g){var U=" ",Y="";x&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(u?"&layers=1":
+"")+"');}})(this);\"",Y+="cursor:pointer;");d&&(Y+="max-width:100%;");this.editor.convertImages(K,mxUtils.bind(this,function(O){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Y?' style="'+Y+'"':"")+U+"/>")}))}else Y="",x&&(f=this.getSelectedPageIndex(),K.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Y+="cursor:pointer;"),d&&(d=parseInt(K.getAttribute("width")),z=parseInt(K.getAttribute("height")),K.setAttribute("viewBox","-0.5 -0.5 "+d+" "+z),Y+="max-width:100%;max-height:"+z+"px;",K.removeAttribute("height")),""!=Y&&K.setAttribute("style",Y),this.editor.addFontCss(K),this.editor.graph.mathEnabled&&this.editor.addMathCss(K),H(mxUtils.getXml(K))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:z.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,z){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,L=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),u),L=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var C=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(V){return"page"==V?G.getName():"pagenumber"==V?1:C.apply(this,
-arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(V){try{null==L&&(L=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=V.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(L));d(U.substring(U.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Y){null!=f&&f(Y)}}),null,null,null,mxUtils.bind(this,function(V){null!=f&&
-f(V)}),null,null,x,null,u.shadowVisible,null,u,z,null,null,null,"diagram",null)}catch(V){null!=f&&f(V)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){L=null!=L?L:!0;V=null!=V?V:0;H=null!=C?C:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,V,null,null,u,null,null,null,f.shadowVisible||U,null,Y,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(u,null,null,0==V);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var O=mxUtils.bind(this,function(qa){qa=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=z&&z(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=z)this.embedFonts(u,mxUtils.bind(this,function(qa){L?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){O(oa)})):O(qa)}));else return O(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-z?this.getFileData(!0,null,null,null,g,L):null,C,null==this.pages||0==this.pages.length,V)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,U,Y)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,z,u,H){f=null!=f?f:0;g=null!=g?g:0;var L=
+d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,z){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,K=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),u),K=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var C=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(V){return"page"==V?G.getName():"pagenumber"==V?1:C.apply(this,
+arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(V){try{null==K&&(K=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=V.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(K));d(U.substring(U.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Y){null!=f&&f(Y)}}),null,null,null,mxUtils.bind(this,function(V){null!=f&&
+f(V)}),null,null,x,null,u.shadowVisible,null,u,z,null,null,null,"diagram",null)}catch(V){null!=f&&f(V)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){K=null!=K?K:!0;V=null!=V?V:0;H=null!=C?C:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,V,null,null,u,null,null,null,f.shadowVisible||U,null,Y,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(u,null,null,0==V);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var O=mxUtils.bind(this,function(qa){qa=
+(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=z&&z(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=z)this.embedFonts(u,mxUtils.bind(this,function(qa){K?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){O(oa)})):O(qa)}));else return O(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
+z?this.getFileData(!0,null,null,null,g,K):null,C,null==this.pages||0==this.pages.length,V)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,U,Y)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,z,u,H){f=null!=f?f:0;g=null!=g?g:0;var K=
[];try{var C=this.editor.graph;if(null!=d&&0<d.length){C.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var V=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=V&&"mxfile"==V.nodeName&&null!=this.pages){var U=V.getElementsByTagName("diagram");if(1==U.length&&!u){if(V=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Y=U[0].getAttribute("name");null!=Y&&""!=Y&&this.editor.graph.model.execute(new RenamePage(this,
this.currentPage,Y))}}else if(0<U.length){u=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=this.pages[0].getId(),V=Editor.parseDiagramNode(U[0]),x=!1,O=1);for(;O<U.length;O++){var qa=U[O].getAttribute("id");U[O].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(U[O]));d[qa]=U[O].getAttribute("id");var aa=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[aa+1]));C.model.execute(new ChangePage(this,
-oa,oa,aa,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=V&&"mxGraphModel"===V.nodeName){L=C.importGraphModel(V,f,g,x);if(null!=L)for(O=0;O<L.length;O++)this.updatePageLinksForCell(d,L[O]);var ca=C.parseBackgroundImage(V.getAttribute("backgroundImage"));if(null!=ca&&null!=ca.originalSrc){this.updateBackgroundPageLink(d,ca);var fa=new ChangePageSetup(this,null,ca);fa.ignoreColor=!0;C.model.execute(fa)}}H&&this.insertHandler(L,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(J){if(z)throw J;
-this.handleError(J)}return L};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,z=x.getLinkForCell(f);null!=z&&x.setLinkForCell(f,this.updatePageLink(d,z));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,L=0;L<u.length;L++)z=u[L].getAttribute("href"),null!=z&&(u[L].setAttribute("href",this.updatePageLink(d,z)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(L=0;L<x.model.getChildCount(f);L++)this.updatePageLinksForCell(d,x.model.getChildAt(f,L))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var z=0;z<x.actions.length;z++){var u=x.actions[z];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(L){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,z){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var L="UNKNOWN-VISIO",C=x.lastIndexOf(".");if(0<=C&&C<x.length)L=x.substring(C+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
-G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:L+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(U){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var V=new XMLHttpRequest;V.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));V.responseType="blob";this.addRemoteServiceSecurityCheck(V);
+oa,oa,aa,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=V&&"mxGraphModel"===V.nodeName){K=C.importGraphModel(V,f,g,x);if(null!=K)for(O=0;O<K.length;O++)this.updatePageLinksForCell(d,K[O]);var ca=C.parseBackgroundImage(V.getAttribute("backgroundImage"));if(null!=ca&&null!=ca.originalSrc){this.updateBackgroundPageLink(d,ca);var fa=new ChangePageSetup(this,null,ca);fa.ignoreColor=!0;C.model.execute(fa)}}H&&this.insertHandler(K,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(J){if(z)throw J;
+this.handleError(J)}return K};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),x=this.editor.graph,z=x.getLinkForCell(f);null!=z&&x.setLinkForCell(f,this.updatePageLink(d,z));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,K=0;K<u.length;K++)z=u[K].getAttribute("href"),null!=z&&(u[K].setAttribute("href",this.updatePageLink(d,z)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(K=0;K<x.model.getChildCount(f);K++)this.updatePageLinksForCell(d,x.model.getChildAt(f,K))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var z=0;z<x.actions.length;z++){var u=x.actions[z];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(K){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,z){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var K="UNKNOWN-VISIO",C=x.lastIndexOf(".");if(0<=C&&C<x.length)K=x.substring(C+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
+G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:K+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(U){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var V=new XMLHttpRequest;V.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));V.responseType="blob";this.addRemoteServiceSecurityCheck(V);
null!=z&&V.setRequestHeader("x-convert-custom",z);V.onreadystatechange=mxUtils.bind(this,function(){if(4==V.readyState)if(200<=V.status&&299>=V.status)try{var U=V.response;if("text/xml"==U.type){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(O){try{f(O.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Y.readAsText(U)}else this.doImportVisio(U,f,g,x)}catch(O){g(O)}else try{""==V.responseType||"text"==V.responseType?g({message:V.responseText}):(Y=new FileReader,
Y.onload=function(){g({message:JSON.parse(Y.result).Message})},Y.readAsText(V.response))}catch(O){g({})}});V.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(U){g(U)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});
var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(z){g(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var z=
-JSON.parse(d);f(LucidImporter.importState(z));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",z];null!=z.state&&u.push(JSON.parse(z.state));if(null!=z.svgThumbs)for(var H=0;H<z.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(z.svgThumbs[H]));null!=z.thumb&&u.push(z.thumb);console.log.apply(console,u)}}catch(L){}}catch(L){null!=window.console&&console.error(L),g(L)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(d);f(LucidImporter.importState(z));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",z];null!=z.state&&u.push(JSON.parse(z.state));if(null!=z.svgThumbs)for(var H=0;H<z.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(z.svgThumbs[H]));null!=z.thumb&&u.push(z.thumb);console.log.apply(console,u)}}catch(K){}}catch(K){null!=window.console&&console.error(K),g(K)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var z=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var L=mxUtils.parseXml(H).getElementsByTagName("svg");
-if(0<L.length){var C=parseFloat(L[0].getAttribute("width")),G=parseFloat(L[0].getAttribute("height"));if(isNaN(C)||isNaN(G))try{var V=L[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(V[2]);G=parseFloat(V[3])}catch(U){C=C||100,G=G||100}g(z.convertDataUri(Editor.createSvgDataUri(H)),C,G)}else x({message:mxResources.get("invalidInput")})}catch(U){x(U)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function z(L,C,G){c1=L>>2;c2=(L&3)<<4|C>>4;c3=(C&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+L);L-=26;return 0==L?"-":1==L?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(L){r="";for(i=0;i<L.length;i+=3)r=i+2==L.length?r+z(L.charCodeAt(i),L.charCodeAt(i+1),0):i+1==L.length?r+z(L.charCodeAt(i),0,0):r+z(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(G){var V=new Image;V.onload=
-function(){try{var U=V.width,Y=V.height;if(0==U&&0==Y){var O=C.result,qa=O.indexOf(","),oa=decodeURIComponent(escape(atob(O.substring(qa+1)))),aa=mxUtils.parseXml(oa).getElementsByTagName("svg");0<aa.length&&(U=parseFloat(aa[0].getAttribute("width")),Y=parseFloat(aa[0].getAttribute("height")))}g(C.result,U,Y)}catch(ca){x(ca)}};V.src=C.result};C.onerror=function(G){x(G)}}else x(L)};H.onerror=function(L){x(L)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,z=null;
-x.getModel().beginUpdate();try{z=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(z,!0)}finally{x.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(d,f,g,x,z,u,H,L){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),
-mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Y.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var C=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,L)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
-null!=G&&0<G.length))return this.importXml(G,f,g,u,!0,L);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var V=this.importXml(G,f,g,u,!0,L);if(0<V.length)return V}catch(Y){}this.loadImage(d,mxUtils.bind(this,function(Y){if("data:"==d.substring(0,5))this.resizeImage(Y,d,mxUtils.bind(this,function(oa,aa,
+f,g,x){var z=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var K=mxUtils.parseXml(H).getElementsByTagName("svg");
+if(0<K.length){var C=parseFloat(K[0].getAttribute("width")),G=parseFloat(K[0].getAttribute("height"));if(isNaN(C)||isNaN(G))try{var V=K[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(V[2]);G=parseFloat(V[3])}catch(U){C=C||100,G=G||100}g(z.convertDataUri(Editor.createSvgDataUri(H)),C,G)}else x({message:mxResources.get("invalidInput")})}catch(U){x(U)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function z(K,C,G){c1=K>>2;c2=(K&3)<<4|C>>4;c3=(C&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(K){if(10>K)return String.fromCharCode(48+K);K-=10;if(26>K)return String.fromCharCode(65+K);K-=26;if(26>K)return String.fromCharCode(97+K);K-=26;return 0==K?"-":1==K?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(K){r="";for(i=0;i<K.length;i+=3)r=i+2==K.length?r+z(K.charCodeAt(i),K.charCodeAt(i+1),0):i+1==K.length?r+z(K.charCodeAt(i),0,0):r+z(K.charCodeAt(i),K.charCodeAt(i+1),K.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(K){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(G){var V=new Image;V.onload=
+function(){try{var U=V.width,Y=V.height;if(0==U&&0==Y){var O=C.result,qa=O.indexOf(","),oa=decodeURIComponent(escape(atob(O.substring(qa+1)))),aa=mxUtils.parseXml(oa).getElementsByTagName("svg");0<aa.length&&(U=parseFloat(aa[0].getAttribute("width")),Y=parseFloat(aa[0].getAttribute("height")))}g(C.result,U,Y)}catch(ca){x(ca)}};V.src=C.result};C.onerror=function(G){x(G)}}else x(K)};H.onerror=function(K){x(K)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,z=null;
+x.getModel().beginUpdate();try{z=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(z,!0)}finally{x.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(d,f,g,x,z,u,H,K){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),
+mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Y.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var C=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,K)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
+null!=G&&0<G.length))return this.importXml(G,f,g,u,!0,K);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var V=this.importXml(G,f,g,u,!0,K);if(0<V.length)return V}catch(Y){}this.loadImage(d,mxUtils.bind(this,function(Y){if("data:"==d.substring(0,5))this.resizeImage(Y,d,mxUtils.bind(this,function(oa,aa,
ca){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(f),C.snap(g),aa,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Y.width,this.maxImageSize/Y.height)),qa=Math.round(Y.width*O);Y=Math.round(Y.height*O);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(f),C.snap(g),qa,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Y=null;C.getModel().beginUpdate();try{Y=C.insertVertex(C.getDefaultParent(),null,d,C.snap(f),C.snap(g),1,1,"text;"+(x?"html=1;":"")),C.updateCellSize(Y),C.fireEvent(new mxEventObject("textInserted","cells",[Y]))}finally{C.getModel().endUpdate()}C.setSelectionCell(Y)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,L);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Y){this.editor.graph.setSelectionCells(this.importXml(Y,f,g,u,null,L))}),mxUtils.bind(this,function(Y){this.handleError(Y)}));else{C=this.editor.graph;z=null;C.getModel().beginUpdate();try{z=C.insertVertex(C.getDefaultParent(),null,"",C.snap(f),C.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[z]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+d+";"))}}),mxUtils.bind(this,function(){var Y=null;C.getModel().beginUpdate();try{Y=C.insertVertex(C.getDefaultParent(),null,d,C.snap(f),C.snap(g),1,1,"text;"+(x?"html=1;":"")),C.updateCellSize(Y),C.fireEvent(new mxEventObject("textInserted","cells",[Y]))}finally{C.getModel().endUpdate()}C.setSelectionCell(Y)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,K);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(Y){this.editor.graph.setSelectionCells(this.importXml(Y,f,g,u,null,K))}),mxUtils.bind(this,function(Y){this.handleError(Y)}));else{C=this.editor.graph;z=null;C.getModel().beginUpdate();try{z=C.insertVertex(C.getDefaultParent(),null,"",C.snap(f),C.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[z]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
"...");z.value=d;C.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var U=C.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=U.width;z.geometry.height=U.height}Graph.isLink(z.value)&&C.setLinkForCell(z,z.value);z.geometry.width+=C.gridSize;z.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,L){StorageFile.listFiles(this,
-"F",H,L)});window.openBrowserFile=mxUtils.bind(this,function(H,L,C){StorageFile.getFileContent(this,H,L,C)});window.deleteBrowserFile=mxUtils.bind(this,function(H,L,C){StorageFile.deleteFile(this,H,L,C)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(H=new Blob([H],{type:"application/octet-stream"}),
-this.importVisio(H,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,L)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,u=z.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(z,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,L,C=!1;u.forEach(function(G,V){G=V.name.toLowerCase();"diagram/diagram.xml"==G?(C=!0,V.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,L=V))});0<H?L.async("string").then(function(G){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(V){4==V.readyState&&(200<=V.status&&299>=V.status?f(V.responseText):g())}),d.name):g()}):C||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importFile=function(d,f,g,x,z,u,H,L,C,G,V,U){G=null!=
-G?G:!0;var Y=!1,O=null,qa=mxUtils.bind(this,function(oa){var aa=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):aa=this.importXml(oa,g,x,G,null,null!=U?mxEvent.isControlDown(U):null);null!=L&&L(aa)});"image"==f.substring(0,5)?(C=!1,"image/png"==f.substring(0,9)&&(f=V?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(O=this.importXml(f,g,x,G,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(f=this.editor.graph,C=d.indexOf(";"),0<C&&(d=d.substring(0,
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,K){StorageFile.listFiles(this,
+"F",H,K)});window.openBrowserFile=mxUtils.bind(this,function(H,K,C){StorageFile.getFileContent(this,H,K,C)});window.deleteBrowserFile=mxUtils.bind(this,function(H,K,C){StorageFile.deleteFile(this,H,K,C)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,K){null!=K&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(K)?(H=new Blob([H],{type:"application/octet-stream"}),
+this.importVisio(H,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,K)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,u=z.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(z,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var x=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,K,C=!1;u.forEach(function(G,V){G=V.name.toLowerCase();"diagram/diagram.xml"==G?(C=!0,V.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,K=V))});0<H?K.async("string").then(function(G){(new XMLHttpRequest).upload&&
+x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(V){4==V.readyState&&(200<=V.status&&299>=V.status?f(V.responseText):g())}),d.name):g()}):C||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importFile=function(d,f,g,x,z,u,H,K,C,G,V,U){G=null!=
+G?G:!0;var Y=!1,O=null,qa=mxUtils.bind(this,function(oa){var aa=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):aa=this.importXml(oa,g,x,G,null,null!=U?mxEvent.isControlDown(U):null);null!=K&&K(aa)});"image"==f.substring(0,5)?(C=!1,"image/png"==f.substring(0,9)&&(f=V?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(O=this.importXml(f,g,x,G,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(f=this.editor.graph,C=d.indexOf(";"),0<C&&(d=d.substring(0,
C)+d.substring(d.indexOf(",",C+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),O=[f.insertVertex(null,null,"",g,x,z,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Y=!0,this.importGraphML(d,qa)):null!=C&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Y=!0,this.importVisio(C,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Y=!0,z=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=L&&L(null))}),null!=d?this.parseFileData(d,z,H):this.parseFile(C,z,H)):0==d.indexOf("PK")&&null!=C?(Y=!0,this.importZipFile(C,qa,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);L(O)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(O=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));Y||null==L||L(O);return O};EditorUi.prototype.importFiles=function(d,f,g,x,z,u,H,L,C,G,V,U,Y){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=V||this.resampleThreshold,ca=0;ca<d.length;ca++)if("image/svg"!==d[ca].type.substring(0,9)&&"image/"===d[ca].type.substring(0,6)&&d[ca].size>aa){oa=!0;break}var fa=mxUtils.bind(this,
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Y=!0,z=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=K&&K(null))}),null!=d?this.parseFileData(d,z,H):this.parseFile(C,z,H)):0==d.indexOf("PK")&&null!=C?(Y=!0,this.importZipFile(C,qa,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);K(O)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(O=this.insertTextAt(this.validateFileData(d),
+g,x,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));Y||null==K||K(O);return O};EditorUi.prototype.importFiles=function(d,f,g,x,z,u,H,K,C,G,V,U,Y){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=V||this.resampleThreshold,ca=0;ca<d.length;ca++)if("image/svg"!==d[ca].type.substring(0,9)&&"image/"===d[ca].type.substring(0,6)&&d[ca].size>aa){oa=!0;break}var fa=mxUtils.bind(this,
function(){var J=this.editor.graph,Z=J.gridSize;z=null!=z?z:mxUtils.bind(this,function(F,R,W,T,ba,ia,ra,ta,ma){try{return null!=F&&"<mxlibrary"==F.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,F,ra)),null):this.importFile(F,R,W,T,ba,ia,ra,ta,ma,O,U,Y)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this,function(F){J.setSelectionCells(F)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var P=d.length,da=P,ja=[],ka=mxUtils.bind(this,
-function(F,R){ja[F]=R;if(0==--da){this.spinner.stop();if(null!=L)L(ja);else{var W=[];J.getModel().beginUpdate();try{for(F=0;F<ja.length;F++){var T=ja[F]();null!=T&&(W=W.concat(T))}}finally{J.getModel().endUpdate()}}u(W)}}),q=0;q<P;q++)mxUtils.bind(this,function(F){var R=d[F];if(null!=R){var W=new FileReader;W.onload=mxUtils.bind(this,function(T){if(null==H||H(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var ba=Graph.clipSvgDataUri(T.target.result),ia=ba.indexOf(",");
+function(F,R){ja[F]=R;if(0==--da){this.spinner.stop();if(null!=K)K(ja);else{var W=[];J.getModel().beginUpdate();try{for(F=0;F<ja.length;F++){var T=ja[F]();null!=T&&(W=W.concat(T))}}finally{J.getModel().endUpdate()}}u(W)}}),q=0;q<P;q++)mxUtils.bind(this,function(F){var R=d[F];if(null!=R){var W=new FileReader;W.onload=mxUtils.bind(this,function(T){if(null==H||H(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var ba=Graph.clipSvgDataUri(T.target.result),ia=ba.indexOf(",");
ia=decodeURIComponent(escape(atob(ba.substring(ia+1))));var ra=mxUtils.parseXml(ia);ia=ra.getElementsByTagName("svg");if(0<ia.length){ia=ia[0];var ta=U?null:ia.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta||"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(F,mxUtils.bind(this,function(){try{if(null!=ra){var za=ra.getElementsByTagName("svg");
if(0<za.length){var Ba=za[0],Ia=Ba.getAttribute("width"),Aa=Ba.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var Ka=Ba.getAttribute("viewBox");if(null==Ka||0==Ka.length)Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da=Ka.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Ra=Math.min(1,Math.min(x/Math.max(1,
Ia)),x/Math.max(1,Aa)),Qa=z(ba,R.type,f+F*Z,g+F*Z,Math.max(1,Math.round(Ia*Ra)),Math.max(1,Math.round(Aa*Ra)),R.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Qa[0].geometry.width=Ia;Qa[0].geometry.height=Aa;Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);ba=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));J.setCellStyles("image",ba,
@@ -3629,8 +3629,8 @@ V)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return z(Ba,R.type,f+F*Z,g+F*Z,Math.round(I
f+F*Z,g+F*Z,240,160,R.name,function(T){ka(F,function(){return T})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?W.readAsDataURL(R):W.readAsText(R)}})(q)});if(oa){oa=[];for(ca=0;ca<d.length;ca++)oa.push(d[ca]);d=oa;this.confirmImageResize(function(J){qa=J;fa()},C)}else fa()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(u){z(u,!0)},function(u){z(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):z(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
-x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,z,u,H){z=null!=z?z:this.maxImageSize;var L=Math.max(1,d.width),C=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=
-Math.max(L/z,C/z);if(1<G){var V=Math.round(L/G),U=Math.round(C/G),Y=document.createElement("canvas");Y.width=V;Y.height=U;Y.getContext("2d").drawImage(d,0,0,V,U);var O=Y.toDataURL();if(O.length<f.length){var qa=document.createElement("canvas");qa.width=V;qa.height=U;var oa=qa.toDataURL();O!==oa&&(f=O,L=V,C=U)}}}catch(aa){}g(f,L,C)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=
+x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,z,u,H){z=null!=z?z:this.maxImageSize;var K=Math.max(1,d.width),C=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=
+Math.max(K/z,C/z);if(1<G){var V=Math.round(K/G),U=Math.round(C/G),Y=document.createElement("canvas");Y.width=V;Y.height=U;Y.getContext("2d").drawImage(d,0,0,V,U);var O=Y.toDataURL();if(O.length<f.length){var qa=document.createElement("canvas");qa.width=V;qa.height=U;var oa=qa.toDataURL();O!==oa&&(f=O,K=V,C=U)}}}catch(aa){}g(f,K,C)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=
function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(z){if(null!=g)g(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=
mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(aa){var ca=aa.getEvent();return null==aa.getState()&&!mxEvent.isMouseEvent(ca)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ca)&&(null==
aa.getState()||mxEvent.isControlDown(ca)||mxEvent.isShiftDown(ca))});f.cellEditor.editPlantUmlData=function(aa,ca,fa){var J=JSON.parse(fa);ca=new TextareaDialog(d,mxResources.get("plantUml")+":",J.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,J.format,function(P,da,ja){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==J.format)f.labelChanged(aa,"<pre>"+P+"</pre>"),f.updateCellSize(aa,!0);else{f.setCellStyles("image",d.convertDataUri(P),
@@ -3641,7 +3641,7 @@ f.customLinkClicked=function(aa){var ca=!1;try{d.handleCustomLink(aa),ca=!0}catc
mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(aa,ca){aa=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=aa){var fa=aa.indexOf(",");if(0<fa)for(aa=aa.substring(fa+1),ca=ca.getProperty("patches"),fa=0;fa<ca.length;fa++)if(null!=ca[fa][EditorUi.DIFF_UPDATE]&&null!=ca[fa][EditorUi.DIFF_UPDATE][aa]||null!=ca[fa][EditorUi.DIFF_REMOVE]&&
0<=mxUtils.indexOf(ca[fa][EditorUi.DIFF_REMOVE],aa)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(aa,ca){var fa=u.apply(this,arguments);if(null!=fa&&null!=fa.originalSrc)if(!ca)fa={src:fa.originalSrc};else if(ca&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,Z=this.shapeForegroundColor,P=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor=
"#000000";fa=d.createImageForPageLink(fa.originalSrc);this.shapeBackgroundColor=P;this.shapeForegroundColor=Z;this.stylesheet=J}return fa};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
-"https://app.diagrams.net/";var L=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return L.apply(this,arguments)};var C=f.addClickHandler;f.addClickHandler=function(aa,ca,fa){var J=ca;ca=function(Z,P){if(null==P){var da=mxEvent.getSource(Z);"a"==da.nodeName.toLowerCase()&&(P=da.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(P)&&mxEvent.consume(Z);
+"https://app.diagrams.net/";var K=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return K.apply(this,arguments)};var C=f.addClickHandler;f.addClickHandler=function(aa,ca,fa){var J=ca;ca=function(Z,P){if(null==P){var da=mxEvent.getSource(Z);"a"==da.nodeName.toLowerCase()&&(P=da.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(P)&&mxEvent.consume(Z);
null!=J&&J(Z,P)};C.call(this,aa,ca,fa)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(aa,ca,fa){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(aa,"delete - cut copy copyAsImage - duplicate".split(" "),null,fa)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,
null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var V=f.getExportVariables;f.getExportVariables=function(){var aa=V.apply(this,arguments),ca=d.getCurrentFile();null!=ca&&(aa.filename=ca.getTitle());aa.pagecount=null!=d.pages?d.pages.length:1;aa.page=null!=d.currentPage?d.currentPage.getName():"";aa.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return aa};var U=f.getGlobalVariable;f.getGlobalVariable=
function(aa){var ca=d.getCurrentFile();return"filename"==aa&&null!=ca?ca.getTitle():"page"==aa&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==aa?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==aa?null!=d.pages?d.pages.length:1:U.apply(this,arguments)};var Y=f.labelLinkClicked;f.labelLinkClicked=function(aa,ca,fa){var J=ca.getAttribute("href");if(null==J||!f.isCustomLink(J)||!mxEvent.isTouchEvent(fa)&&mxEvent.isPopupTrigger(fa))Y.apply(this,arguments);
@@ -3662,7 +3662,7 @@ function(){f.setSelectionCells(this.insertTextAt(ka,P,da,!0,q,null,F,mxEvent.isC
null,"",P,da,T*ba,W*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ja+";"))}),mxUtils.bind(this,function(W){f.setSelectionCells(this.insertTextAt(ja,P,da,!0))})):0<=mxUtils.indexOf(aa.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(aa.dataTransfer.getData("text/plain"),P,da,!0))}}aa.stopPropagation();aa.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
O=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",O);this.addListener("sketchModeChanged",O);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);
this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,z=0;z<g.types.length;z++)if("text/"===g.types[z].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,
-function(C,G,V,U,Y,O){d.insertImage(C,Y,O)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],L.x,L.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
+function(C,G,V,U,Y,O){d.insertImage(C,Y,O)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()});else{var K=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],K.x,K.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize=
"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&
(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),
@@ -3694,13 +3694,13 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito
function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,z){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(z.getAttribute("width")),L=parseInt(z.getAttribute("height"));this.writeImageToClipboard(u,H,L,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,z){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(z.getAttribute("width")),K=parseInt(z.getAttribute("height"));this.writeImageToClipboard(u,H,K,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,
function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var z=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":z,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),z=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(z));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=z,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var z=this.editor.graph,u=null;z.lastPasteXml==d?z.pasteCounter++:(z.lastPasteXml=d,z.pasteCounter=0);var H=z.pasteCounter*z.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),z.setSelectionCells(u);else if(f&&1==z.getSelectionCount()){H=z.getStartEditingCell(z.getSelectionCell(),
x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==z.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])z.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{z.model.beginUpdate();try{z.labelChanged(H,d),Graph.isLink(d)&&z.setLinkForCell(H,d)}finally{z.model.endUpdate()}}z.setSelectionCell(H)}else u=z.getInsertPoint(),z.isMouseInsertPoint()&&(H=0,z.lastPasteXml==d&&0<z.pasteCounter&&z.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),z.setSelectionCells(u);z.isSelectionEmpty()||(z.scrollCellToVisible(z.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(z.view.getState(z.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var z=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),L=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var C=decodeURIComponent(H);this.isCompatibleString(C)&&(L=!0,H=C)}catch(qa){}L=L?null:d.clipboardData.getData("text/html");null!=L&&0<L.length?(z=
-this.parseHtmlData(L),u="text/plain"!=z.getAttribute("data-type")):null!=H&&0<H.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,L))}H=z.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
+null!=this.hoverIcons&&this.hoverIcons.update(z.view.getState(z.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var z=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),K=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var C=decodeURIComponent(H);this.isCompatibleString(C)&&(K=!0,H=C)}catch(qa){}K=K?null:d.clipboardData.getData("text/html");null!=K&&0<K.length?(z=
+this.parseHtmlData(K),u="text/plain"!=z.getAttribute("data-type")):null!=H&&0<H.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,K))}H=z.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
0);var aa=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,aa,aa));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText),V=!1;try{var U=G.lastIndexOf("%3E");0<=U&&U<G.length-3&&(G=G.substring(0,U+3))}catch(qa){}try{H=z.getElementsByTagName("span"),(C=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):
decodeURIComponent(G))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(V=!0,G=C)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Y=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,V,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Y):Y()}else this.pasteXml(G,
x,V,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
@@ -3710,18 +3710,18 @@ u=u.getElementsByTagName("img"),0<u.length&&(z=u[0].getAttribute("src"))):0<=mxU
299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var z=document.documentElement;
var u=(x.clientWidth||z.clientWidth)-3;x=Math.max(x.clientHeight||0,z.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=g+"px";z.style.width=Math.max(0,u-3)+"px";z.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(z):
document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,z){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,L,f))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(L){this.spinner.stop();u(L)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(L){this.spinner.stop();u(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),
-200<=L.status&&299>=L.status?u(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,x)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(L){this.spinner.stop();u(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,K,f))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(K){this.spinner.stop();u(K)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(K){this.spinner.stop();u(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),
+200<=K.status&&299>=K.status?u(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,x)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(K){this.spinner.stop();u(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(z=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,z,null!=z?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var z=new FileReader;z.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});z.onerror=mxUtils.bind(this,function(u){this.spinner.stop();
-this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?z.readAsText(x):z.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,z){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(d);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?z.readAsText(x):z.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,z){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(d);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
d,f||this.defaultFilename,g,x,z))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(H){if(null!=H){var L=H.lastIndexOf(".");0<L&&(H=H.substring(L+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,z=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=x.model.getChildCount(d);for(var u=0;u<z;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
+function(d,f){function g(H){if(null!=H){var K=H.lastIndexOf(".");0<K&&(H=H.substring(K+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,z=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=x.model.getChildCount(d);for(var u=0;u<z;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,z){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,L;for(L in H){var C=H[L];null!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,z){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,K;for(K in H){var C=H[K];null!=
C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
@@ -3755,23 +3755,23 @@ try{d(ma,pa,null,Y)}catch(za){this.handleError(za)}g=!1;null!=urlParams.modified
f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=ma,H.postMessage(JSON.stringify(pa),"*");null!=V&&V()});null!=G&&
"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(U="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(ma){ta(ma,C)},mxUtils.bind(this,function(ma){this.handleError(ma)}),U)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
mxUtils.bind(this,function(ma){4==ma.readyState&&200<=ma.status&&299>=ma.status&&"<mxGraphModel"==ma.responseText.substring(0,13)&&ta(ma.responseText,C)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(ma){ta(ma)}),mxUtils.bind(this,function(ma){this.handleError(ma)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=U(G),ta(G,C)):this.loadDescriptor(G,mxUtils.bind(this,function(ma){ta(ra(),C)}),
-mxUtils.bind(this,function(ma){this.handleError(ma,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(C,G,V){L.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:C,target:G,allowOpener:V}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+mxUtils.bind(this,function(ma){this.handleError(ma,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var K=this.editor.graph.openLink;this.editor.graph.openLink=function(C,G,V){K.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:C,target:G,allowOpener:V}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var x="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,x);f.setAttribute("title",x);mxEvent.addListener(f,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className=
"geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],z=[],u=[],H={};if(0<g.length){var L={},C=this.editor.graph,G=null,V=null,U=null,Y=null,O=null,qa=null,oa=null,aa="whiteSpace=wrap;html=1;",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],z=[],u=[],H={};if(0<g.length){var K={},C=this.editor.graph,G=null,V=null,U=null,Y=null,O=null,qa=null,oa=null,aa="whiteSpace=wrap;html=1;",
ca=null,fa=null,J="",Z="auto",P="auto",da=!1,ja=null,ka=null,q=40,F=40,R=100,W=0,T=function(){null!=f?f(ya):(C.setSelectionCells(ya),C.scrollCellToVisible(C.getSelectionCell()))},ba=C.getFreeInsertPoint(),ia=ba.x,ra=ba.y;ba=ra;var ta=null,ma="auto";fa=null;for(var pa=[],za=null,Ba=null,Ia=0;Ia<g.length&&"#"==g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=
d.indexOf(":");if(0<Aa){var Ka=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==Ka?ta=C.sanitizeHtml(Da):"labelname"==Ka&&0<Da.length&&"-"!=Da?O=Da:"labels"==Ka&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==Ka?V=Da:"parentstyle"==Ka?aa=Da:"unknownStyle"==Ka&&"-"!=Da?qa=Da:"stylename"==Ka&&0<Da.length&&"-"!=Da?Y=Da:"styles"==Ka&&0<Da.length&&"-"!=Da?U=JSON.parse(Da):"vars"==Ka&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==Ka&&0<Da.length&&"-"!=Da?ca=Da:"parent"==
Ka&&0<Da.length&&"-"!=Da?fa=Da:"namespace"==Ka&&0<Da.length&&"-"!=Da?J=Da:"width"==Ka?Z=Da:"height"==Ka?P=Da:"collapsed"==Ka&&"-"!=Da?da="true"==Da:"left"==Ka&&0<Da.length?ja=Da:"top"==Ka&&0<Da.length?ka=Da:"ignore"==Ka?Ba=Da.split(","):"connect"==Ka?pa.push(JSON.parse(Da)):"link"==Ka?za=Da:"padding"==Ka?W=parseFloat(Da):"edgespacing"==Ka?q=parseFloat(Da):"nodespacing"==Ka?F=parseFloat(Da):"levelspacing"==Ka?R=parseFloat(Da):"layout"==Ka&&(ma=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));
-var Ra=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;Ka=[];for(Da=0;Da<Ra.length;Da++)ca==Ra[Da]&&(d=Da),fa==Ra[Da]&&(Aa=Da),Ka.push(mxUtils.trim(Ra[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+Ka[0]+"%");if(null!=pa)for(var Qa=0;Qa<pa.length;Qa++)null==L[pa[Qa].to]&&(L[pa[Qa].to]={});ca=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];
+var Ra=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;Ka=[];for(Da=0;Da<Ra.length;Da++)ca==Ra[Da]&&(d=Da),fa==Ra[Da]&&(Aa=Da),Ka.push(mxUtils.trim(Ra[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+Ka[0]+"%");if(null!=pa)for(var Qa=0;Qa<pa.length;Qa++)null==K[pa[Qa].to]&&(K[pa[Qa].to]={});ca=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];
throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ca.push(Ta)}C.model.beginUpdate();try{for(Da=0;Da<ca.length;Da++){Ta=ca[Da];var Pa=null,y=null!=d?J+Ta[d]:null;g=!1;null!=y&&(Pa=C.model.getCell(y),g=null==Pa||0<=mxUtils.indexOf(x,Pa));var M=new mxCell(ta,new mxGeometry(ia,ba,0,0),V||"whiteSpace=wrap;html=1;");M.collapsed=da;M.vertex=!0;M.id=y;null==Pa||g||C.model.setCollapsed(Pa,da);for(var N=0;N<Ta.length;N++)C.setAttributeForCell(M,Ka[N],Ta[N]),null==Pa||
g||C.setAttributeForCell(Pa,Ka[N],Ta[N]);if(null!=O&&null!=oa){var S=oa[M.getAttribute(O)];null!=S&&(C.labelChanged(M,S),null==Pa||g||C.cellLabelChanged(Pa,S))}if(null!=Y&&null!=U){var X=U[M.getAttribute(Y)];null!=X&&(M.style=X)}C.setAttributeForCell(M,"placeholders","1");M.style=C.replacePlaceholders(M,M.style,G);null==Pa||g?C.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(C.model.setStyle(Pa,M.style),0>mxUtils.indexOf(u,Pa)&&u.push(Pa),C.fireEvent(new mxEventObject("cellsInserted","cells",
-[Pa])));g=null!=Pa;Pa=M;if(!g)for(Qa=0;Qa<pa.length;Qa++)L[pa[Qa].to][Pa.getAttribute(pa[Qa].to)]=Pa;null!=za&&"link"!=za&&(C.setLinkForCell(Pa,Pa.getAttribute(za)),C.setAttributeForCell(Pa,za,null));var ha=this.editor.graph.getPreferredSizeForCell(Pa);fa=null!=Aa?C.model.getCell(J+Ta[Aa]):null;if(Pa.vertex){Za=null!=fa?0:ia;Ia=null!=fa?0:ra;null!=ja&&null!=Pa.getAttribute(ja)&&(Pa.geometry.x=Za+parseFloat(Pa.getAttribute(ja)));null!=ka&&null!=Pa.getAttribute(ka)&&(Pa.geometry.y=Ia+parseFloat(Pa.getAttribute(ka)));
+[Pa])));g=null!=Pa;Pa=M;if(!g)for(Qa=0;Qa<pa.length;Qa++)K[pa[Qa].to][Pa.getAttribute(pa[Qa].to)]=Pa;null!=za&&"link"!=za&&(C.setLinkForCell(Pa,Pa.getAttribute(za)),C.setAttributeForCell(Pa,za,null));var ha=this.editor.graph.getPreferredSizeForCell(Pa);fa=null!=Aa?C.model.getCell(J+Ta[Aa]):null;if(Pa.vertex){Za=null!=fa?0:ia;Ia=null!=fa?0:ra;null!=ja&&null!=Pa.getAttribute(ja)&&(Pa.geometry.x=Za+parseFloat(Pa.getAttribute(ja)));null!=ka&&null!=Pa.getAttribute(ka)&&(Pa.geometry.y=Ia+parseFloat(Pa.getAttribute(ka)));
var la="@"==Z.charAt(0)?Pa.getAttribute(Z.substring(1)):null;Pa.geometry.width=null!=la&&"auto"!=la?parseFloat(Pa.getAttribute(Z.substring(1))):"auto"==Z||"auto"==la?ha.width+W:parseFloat(Z);var xa="@"==P.charAt(0)?Pa.getAttribute(P.substring(1)):null;Pa.geometry.height=null!=xa&&"auto"!=xa?parseFloat(xa):"auto"==P||"auto"==xa?ha.height+W:parseFloat(P);ba+=Pa.geometry.height+F}g?(null==H[y]&&(H[y]=[]),H[y].push(Pa)):(x.push(Pa),null!=fa?(fa.style=C.replacePlaceholders(fa,aa,G),C.addCell(Pa,fa),z.push(fa)):
u.push(C.addCell(Pa)))}for(Da=0;Da<z.length;Da++)la="@"==Z.charAt(0)?z[Da].getAttribute(Z.substring(1)):null,xa="@"==P.charAt(0)?z[Da].getAttribute(P.substring(1)):null,"auto"!=Z&&"auto"!=la||"auto"!=P&&"auto"!=xa||C.updateGroupBounds([z[Da]],W,!0);var sa=u.slice(),ya=u.slice();for(Qa=0;Qa<pa.length;Qa++){var Fa=pa[Qa];for(Da=0;Da<x.length;Da++){Pa=x[Da];var wa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=
-L[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ia,ra,0,0),qa);ib.style=C.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+W;ib.geometry.height=gb.height+W;L[lb.to][$a[ab]]=ib;ib.vertex=!0;ib.id=$a[ab];u.push(C.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=C.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&
+K[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ia,ra,0,0),qa);ib.style=C.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+W;ib.geometry.height=gb.height+W;K[lb.to][$a[ab]]=ib;ib.vertex=!0;ib.id=$a[ab];u.push(C.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=C.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&
(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+C.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?C.replacePlaceholders(qb,lb.style,G):C.createCurrentEdgeStyle();gb=C.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");
mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=C.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});wa(Pa,Pa,Fa);if(null!=H[Pa.id])for(N=0;N<H[Pa.id].length;N++)wa(Pa,H[Pa.id][N],Fa)}}if(null!=Ba)for(Da=0;Da<x.length;Da++)for(Pa=x[Da],N=0;N<Ba.length;N++)C.setAttributeForCell(Pa,
mxUtils.trim(Ba[N]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(C);ua.spacing=q;ua.checkOverlap=!0;var La=function(){0<ua.spacing&&ua.execute(C.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=C.getCellGeometry(u[fb]);pb.x=Math.round(C.snap(pb.x));pb.y=Math.round(C.snap(pb.y));"auto"==Z&&(pb.width=Math.round(C.snap(pb.width)));"auto"==P&&(pb.height=Math.round(C.snap(pb.height)))}};if("["==ma.charAt(0)){var Oa=T;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ma)),
@@ -3784,63 +3784,63 @@ d,f,g,!0,x,z);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prot
var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);
Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);
this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
-function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var E=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);
+function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var E=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
+function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);
this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");
f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&
-(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,z,u,H,L){var C=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(C.getSvg(x,z,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),V=C.getGraphBounds(),U=Math.floor(V.width*z/C.view.scale),Y=Math.floor(V.height*z/C.view.scale);if(G.length<=MAX_REQUEST_SIZE&&
-U*Y<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var O={globalVars:C.getExportVariables()};L&&(O.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+U+"&h="+Y+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==
-g?d.exportImage(z,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,L,H):d.exportImage(z,!1,!0,!1,!1,u,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,z,u,H,K){var C=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(C.getSvg(x,z,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),V=C.getGraphBounds(),U=Math.floor(V.width*z/C.view.scale),Y=Math.floor(V.height*z/C.view.scale);if(G.length<=MAX_REQUEST_SIZE&&
+U*Y<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var O={globalVars:C.getExportVariables()};K&&(O.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+U+"&h="+Y+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==
+g?d.exportImage(z,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,K,H):d.exportImage(z,!1,!0,!1,!1,u,!0,!1,"jpeg",K);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=
this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var L=H[d];if("R"==L.substring(0,1)){var C=JSON.parse(decodeURIComponent(L.substring(1)));u[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){z.innerText="";if(0==G.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var K=H[d];if("R"==K.substring(0,1)){var C=JSON.parse(decodeURIComponent(K.substring(1)));u[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){z.innerText="";if(0==G.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var V=0;V<G.length;V++){var U=G[V];u[U.id]&&(f[U.id]=U);var Y=this.addCheckbox(z,U.title,u[U.id]);(function(O,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[O.id]=O:delete f[O.id]})})(U,Y)}},mxUtils.bind(this,function(G){z.innerText="";var V=document.createElement("div");V.style.padding="8px";V.style.textAlign="center";mxUtils.write(V,mxResources.get("error")+": ");mxUtils.write(V,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));z.appendChild(V)}));
g.appendChild(z);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,V;for(V in f)null==u[V]&&(G++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(Y){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Y,U))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(f[V]));for(V in u)f[V]||this.closeLibrary(new RemoteLibrary(this,null,u[V]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
-(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,z){var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(H);u&&z.apply(this,
-arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:C});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,V){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=V?U.error={errResp:V}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),
-"*")});try{var x=d.funtionName,z=this.remoteInvokableFns[x];if(null!=z&&"function"===typeof this[x]){if(z.allowedDomains){for(var u=!1,H=0;H<z.allowedDomains.length;H++)if(f=="https://"+z.allowedDomains[H]){u=!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var L=d.functionArgs;Array.isArray(L)||(L=[]);if(z.isAsync)L.push(function(){g(Array.prototype.slice.apply(arguments))}),L.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,L);else{var C=this[x].apply(this,L);
+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,z){var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),K=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(H);u&&z.apply(this,
+arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:K,error:C});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,V){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=V?U.error={errResp:V}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),
+"*")});try{var x=d.funtionName,z=this.remoteInvokableFns[x];if(null!=z&&"function"===typeof this[x]){if(z.allowedDomains){for(var u=!1,H=0;H<z.allowedDomains.length;H++)if(f=="https://"+z.allowedDomains[H]){u=!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var K=d.functionArgs;Array.isArray(K)||(K=[]);if(z.isAsync)K.push(function(){g(Array.prototype.slice.apply(arguments))}),K.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,K);else{var C=this[x].apply(this,K);
g([C])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(z){try{var u=x.result;1>z.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",
-{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(z){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display=
-"none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var C=!0,G=!1,V,U=0,Y=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;qa()}),qa=mxUtils.bind(this,function(){try{if(U>=V.length)Y();else{var aa=V[U];StorageFile.getFileContent(this,aa,mxUtils.bind(this,
-function(ca){null==ca||".scratchpad"==aa&&ca==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):O()}),O)}}catch(ca){console.log(ca)}}),oa=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],O,O,["filesInfo","files"])}catch(ca){console.log(ca)}});H=mxUtils.bind(this,function(aa){try{if(aa.source==
-L.contentWindow){var ca={};try{ca=JSON.parse(aa.data)}catch(fa){}"init"==ca.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ca.event||G||(C?null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?(V=ca.resp[0],C=!1,qa()):Y():null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?oa(ca.resp[0]):O())}}catch(fa){console.log(fa)}});window.addEventListener("message",
-H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(z){null!=f&&f(z)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,x,z){this.openDatabase(mxUtils.bind(this,function(u){try{z=z||"objects";Array.isArray(z)||(z=[z],d=[d],f=[f]);var H=u.transaction(z,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<z.length;u++)H.objectStore(z[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(L){null!=x&&x(L)}}),x)};
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(z){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var K=document.createElement("iframe");K.style.display=
+"none";K.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(K);var C=!0,G=!1,V,U=0,Y=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);K.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;qa()}),qa=mxUtils.bind(this,function(){try{if(U>=V.length)Y();else{var aa=V[U];StorageFile.getFileContent(this,aa,mxUtils.bind(this,
+function(ca){null==ca||".scratchpad"==aa&&ca==this.emptyLibraryXml?K.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):O()}),O)}}catch(ca){console.log(ca)}}),oa=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],O,O,["filesInfo","files"])}catch(ca){console.log(ca)}});H=mxUtils.bind(this,function(aa){try{if(aa.source==
+K.contentWindow){var ca={};try{ca=JSON.parse(aa.data)}catch(fa){}"init"==ca.event?(K.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),K.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ca.event||G||(C?null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?(V=ca.resp[0],C=!1,qa()):Y():null!=ca.resp&&0<ca.resp.length&&null!=ca.resp[0]?oa(ca.resp[0]):O())}}catch(fa){console.log(fa)}});window.addEventListener("message",
+H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(z){null!=f&&f(z)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,x,z){this.openDatabase(mxUtils.bind(this,function(u){try{z=z||"objects";Array.isArray(z)||(z=[z],d=[d],f=[f]);var H=u.transaction(z,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<z.length;u++)H.objectStore(z[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(K){null!=x&&x(K)}}),x)};
EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);z=z.transaction(x,"readwrite");z.oncomplete=f;z.onerror=g;for(var u=0;u<x.length;u++)z.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){try{x=x||"objects";var u=z.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=
g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var z=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),u=[];z.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};z.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";
var z=x.transaction([g],"readonly").objectStore(g).getAllKeys();z.onsuccess=function(){d(z.result)};z.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
-DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,x,z,u,H,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,z,u,H,L)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,z,u,H,L,C,G,V,U,Y,O,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,f,g,x,z,u,H,L,C,G,V,U,Y,O,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,x,z,u,H,K){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,z,u,H,K)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,z,u,H,K,C,G,V,U,Y,O,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(d,f,g,x,z,u,H,K,C,G,V,U,Y,O,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(d,f,g,x,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var z="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(z||
x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,D,p){function E(){for(var aa=G.getElementsByTagName("div"),ca=0,fa=0;fa<aa.length;fa++)"none"!=aa[fa].style.display&&aa[fa].parentNode==G&&ca++;V.style.display=0==ca?"block":"none"}function K(aa,ca,fa,J){function Z(){ca.removeChild(ja);ca.removeChild(ka);da.style.display="block";P.style.display="block"}H={div:ca,comment:aa,saveCallback:fa,deleteOnCancel:J};var P=ca.querySelector(".geCommentTxt"),da=ca.querySelector(".geCommentActionsList"),ja=document.createElement("textarea");
+var CommentsWindow=function(b,e,k,m,D,p){function E(){for(var aa=G.getElementsByTagName("div"),ca=0,fa=0;fa<aa.length;fa++)"none"!=aa[fa].style.display&&aa[fa].parentNode==G&&ca++;V.style.display=0==ca?"block":"none"}function L(aa,ca,fa,J){function Z(){ca.removeChild(ja);ca.removeChild(ka);da.style.display="block";P.style.display="block"}H={div:ca,comment:aa,saveCallback:fa,deleteOnCancel:J};var P=ca.querySelector(".geCommentTxt"),da=ca.querySelector(".geCommentActionsList"),ja=document.createElement("textarea");
ja.className="geCommentEditTxtArea";ja.style.minHeight=P.offsetHeight+"px";ja.value=aa.content;ca.insertBefore(ja,P);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){J?(ca.parentNode.removeChild(ca),E()):Z();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){P.innerText="";aa.content=ja.value;mxUtils.write(P,aa.content);Z();fa(aa);H=null});mxEvent.addListener(ja,
"keydown",mxUtils.bind(this,function(R){mxEvent.isConsumed(R)||((mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R))&&13==R.keyCode?(F.click(),mxEvent.consume(R)):27==R.keyCode&&(q.click(),mxEvent.consume(R)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);ca.insertBefore(ka,P);da.style.display="none";P.style.display="none";ja.focus()}function Q(aa,ca){ca.innerText="";aa=new Date(aa.modifiedDate);var fa=b.timeSince(aa);null==fa&&(fa=mxResources.get("lessThanAMinute"));
mxUtils.write(ca,mxResources.get("timeAgo",[fa],"{1} ago"));ca.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function d(aa){var ca=document.createElement("img");ca.className="geCommentBusyImg";ca.src=IMAGE_PATH+"/spin.gif";aa.appendChild(ca);aa.busyImg=ca}function f(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function g(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function x(aa,ca,fa,J,Z){function P(T,ba,ia){var ra=document.createElement("li");ra.className=
"geCommentAction";var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,T);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(ma){ba(ma,aa);ma.preventDefault();mxEvent.consume(ma)});W.appendChild(ra);ia&&(ra.style.display="none")}function da(){function T(ra){ba.push(ia);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ia=ia.nextSibling,T(ra.replies[ta])}var ba=[],ia=ka;T(aa);return{pdiv:ia,replies:ba}}function ja(T,ba,ia,ra,ta){function ma(){d(Ia);
-aa.addReply(Ba,function(Aa){Ba.id=Aa;aa.replies.push(Ba);g(Ia);ia&&ia()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ba,Ia,function(Aa){ma()},!0)}var za=da().pdiv,Ba=b.newComment(T,b.getCurrentUser());Ba.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Ia=x(Ba,aa.replies,za,J+1);ba?pa():ma()}if(Z||!aa.isResolved){V.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
+aa.addReply(Ba,function(Aa){Ba.id=Aa;aa.replies.push(Ba);g(Ia);ia&&ia()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){L(Ba,Ia,function(Aa){ma()},!0)}var za=da().pdiv,Ba=b.newComment(T,b.getCurrentUser());Ba.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Ia=x(Ba,aa.replies,za,J+1);ba?pa():ma()}if(Z||!aa.isResolved){V.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*J+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R,
aa.user.displayName||"");F.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",aa.id);Q(aa,R);F.appendChild(R);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";q.appendChild(W);z||aa.isLocked||0!=J&&
-!u||P(mxResources.get("reply"),function(){ja("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||z||aa.isLocked||(P(mxResources.get("edit"),function(){function T(){K(aa,ka,function(){d(ka);aa.editComment(aa.content,function(){g(ka)},function(ba){f(ka);T();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},aa.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);aa.deleteComment(function(T){if(!0===
+!u||P(mxResources.get("reply"),function(){ja("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||z||aa.isLocked||(P(mxResources.get("edit"),function(){function T(){L(aa,ka,function(){d(ka);aa.editComment(aa.content,function(){g(ka)},function(ba){f(ka);T();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},aa.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);aa.deleteComment(function(T){if(!0===
T){T=ka.querySelector(".geCommentTxt");T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(T=0;T<ba.length;T++)ba[T].parentNode.removeChild(ba[T]);g(ka);ka.style.opacity="0.5"}else{ba=da(aa).replies;for(T=0;T<ba.length;T++)G.removeChild(ba[T]);for(T=0;T<ca.length;T++)if(ca[T]==aa){ca.splice(T,1);break}V.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(T){f(ka);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
aa.isResolved));z||aa.isLocked||0!=J||P(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function ba(){var ia=T.target;ia.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ia,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=aa.isResolved?"none":"",ta=da(aa).replies,ma=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=ma;for(var za=ta[pa].querySelectorAll(".geCommentAction"),
-Ba=0;Ba<za.length;Ba++)za[Ba]!=ia.parentNode&&(za[Ba].style.display=ra);O||(ta[pa].style.display="none")}E()}aa.isResolved?ja(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ja(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=fa?G.insertBefore(ka,fa.nextSibling):G.appendChild(ka);for(fa=0;null!=aa.replies&&fa<aa.replies.length;fa++)q=aa.replies[fa],q.isResolved=aa.isResolved,x(q,aa.replies,null,J+1,Z);null!=H&&(H.comment.id==aa.id?(Z=aa.content,aa.content=H.comment.content,K(aa,
-ka,H.saveCallback,H.deleteOnCancel),aa.content=Z):null==H.comment.id&&H.comment.pCommentId==aa.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var z=!b.canComment(),u=b.canReplyToReplies(),H=null,L=document.createElement("div");L.className="geCommentsWin";L.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";G.style.bottom=parseInt(C)+7+"px";L.appendChild(G);var V=document.createElement("span");V.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(V,mxResources.get("noCommentsFound"));var U=document.createElement("div");U.className="geToolbarContainer geCommentsToolbar";U.style.height=C;U.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
-C.className="geButton";if(!z){var Y=C.cloneNode();Y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(aa){function ca(){K(fa,J,function(Z){d(J);b.addComment(Z,function(P){Z.id=P;qa.push(Z);g(J)},function(P){f(J);ca();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var fa=b.newComment("",b.getCurrentUser()),J=x(fa,qa,null,0);
+Ba=0;Ba<za.length;Ba++)za[Ba]!=ia.parentNode&&(za[Ba].style.display=ra);O||(ta[pa].style.display="none")}E()}aa.isResolved?ja(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ja(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=fa?G.insertBefore(ka,fa.nextSibling):G.appendChild(ka);for(fa=0;null!=aa.replies&&fa<aa.replies.length;fa++)q=aa.replies[fa],q.isResolved=aa.isResolved,x(q,aa.replies,null,J+1,Z);null!=H&&(H.comment.id==aa.id?(Z=aa.content,aa.content=H.comment.content,L(aa,
+ka,H.saveCallback,H.deleteOnCancel),aa.content=Z):null==H.comment.id&&H.comment.pCommentId==aa.id&&(G.appendChild(H.div),L(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var z=!b.canComment(),u=b.canReplyToReplies(),H=null,K=document.createElement("div");K.className="geCommentsWin";K.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";G.style.bottom=parseInt(C)+7+"px";K.appendChild(G);var V=document.createElement("span");V.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(V,mxResources.get("noCommentsFound"));var U=document.createElement("div");U.className="geToolbarContainer geCommentsToolbar";U.style.height=C;U.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
+C.className="geButton";if(!z){var Y=C.cloneNode();Y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(aa){function ca(){L(fa,J,function(Z){d(J);b.addComment(Z,function(P){Z.id=P;qa.push(Z);g(J)},function(P){f(J);ca();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var fa=b.newComment("",b.getCurrentUser()),J=x(fa,qa,null,0);
ca();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y)}Y=C.cloneNode();Y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Y.setAttribute("title",mxResources.get("showResolved"));Y.className="geAdaptiveAsset";var O=!1;mxEvent.addListener(Y,"click",function(aa){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";oa();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y);b.commentsRefreshNeeded()&&(Y=C.cloneNode(),Y.innerHTML='<img src="'+IMAGE_PATH+
'/update16.png" style="width: 16px; padding: 2px;">',Y.setAttribute("title",mxResources.get("refresh")),Y.className="geAdaptiveAsset",mxEvent.addListener(Y,"click",function(aa){oa();aa.preventDefault();mxEvent.consume(aa)}),U.appendChild(Y));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(aa){p();aa.preventDefault();
-mxEvent.consume(aa)}),U.appendChild(C));L.appendChild(U);var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var aa=H.div.querySelector(".geCommentEditTxtArea"),ca=H.div.querySelector(".geCommentEditBtns");H.comment.content=aa.value;aa.parentNode.removeChild(aa);ca.parentNode.removeChild(ca)}catch(fa){b.handleError(fa)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+mxEvent.consume(aa)}),U.appendChild(C));K.appendChild(U);var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var aa=H.div.querySelector(".geCommentEditTxtArea"),ca=H.div.querySelector(".geCommentEditBtns");H.comment.content=aa.value;aa.parentNode.removeChild(aa);ca.parentNode.removeChild(ca)}catch(fa){b.handleError(fa)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(fa){function J(Z){if(null!=Z){Z.sort(function(da,ja){return new Date(da.modifiedDate)-new Date(ja.modifiedDate)});for(var P=0;P<Z.length;P++)J(Z[P].replies)}}fa.sort(function(Z,P){return new Date(Z.modifiedDate)-new Date(P.modifiedDate)});G.innerText="";G.appendChild(V);V.style.display="block";qa=fa;for(fa=0;fa<qa.length;fa++)J(qa[fa].replies),x(qa[fa],qa,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&
-(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(fa){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(fa&&fa.message?": "+fa.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;U=mxUtils.bind(this,function(){function aa(P){var da=fa[P.id];if(null!=da)for(Q(P,da),da=0;null!=P.replies&&da<P.replies.length;da++)aa(P.replies[da])}if(this.window.isVisible()){for(var ca=
-G.querySelectorAll(".geCommentDate"),fa={},J=0;J<ca.length;J++){var Z=ca[J];fa[Z.getAttribute("data-commentId")]=Z}for(J=0;J<qa.length;J++)aa(qa[J])}});setInterval(U,6E4);this.refreshCommentsTime=U;this.window=new mxWindow(mxResources.get("comments"),L,e,k,m,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,D,p,E,K,Q,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
-d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var z=document.createElement("input");z.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(z.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(D||
+(G.appendChild(H.div),L(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(fa){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(fa&&fa.message?": "+fa.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;U=mxUtils.bind(this,function(){function aa(P){var da=fa[P.id];if(null!=da)for(Q(P,da),da=0;null!=P.replies&&da<P.replies.length;da++)aa(P.replies[da])}if(this.window.isVisible()){for(var ca=
+G.querySelectorAll(".geCommentDate"),fa={},J=0;J<ca.length;J++){var Z=ca[J];fa[Z.getAttribute("data-commentId")]=Z}for(J=0;J<qa.length;J++)aa(qa[J])}});setInterval(U,6E4);this.refreshCommentsTime=U;this.window=new mxWindow(mxResources.get("comments"),K,e,k,m,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,D,p,E,L,Q,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var z=document.createElement("input");z.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(z.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(D||
mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(z.checked)});d.appendChild(u);null!=E?(u.innerHTML=E+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);Q?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(z),D=document.createElement("span"),
mxUtils.write(D," "+mxResources.get("rememberThisSetting")),x.appendChild(D),g.appendChild(x),mxEvent.addListener(D,"click",function(H){z.checked=!z.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.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)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
@@ -3852,16 +3852,16 @@ function ChangePage(b,e,k,m,D){SelectPage.call(this,b,k);this.relatedPage=e;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),D=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(D=this.getImageForPage(m,e,k),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,D=this.createTemporaryGraph(k.getStylesheet());D.defaultPageBackgroundColor=k.defaultPageBackgroundColor;D.shapeBackgroundColor=k.shapeBackgroundColor;D.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);D.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(D.container);
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,D=this.createTemporaryGraph(k.getStylesheet());D.defaultPageBackgroundColor=k.defaultPageBackgroundColor;D.shapeBackgroundColor=k.shapeBackgroundColor;D.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);D.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(D.container);
this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";D!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=k&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),k=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,
p){D=p.getProperty("edit").changes;for(p=0;p<D.length;p++)if(D[p]instanceof SelectPage||D[p]instanceof RenamePage||D[p]instanceof MovePage||D[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}};
+mxSettings.getPageFormat():new mxRectangle(0,0,m,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(D){return D.name+"^"+D.url}).join("|"))};
@@ -3881,7 +3881,7 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=m.createCellLookup([m.model.root]);k=new DiagramPage(D);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=m.createCellLookup([m.model.root]);k=new DiagramPage(D);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(Q){this.handleError(Q)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -3889,44 +3889,44 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
1),D=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),D=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){D=null;g.stopPropagation();
g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=D&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=D&&d!=D&&this.movePage(D,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var K=this.createControlTab(4,"&nbsp;&#10095;");K.style.position="absolute";
-K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var Q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=Q+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var L=this.createControlTab(4,"&nbsp;&#10095;");L.style.position="absolute";
+L.style.right=this.editor.chromeless?"0px":"29px";L.style.fontSize="13pt";this.tabContainer.appendChild(L);var Q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=Q+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var D=new mxPopupMenu(mxUtils.bind(this,function(K,Q){var d=mxUtils.bind(this,function(){for(var z=0;z<this.pages.length;z++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),Q),L=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=L?" ["+L+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(z)}),f=mxUtils.bind(this,
-function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),Q)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(Q),f());var g=this.currentPage;if(null!=g){K.addSeparator(Q);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),Q);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),Q);e||K.addSeparator(Q);K.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),Q)}}e&&(K.addSeparator(Q),f(),K.addSeparator(Q),d())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(m),E=mxEvent.getClientY(m);D.popup(p,E,null,m);this.setCurrentMenu(D);mxEvent.consume(m)}));return b};
+var D=new mxPopupMenu(mxUtils.bind(this,function(L,Q){var d=mxUtils.bind(this,function(){for(var z=0;z<this.pages.length;z++)mxUtils.bind(this,function(u){var H=L.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),Q),K=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=K?" ["+K+"]":""));this.pages[u]==this.currentPage&&L.addCheckmark(H,Editor.checkmarkImage)})(z)}),f=mxUtils.bind(this,
+function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),Q)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(Q),f());var g=this.currentPage;if(null!=g){L.addSeparator(Q);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),Q);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),Q);e||L.addSeparator(Q);L.addItem(mxResources.get("duplicateIt",
+[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),Q)}}e&&(L.addSeparator(Q),f(),L.addSeparator(Q),d())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(m),E=mxEvent.getClientY(m);D.popup(p,E,null,m);this.setCurrentMenu(D);mxEvent.consume(m)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var D=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",D+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,D);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,D=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;D=b==this.currentPage;k.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&D||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var K=mxEvent.getClientX(p),Q=mxEvent.getClientY(p);E.popup(K,Q,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var L=mxEvent.getClientX(p),Q=mxEvent.getClientY(p);E.popup(L,Q,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=e&&(D+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+m.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,K,Q,d,f){p=this.createUrlParameters(p,E,K,Q,d,f);K||p.push("hide-pages=1");D.isSelectionEmpty()||(K=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,d=D.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-E.x,K.y=K.y/d-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,L,Q,d,f){p=this.createUrlParameters(p,E,L,Q,d,f);L||p.push("hide-pages=1");D.isSelectionEmpty()||(L=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,d=D.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-E.x,L.y=L.y/d-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
Q=new EmbedDialog(this,this.getLinkForPage(b,p,Q));this.showDialog(Q.container,450,240,!0,!0);Q.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(D,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(m.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(m.relatedPage.root=e.decodeCell(D,
-!1),m=D.nextSibling,D.parentNode.removeChild(D),D=m;null!=D;){m=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==e.lookup(p)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,D,p,E,K){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=Q;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(K,Q){var d=null!=Q&&this.isTreeEdge(Q);d&&p.push(Q);K==D||null!=Q&&!d||p.push(K);return(null==Q||d)&&(K==D||!this.model.isCollapsed(K))}));this.model.setCollapsed(D,m);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,D,p,E,K,Q){return this.model.filterCells(this.getEdges(m,
-D,p,E,K,Q),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(J){return H.isVertex(J)&&p(J)}function D(J){var Z=
-!1;null!=J&&(Z="1"==u.getCurrentCellStyle(J).treeMoving);return Z}function p(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),Z="tree"==(null!=Z?Z.style:u.getCellStyle(J)).containerType);return Z}function E(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),u.view.getState(J),Z=null!=(null!=Z?Z.style:u.getCellStyle(J)).childLayout);return Z}function K(J){J=u.view.getState(J);if(null!=J){var Z=u.getIncomingTreeEdges(J.cell);if(0<Z.length&&(Z=u.view.getState(Z[0]),null!=Z&&(Z=Z.absolutePoints,
+!1),m=D.nextSibling,D.parentNode.removeChild(D),D=m;null!=D;){m=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==e.lookup(p)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,D,p,E,L){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=Q;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(m,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(L,Q){var d=null!=Q&&this.isTreeEdge(Q);d&&p.push(Q);L==D||null!=Q&&!d||p.push(L);return(null==Q||d)&&(L==D||!this.model.isCollapsed(L))}));this.model.setCollapsed(D,m);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,D,p,E,L,Q){return this.model.filterCells(this.getEdges(m,
+D,p,E,L,Q),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,D){return this.getTreeEdges(m,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(J){return H.isVertex(J)&&p(J)}function D(J){var Z=
+!1;null!=J&&(Z="1"==u.getCurrentCellStyle(J).treeMoving);return Z}function p(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),Z="tree"==(null!=Z?Z.style:u.getCellStyle(J)).containerType);return Z}function E(J){var Z=!1;null!=J&&(J=H.getParent(J),Z=u.view.getState(J),u.view.getState(J),Z=null!=(null!=Z?Z.style:u.getCellStyle(J)).childLayout);return Z}function L(J){J=u.view.getState(J);if(null!=J){var Z=u.getIncomingTreeEdges(J.cell);if(0<Z.length&&(Z=u.view.getState(Z[0]),null!=Z&&(Z=Z.absolutePoints,
null!=Z&&0<Z.length&&(Z=Z[Z.length-1],null!=Z)))){if(Z.y==J.y&&Math.abs(Z.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(Z.y==J.y+J.height&&Math.abs(Z.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(Z.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function Q(J,Z){Z=null!=Z?Z:!0;u.model.beginUpdate();try{var P=u.model.getParent(J),da=u.getIncomingTreeEdges(J),ja=u.cloneCells([da[0],J]);u.model.setTerminal(ja[0],u.model.getTerminal(da[0],
-!0),!0);var ka=K(J),q=P.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=Z?J.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=Z?J.geometry.height+10:-ja[1].geometry.height-10;u.view.currentRoot!=P&&(ja[1].geometry.x-=q.x,ja[1].geometry.y-=q.y);var F=u.view.getState(J),R=u.view.scale;if(null!=F){var W=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W.x+=(Z?J.geometry.width+10:-ja[1].geometry.width-
-10)*R:W.y+=(Z?J.geometry.height+10:-ja[1].geometry.height-10)*R;var T=u.getOutgoingTreeEdges(u.model.getTerminal(da[0],!0));if(null!=T){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ia=q=da=0;ia<T.length;ia++){var ra=u.model.getTerminal(T[ia],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY())&&mxUtils.intersects(W,ta)&&(da=10+Math.max(da,(Math.min(W.x+W.width,ta.x+ta.width)-Math.max(W.x,
-ta.x))/R),q=10+Math.max(q,(Math.min(W.y+W.height,ta.y+ta.height)-Math.max(W.y,ta.y))/R))}}ba?q=0:da=0;for(ia=0;ia<T.length;ia++)if(ra=u.model.getTerminal(T[ia],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY()))){var ma=[];u.traverse(ta.cell,!0,function(pa,za){var Ba=null!=za&&u.isTreeEdge(za);Ba&&ma.push(za);(null==za||Ba)&&ma.push(pa);return null==za||Ba});u.moveCells(ma,(Z?1:-1)*da,(Z?1:-1)*q)}}}return u.addCells(ja,
-P)}finally{u.model.endUpdate()}}function d(J){u.model.beginUpdate();try{var Z=K(J),P=u.getIncomingTreeEdges(J),da=u.cloneCells([P[0],J]);u.model.setTerminal(P[0],da[1],!1);u.model.setTerminal(da[0],da[1],!0);u.model.setTerminal(da[0],J,!1);var ja=u.model.getParent(J),ka=ja.geometry,q=[];u.view.currentRoot!=ja&&(da[1].geometry.x-=ka.x,da[1].geometry.y-=ka.y);u.traverse(J,!0,function(W,T){var ba=null!=T&&u.isTreeEdge(T);ba&&q.push(T);(null==T||ba)&&q.push(W);return null==T||ba});var F=J.geometry.width+
-40,R=J.geometry.height+40;Z==mxConstants.DIRECTION_SOUTH?F=0:Z==mxConstants.DIRECTION_NORTH?(F=0,R=-R):Z==mxConstants.DIRECTION_WEST?(F=-F,R=0):Z==mxConstants.DIRECTION_EAST&&(R=0);u.moveCells(q,F,R);return u.addCells(da,ja)}finally{u.model.endUpdate()}}function f(J,Z){u.model.beginUpdate();try{var P=u.model.getParent(J),da=u.getIncomingTreeEdges(J),ja=K(J);0==da.length&&(da=[u.createEdge(P,null,"",null,null,u.createCurrentEdgeStyle())],ja=Z);var ka=u.cloneCells([da[0],J]);u.model.setTerminal(ka[0],
+!0),!0);var ka=L(J),q=P.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=Z?J.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=Z?J.geometry.height+10:-ja[1].geometry.height-10;u.view.currentRoot!=P&&(ja[1].geometry.x-=q.x,ja[1].geometry.y-=q.y);var F=u.view.getState(J),R=u.view.scale;if(null!=F){var W=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W.x+=(Z?J.geometry.width+10:-ja[1].geometry.width-
+10)*R:W.y+=(Z?J.geometry.height+10:-ja[1].geometry.height-10)*R;var T=u.getOutgoingTreeEdges(u.model.getTerminal(da[0],!0));if(null!=T){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ia=q=da=0;ia<T.length;ia++){var ra=u.model.getTerminal(T[ia],!1);if(ka==L(ra)){var ta=u.view.getState(ra);ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY())&&mxUtils.intersects(W,ta)&&(da=10+Math.max(da,(Math.min(W.x+W.width,ta.x+ta.width)-Math.max(W.x,
+ta.x))/R),q=10+Math.max(q,(Math.min(W.y+W.height,ta.y+ta.height)-Math.max(W.y,ta.y))/R))}}ba?q=0:da=0;for(ia=0;ia<T.length;ia++)if(ra=u.model.getTerminal(T[ia],!1),ka==L(ra)&&(ta=u.view.getState(ra),ra!=J&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY()))){var ma=[];u.traverse(ta.cell,!0,function(pa,za){var Ba=null!=za&&u.isTreeEdge(za);Ba&&ma.push(za);(null==za||Ba)&&ma.push(pa);return null==za||Ba});u.moveCells(ma,(Z?1:-1)*da,(Z?1:-1)*q)}}}return u.addCells(ja,
+P)}finally{u.model.endUpdate()}}function d(J){u.model.beginUpdate();try{var Z=L(J),P=u.getIncomingTreeEdges(J),da=u.cloneCells([P[0],J]);u.model.setTerminal(P[0],da[1],!1);u.model.setTerminal(da[0],da[1],!0);u.model.setTerminal(da[0],J,!1);var ja=u.model.getParent(J),ka=ja.geometry,q=[];u.view.currentRoot!=ja&&(da[1].geometry.x-=ka.x,da[1].geometry.y-=ka.y);u.traverse(J,!0,function(W,T){var ba=null!=T&&u.isTreeEdge(T);ba&&q.push(T);(null==T||ba)&&q.push(W);return null==T||ba});var F=J.geometry.width+
+40,R=J.geometry.height+40;Z==mxConstants.DIRECTION_SOUTH?F=0:Z==mxConstants.DIRECTION_NORTH?(F=0,R=-R):Z==mxConstants.DIRECTION_WEST?(F=-F,R=0):Z==mxConstants.DIRECTION_EAST&&(R=0);u.moveCells(q,F,R);return u.addCells(da,ja)}finally{u.model.endUpdate()}}function f(J,Z){u.model.beginUpdate();try{var P=u.model.getParent(J),da=u.getIncomingTreeEdges(J),ja=L(J);0==da.length&&(da=[u.createEdge(P,null,"",null,null,u.createCurrentEdgeStyle())],ja=Z);var ka=u.cloneCells([da[0],J]);u.model.setTerminal(ka[0],
J,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),R;for(R in F)u.setCellStyles(R,F[R],[ka[0]]),"edgeStyle"==R&&"elbowEdgeStyle"==F[R]&&u.setCellStyles("elbow",ja==mxConstants.DIRECTION_SOUTH||ja==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}da=u.getOutgoingTreeEdges(J);var W=P.geometry;Z=[];u.view.currentRoot==P&&(W=new mxRectangle);for(q=0;q<da.length;q++){var T=
u.model.getTerminal(da[q],!1);null!=T&&Z.push(T)}var ba=u.view.getBounds(Z),ia=u.view.translate,ra=u.view.scale;ja==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?J.geometry.x+(J.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ia.x-W.x+10,ka[1].geometry.y+=ka[1].geometry.height-W.y+40):ja==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?J.geometry.x+(J.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ia.x+-W.x+10,ka[1].geometry.y-=ka[1].geometry.height+W.y+40):(ka[1].geometry.x=
ja==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+W.x+40):ka[1].geometry.x+(ka[1].geometry.width-W.x+40),ka[1].geometry.y=null==ba?J.geometry.y+(J.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ia.y+-W.y+10);return u.addCells(ka,P)}finally{u.model.endUpdate()}}function g(J,Z,P){J=u.getOutgoingTreeEdges(J);P=u.view.getState(P);var da=[];if(null!=P&&null!=J){for(var ja=0;ja<J.length;ja++){var ka=u.view.getState(u.model.getTerminal(J[ja],!1));null!=ka&&(!Z&&Math.min(ka.x+
-ka.width,P.x+P.width)>=Math.max(ka.x,P.x)||Z&&Math.min(ka.y+ka.height,P.y+P.height)>=Math.max(ka.y,P.y))&&da.push(ka)}da.sort(function(q,F){return Z?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return da}function x(J,Z){var P=K(J),da=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==da&&P!=Z?z.actions.get("selectParent").funct():P==Z?(Z=u.getOutgoingTreeEdges(J),null!=Z&&0<Z.length&&u.setSelectionCell(u.model.getTerminal(Z[0],
-!1))):(P=u.getIncomingTreeEdges(J),null!=P&&0<P.length&&(da=g(u.model.getTerminal(P[0],!0),da,J),J=u.view.getState(J),null!=J&&(J=mxUtils.indexOf(da,J),0<=J&&(J+=Z==mxConstants.DIRECTION_NORTH||Z==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=da.length-1&&u.setSelectionCell(da[J].cell)))))}var z=this,u=z.editor.graph,H=u.getModel(),L=z.menus.createPopupMenu;z.menus.createPopupMenu=function(J,Z,P){L.apply(this,arguments);if(1==u.getSelectionCount()){Z=u.getSelectionCell();var da=u.getOutgoingTreeEdges(Z);
+ka.width,P.x+P.width)>=Math.max(ka.x,P.x)||Z&&Math.min(ka.y+ka.height,P.y+P.height)>=Math.max(ka.y,P.y))&&da.push(ka)}da.sort(function(q,F){return Z?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return da}function x(J,Z){var P=L(J),da=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==da&&P!=Z?z.actions.get("selectParent").funct():P==Z?(Z=u.getOutgoingTreeEdges(J),null!=Z&&0<Z.length&&u.setSelectionCell(u.model.getTerminal(Z[0],
+!1))):(P=u.getIncomingTreeEdges(J),null!=P&&0<P.length&&(da=g(u.model.getTerminal(P[0],!0),da,J),J=u.view.getState(J),null!=J&&(J=mxUtils.indexOf(da,J),0<=J&&(J+=Z==mxConstants.DIRECTION_NORTH||Z==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=da.length-1&&u.setSelectionCell(da[J].cell)))))}var z=this,u=z.editor.graph,H=u.getModel(),K=z.menus.createPopupMenu;z.menus.createPopupMenu=function(J,Z,P){K.apply(this,arguments);if(1==u.getSelectionCount()){Z=u.getSelectionCell();var da=u.getOutgoingTreeEdges(Z);
J.addSeparator();0<da.length&&(m(u.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,P),this.addMenuItems(J,["selectDescendants"],null,P));m(u.getSelectionCell())?(J.addSeparator(),0<u.getIncomingTreeEdges(Z).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,P)):0<u.model.getEdgeCount(Z)&&this.addMenuItems(J,["selectConnections"],null,P)}};z.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var J=u.getSelectionCell();J=u.getOutgoingTreeEdges(J);
if(null!=J){for(var Z=[],P=0;P<J.length;P++)Z.push(u.model.getTerminal(J[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+X");z.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var J=u.getSelectionCell();J=u.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=u.getOutgoingTreeEdges(u.model.getTerminal(J[0],!0)),null!=J)){for(var Z=[],P=0;P<J.length;P++)Z.push(u.model.getTerminal(J[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+S");z.actions.addAction("selectParent",
function(){if(u.isEnabled()&&1==u.getSelectionCount()){var J=u.getSelectionCell();J=u.getIncomingTreeEdges(J);null!=J&&0<J.length&&u.setSelectionCell(u.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");z.actions.addAction("selectDescendants",function(J,Z){J=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(J)){if(null!=Z&&mxEvent.isAltDown(Z))u.setSelectionCells(u.model.getTreeEdges(J,null==Z||!mxEvent.isShiftDown(Z),null==Z||!mxEvent.isControlDown(Z)));else{var P=[];u.traverse(J,!0,function(da,
@@ -3939,28 +3939,28 @@ R,!0);else if(0==u.getIncomingTreeEdges(F[T]).length){W=R;if(null==W||W==u.model
J,!0);var F=u.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{ja.endUpdate()}return ka}}var Y={88:z.actions.get("selectChildren"),84:z.actions.get("selectSubtree"),80:z.actions.get("selectParent"),83:z.actions.get("selectSiblings")},O=z.onKeyDown;z.onKeyDown=function(J){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var Z=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==J.which?Z=mxEvent.isShiftDown(J)?
d(u.getSelectionCell()):f(u.getSelectionCell()):13==J.which&&(Z=Q(u.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=Z&&0<Z.length)1==Z.length&&u.model.isEdge(Z[0])?u.setSelectionCell(u.model.getTerminal(Z[0],!1)):u.setSelectionCell(Z[Z.length-1]),null!=z.hoverIcons&&z.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var P=Y[J.keyCode];null!=P&&(P.funct(J),mxEvent.consume(J))}else 37==
J.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(da){z.handleError(da)}mxEvent.isConsumed(J)||O.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(J,Z,P,da,ja,ka,q){var F=u.getIncomingTreeEdges(J);
-if(m(J)){var R=K(J),W=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,T=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;return R==Z||0==F.length?f(J,Z):W==T?d(J):Q(J,Z!=mxConstants.DIRECTION_NORTH&&Z!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(J){var Z=[J];!D(J)&&!m(J)||E(J)||u.traverse(J,!0,function(P,da){var ja=null!=da&&u.isTreeEdge(da);ja&&0>mxUtils.indexOf(Z,da)&&Z.push(da);(null==da||ja)&&0>mxUtils.indexOf(Z,P)&&Z.push(P);return null==
+if(m(J)){var R=L(J),W=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,T=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;return R==Z||0==F.length?f(J,Z):W==T?d(J):Q(J,Z!=mxConstants.DIRECTION_NORTH&&Z!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(J){var Z=[J];!D(J)&&!m(J)||E(J)||u.traverse(J,!0,function(P,da){var ja=null!=da&&u.isTreeEdge(da);ja&&0>mxUtils.indexOf(Z,da)&&Z.push(da);(null==da||ja)&&0>mxUtils.indexOf(Z,P)&&Z.push(P);return null==
da||ja});return Z};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(D(this.state.cell)||m(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(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.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;z.hoverIcons.reset();mxEvent.consume(J)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){aa.apply(this,arguments);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 ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){ca.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var fa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(J,Z){fa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),D=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
-!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);p.insert(Q);p.insert(E);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=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};');
-E.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");Q.geometry.relative=!0;Q.edge=!0;
-E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);L.insertEdge(Q,!1);p.insert(Q);p.insert(E);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=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};');
+E.vertex=!0;var L=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};');L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");Q.geometry.relative=!0;Q.edge=!0;
+E.insertEdge(Q,!0);L.insertEdge(Q,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!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};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
x.geometry.relative=!0;x.edge=!0;E.insertEdge(x,!0);g.insertEdge(x,!1);var z=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};');z.vertex=!0;var u=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;E.insertEdge(u,!0);z.insertEdge(u,!1);p.insert(Q);p.insert(f);p.insert(x);p.insert(u);p.insert(E);p.insert(K);p.insert(d);p.insert(g);p.insert(z);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;E.insertEdge(u,!0);z.insertEdge(u,!1);p.insert(Q);p.insert(f);p.insert(x);p.insert(u);p.insert(E);p.insert(L);p.insert(d);p.insert(g);p.insert(z);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,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};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var E=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"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(Q);p.insert(f);p.insert(E);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
+p.vertex=!0;var E=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"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var L=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"};');
+L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);L.insertEdge(Q,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(Q);p.insert(f);p.insert(E);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");Q.geometry.setTerminalPoint(new mxPoint(110,-40),!0);Q.geometry.relative=
-!0;Q.edge=!0;K.insertEdge(Q,!1);return sb.createVertexTemplateFromCells([E,Q,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");Q.geometry.setTerminalPoint(new mxPoint(110,-40),!0);Q.geometry.relative=
+!0;Q.edge=!0;L.insertEdge(Q,!1);return sb.createVertexTemplateFromCells([E,Q,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(C,G){if(EditorUi.windowed){var V=C.editor.graph;V.popupMenuHandler.hideMenu();if(null==C.formatWindow){G="1"==urlParams.sketch?Math.max(10,C.diagramContainer.clientWidth-241):Math.max(10,C.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;V="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,V.container.clientHeight-10);C.formatWindow=new WrapperWindow(C,mxResources.get("format"),G,U,240,V,
function(Y){Y=C.createFormat(Y);Y.init();return Y});C.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.formatWindow.window.fit()}));C.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else C.formatWindow.window.setVisible(null!=G?G:!C.formatWindow.window.isVisible())}else null==C.formatElt&&(C.formatElt=C.createSidebarContainer(),C.createFormat(C.formatElt).init(),C.formatElt.style.border="none",C.formatElt.style.width="240px",C.formatElt.style.borderLeft="1px solid gray",
C.formatElt.style.right="0px"),V=C.diagramContainer.parentNode,null!=C.formatElt.parentNode?(C.formatElt.parentNode.removeChild(C.formatElt),V.style.right="0px"):(V.parentNode.appendChild(C.formatElt),V.style.right=C.formatElt.style.width)}function e(C,G){function V(qa,oa){var aa=C.menus.get(qa);qa=O.addMenu(oa,mxUtils.bind(this,function(){aa.funct.apply(this,arguments)}));qa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
@@ -3976,7 +3976,7 @@ mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;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";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var D=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");D.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",G.shortcut):E.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className=
+this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",G.shortcut):E.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className=
"geToolbarButton";C.innerText="";C.style.backgroundImage="url("+Editor.userImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";C.style.cssFloat="right";C.setAttribute("title",mxResources.get("changeUser"));if("none"!=C.style.display){C.style.display="inline-block";var G=this.getCurrentFile();if(null!=G&&G.isRealtimeEnabled()&&G.isRealtimeSupported()){var V=document.createElement("img");
V.setAttribute("border","0");V.style.position="absolute";V.style.left="18px";V.style.top="2px";V.style.width="12px";V.style.height="12px";var U=G.getRealtimeError();G=G.getRealtimeState();var Y=mxResources.get("realtimeCollaboration");1==G?(V.src=Editor.syncImage,Y+=" ("+mxResources.get("online")+")"):(V.src=Editor.syncProblemImage,Y=null!=U&&null!=U.message?Y+(" ("+U.message+")"):Y+(" ("+mxResources.get("disconnected")+")"));V.setAttribute("title",Y);C.style.paddingRight="4px";C.appendChild(V)}}}};
var Q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){Q.apply(this,arguments);if(null!=this.shareButton){var C=this.shareButton;C.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";C.className="geToolbarButton";C.innerText="";C.style.backgroundImage="url("+Editor.shareImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height=
@@ -4011,7 +4011,7 @@ Graph.translateDiagram&&C.menus.addMenuItems(ca,["diagramLanguage"],fa);C.mode!=
this.get("insert"),fa=ca.funct;ca.funct=function(J,Z){"1"==urlParams.sketch?(C.menus.addMenuItems(J,["toggleShapes"],Z),C.menus.addSubmenu("table",J,Z),J.addSeparator(Z),C.insertTemplateEnabled&&!C.isOffline()&&C.menus.addMenuItems(J,["insertTemplate"],Z),C.menus.addMenuItems(J,["insertImage","insertLink","-"],Z),C.menus.addSubmenu("insertAdvanced",J,Z,mxResources.get("advanced")),C.menus.addSubmenu("layout",J,Z)):(fa.apply(this,arguments),C.menus.addSubmenu("table",J,Z))}})();var oa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
aa=function(ca,fa,J,Z){ca.addItem(J,null,mxUtils.bind(this,function(){var P=new CreateGraphDialog(C,J,Z);C.showDialog(P.container,620,420,!0,!1);P.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(ca,fa){for(var J=0;J<oa.length;J++)"-"==oa[J]?ca.addSeparator(fa):aa(ca,fa,mxResources.get(oa[J])+"...",oa[J])})))};EditorUi.prototype.installFormatToolbar=function(C){var G=this.editor.graph,V=document.createElement("div");V.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
G.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,Y){0<G.getSelectionCount()?(C.appendChild(V),V.innerHTML="Selected: "+G.getSelectionCount()):null!=V.parentNode&&V.parentNode.removeChild(V)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width=
-"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(wa,
+"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(wa,
ua,La){var Oa=O.menus.get(wa),Ca=ca.addMenu(mxResources.get(wa),mxUtils.bind(this,function(){Oa.funct.apply(this,arguments)}),aa);Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.top="6px";Ca.style.marginRight="6px";Ca.style.height="30px";Ca.style.paddingTop="6px";Ca.style.paddingBottom="6px";Ca.style.cursor="pointer";Ca.setAttribute("title",mxResources.get(wa));O.menus.menuCreated(Oa,Ca,"geMenuItem");null!=
La?(Ca.style.backgroundImage="url("+La+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px",Ca.innerText=""):ua||(Ca.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ca.style.backgroundPosition="right 6px center",Ca.style.backgroundRepeat="no-repeat",Ca.style.paddingRight="22px");return Ca}function G(wa,ua,La,Oa,Ca,Ma){var Ga=document.createElement("a");Ga.className="1"==urlParams.sketch?"geToolbarButton":
"geMenuItem";Ga.style.display="inline-block";Ga.style.boxSizing="border-box";Ga.style.height="30px";Ga.style.padding="6px";Ga.style.position="relative";Ga.style.verticalAlign="top";Ga.style.top="0px";"1"==urlParams.sketch&&(Ga.style.borderStyle="none",Ga.style.boxShadow="none",Ga.style.padding="6px",Ga.style.margin="0px");null!=O.statusContainer?oa.insertBefore(Ga,O.statusContainer):oa.appendChild(Ga);null!=Ma?(Ga.style.backgroundImage="url("+Ma+")",Ga.style.backgroundPosition="center center",Ga.style.backgroundRepeat=
@@ -4022,7 +4022,7 @@ wa[Oa]&&("1"==urlParams.sketch&&(wa[Oa].style.padding="10px 8px",wa[Oa].style.wi
null,mxResources.get("format")+" ("+O.actions.get("formatPanel").shortcut+")",O.actions.get("image"),wa?Editor.formatImage:null)],wa?60:null);ua=C("insert",!0,wa?ja:null);V([ua,G(mxResources.get("delete"),O.actions.get("delete").funct,null,mxResources.get("delete"),O.actions.get("delete"),wa?Editor.trashImage:null)],wa?60:null);411<=m&&(V([Qa,Ta],60),520<=m&&V([X,640<=m?G("",Aa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Aa,Editor.zoomInImage):null,640<=m?G("",Ka.funct,!0,mxResources.get("zoomOut")+
" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=La&&(mxEvent.disableContextMenu(La),mxEvent.addGestureListeners(La,mxUtils.bind(this,function(Oa){(mxEvent.isShiftDown(Oa)||mxEvent.isAltDown(Oa)||mxEvent.isMetaDown(Oa)||mxEvent.isControlDown(Oa)||mxEvent.isPopupTrigger(Oa))&&O.appIconClicked(Oa)}),null,null));ua=O.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.sketch?(null==la&&(ua=ca.addMenu("",ua.funct),ua.setAttribute("title",
mxResources.get("language")),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="24px 24px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="1"==urlParams.embed?"12px":"11px",oa.appendChild(ua),la=ua),O.buttonContainer.style.paddingRight="34px"):(O.buttonContainer.style.paddingRight=
-"4px",null!=la&&(la.parentNode.removeChild(la),la=null))}L.apply(this,arguments);var Y=document.createElement("div");Y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";Y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
+"4px",null!=la&&(la.parentNode.removeChild(la),la=null))}K.apply(this,arguments);var Y=document.createElement("div");Y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";Y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var O=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==O.embedViewport)mxUtils.fit(this.div);
else{var wa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),La=O.embedViewport.x+O.embedViewport.width,Oa=parseInt(this.div.offsetTop),Ca=parseInt(this.div.offsetHeight),Ma=O.embedViewport.y+O.embedViewport.height;this.div.style.left=Math.max(O.embedViewport.x,Math.min(wa,La-ua))+"px";this.div.style.top=Math.max(O.embedViewport.y,Math.min(Oa,Ma-Ca))+"px";this.div.style.height=Math.min(O.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(O.embedViewport.width,
parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),Y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Y)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));O=this;var qa=O.editor.graph;
@@ -4075,15 +4075,15 @@ GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.au
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,L=this.view.translate;E.setAttribute("viewBox",H.x+L.x-this.panDx+" "+(H.y+L.y-this.panDy)+
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,K=this.view.translate;E.setAttribute("viewBox",H.x+K.x-this.panDx+" "+(H.y+K.y-this.panDy)+
" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var Q=this.xmlNode.getElementsByTagName("diagram");if(0<
-Q.length){if(null!=this.pageId)for(var d=0;d<Q.length;d++)if(this.pageId==Q[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var L=Q[K.currentPage];return"page"==H?L.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?Q.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var L=0<=H;L&&this.selectPage(H);return L};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var L=H.src,
-C=L.indexOf(",");0<C&&(C=K.getIndexById(L.substring(C+1)),0<=C&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[C])),H.originalSrc=L))}x.apply(this,arguments)};var z=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var L=z.apply(this,arguments);H=this.backgroundImage;if(null!=H){var C=this.view.translate,G=this.view.scale;L=mxRectangle.fromRectangle(L);L.add(new mxRectangle((C.x+H.x)*G,(C.y+H.y)*G,H.width*G,H.height*G))}return L};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(H){return L.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var Q=this.xmlNode.getElementsByTagName("diagram");if(0<
+Q.length){if(null!=this.pageId)for(var d=0;d<Q.length;d++)if(this.pageId==Q[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(H){var K=Q[L.currentPage];return"page"==H?K.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==H?L.currentPage+1:"pagecount"==H?Q.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var K=0<=H;K&&this.selectPage(H);return K};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var K=H.src,
+C=K.indexOf(",");0<C&&(C=L.getIndexById(K.substring(C+1)),0<=C&&(H=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[C])),H.originalSrc=K))}x.apply(this,arguments)};var z=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var K=z.apply(this,arguments);H=this.backgroundImage;if(null!=H){var C=this.view.translate,G=this.view.scale;K=mxRectangle.fromRectangle(K);K.add(new mxRectangle((C.x+H.x)*G,(C.y+H.y)*G,H.width*G,H.height*G))}return K};this.addListener("xmlNodeChanged",d);d();
+urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.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.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var L=H.indexOf(",");K.selectPageById(H.substring(L+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var K=H.indexOf(",");L.selectPageById(H.substring(K+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var D=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(D,{attributes:!0})}else m()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
@@ -4092,33 +4092,33 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var D=0;D<m.getChildCount(m.root);D++){var p=m.getChildAt(m.root,D);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[D]:!0)}}finally{m.endUpdate()}}return e?null:k};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body);
-Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};K={left:K.left-Q.left,top:K.top-Q.top,bottom:K.bottom-Q.top,right:K.right-Q.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var Q=b.offsetWidth;Q==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body);
+Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};L={left:L.left-Q.left,top:L.top-Q.top,bottom:L.bottom-Q.top,right:L.right-Q.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var Q=b.offsetWidth;Q==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},D=Q,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=D=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var E=mxUtils.bind(this,function(K){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty||
-null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(K){e=this.graph.getGraphBounds();D=null;E(K)}};
+m);var E=mxUtils.bind(this,function(L){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
+null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(L){e=this.graph.getGraphBounds();D=null;E(L)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,D=null!=m&&0<m.length,p=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(D)for(var K=0;K<m.length;K++){var Q=b.getCell(m[K]);null!=Q&&(e=!0,p[Q.id]=!0)}else for(K=0;K<k.length;K++)Q=b.getChildAt(b.root,parseInt(k[K])),null!=Q&&(e=!0,p[Q.id]=!0);for(K=0;e&&
-K<E;K++)Q=b.getChildAt(b.root,K),b.setVisible(Q,p[Q.id]||!1)}else for(K=0;K<E;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,D=null!=m&&0<m.length,p=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(D)for(var L=0;L<m.length;L++){var Q=b.getCell(m[L]);null!=Q&&(e=!0,p[Q.id]=!0)}else for(L=0;L<k.length;L++)Q=b.getChildAt(b.root,parseInt(k[L])),null!=Q&&(e=!0,p[Q.id]=!0);for(L=0;e&&
+L<E;L++)Q=b.getChildAt(b.root,L),b.setVisible(Q,p[Q.id]||!1)}else for(L=0;L<E;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){function b(oa,aa,ca,fa){var J=document.createElement("div");J.style.borderRight="1px solid #d0d0d0";J.style.padding="3px 6px 3px 6px";mxEvent.addListener(J,"click",oa);null!=ca&&J.setAttribute("title",ca);J.style.display="inline-block";oa=document.createElement("img");oa.setAttribute("border","0");oa.setAttribute("src",aa);oa.style.width="18px";null==fa||fa?(mxEvent.addListener(J,"mouseenter",function(){J.style.backgroundColor="#ddd"}),mxEvent.addListener(J,
"mouseleave",function(){J.style.backgroundColor="#eee"}),mxUtils.setOpacity(oa,60),J.style.cursor="pointer"):mxUtils.setOpacity(J,30);J.appendChild(oa);k.appendChild(J);f++;return J}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var m=null,D=null,p=mxUtils.bind(this,function(oa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);m=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),oa||200)}),E=mxUtils.bind(this,function(oa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(E(30),p())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(oa){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(oa){E(100);mxEvent.consume(oa)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||E(30)}));var K=this.graph,Q=K.getTolerance();K.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,aa){this.startX=aa.getGraphX();
-this.startY=aa.getGraphY();this.scrollLeft=K.container.scrollLeft;this.scrollTop=K.container.scrollTop},mouseMove:function(oa,aa){},mouseUp:function(oa,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-K.container.scrollLeft)<Q&&Math.abs(this.scrollTop-K.container.scrollTop)<Q&&Math.abs(this.startX-aa.getGraphX())<Q&&Math.abs(this.startY-aa.getGraphY())<Q&&(0<parseFloat(k.style.opacity||0)?p():E(30))}})}for(var d=this.toolbarItems,f=0,g=null,x=null,z=null,u=null,H=0;H<d.length;H++){var L=
-d[H];if("pages"==L){u=e.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";k.appendChild(u);var G=
-b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";L=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",L);L()}else if("zoom"==L)this.zoomEnabled&&(b(mxUtils.bind(this,
-function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==L){if(this.layersEnabled){var V=this.graph.getModel(),
+mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(oa){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(oa){E(100);mxEvent.consume(oa)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||E(30)}));var L=this.graph,Q=L.getTolerance();L.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,aa){this.startX=aa.getGraphX();
+this.startY=aa.getGraphY();this.scrollLeft=L.container.scrollLeft;this.scrollTop=L.container.scrollTop},mouseMove:function(oa,aa){},mouseUp:function(oa,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-L.container.scrollLeft)<Q&&Math.abs(this.scrollTop-L.container.scrollTop)<Q&&Math.abs(this.startX-aa.getGraphX())<Q&&Math.abs(this.startY-aa.getGraphY())<Q&&(0<parseFloat(k.style.opacity||0)?p():E(30))}})}for(var d=this.toolbarItems,f=0,g=null,x=null,z=null,u=null,H=0;H<d.length;H++){var K=
+d[H];if("pages"==K){u=e.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";k.appendChild(u);var G=
+b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";K=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",K);K()}else if("zoom"==K)this.zoomEnabled&&(b(mxUtils.bind(this,
+function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==K){if(this.layersEnabled){var V=this.graph.getModel(),
U=b(mxUtils.bind(this,function(oa){if(null!=g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ca=this.graph.getGraphBounds(),fa=this.graph.view;0>ca.x||0>ca.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:fa.translate.clone(),scale:fa.scale}):null!=this.graph.originalViewState&&0<ca.x/fa.scale+this.graph.originalViewState.translate.x-
fa.translate.x&&0<ca.y/fa.scale+this.graph.originalViewState.translate.y-fa.translate.y&&(fa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:fa.translate.clone(),scale:fa.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=U.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";
g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var aa=mxUtils.getDocumentScrollOrigin(document);g.style.left=aa.x+oa.left-1+"px";g.style.top=aa.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");V.addListener(mxEvent.CHANGE,function(){U.style.display=
-1<V.getChildCount(V.root)?"inline-block":"none"});U.style.display=1<V.getChildCount(V.root)?"inline-block":"none"}}else if("tags"==L){if(this.tagsEnabled){var Y=b(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=
+1<V.getChildCount(V.root)?"inline-block":"none"});U.style.display=1<V.getChildCount(V.root)?"inline-block":"none"}}else if("tags"==K){if(this.tagsEnabled){var Y=b(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=
Editor.defaultHtmlFont,x.div.style.fontSize="11px",x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=z)z.parentNode.removeChild(z),z=null;else{z=x.div;mxEvent.addListener(z,"mouseleave",function(){z.parentNode.removeChild(z);z=null});oa=Y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);z.style.left=aa.x+oa.left-1+"px";z.style.top=aa.y+oa.bottom-2+
-"px";document.body.appendChild(z);x.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");V.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==L?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
-(L=this.graphConfig["toolbar-buttons"][L],null!=L&&(L.elem=b(null==L.enabled||L.enabled?L.handler:function(){},L.image,L.title,L.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=e.ownerDocument.createElement("div"),d.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",d.setAttribute("title",this.graphConfig.title),
+"px";document.body.appendChild(z);x.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");V.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==K?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+(K=this.graphConfig["toolbar-buttons"][K],null!=K&&(K.elem=b(null==K.enabled||K.enabled?K.handler:function(){},K.image,K.title,K.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=e.ownerDocument.createElement("div"),d.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",d.setAttribute("title",this.graphConfig.title),
mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,70),k.appendChild(d),this.filename=d);this.minToolbarWidth=34*f;var O=e.style.border,qa=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=e.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():
{left:-aa.x,top:-aa.y};oa={left:oa.left-aa.left,top:oa.top-aa.top,bottom:oa.bottom-aa.top,right:oa.right-aa.left};k.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=oa.top+1+"px"):k.style.top=oa.top+"px";"1px solid transparent"==O&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ca=mxUtils.bind(this,function(){null!=k.parentNode&&
k.parentNode.removeChild(k);null!=g&&(g.parentNode.removeChild(g),g=null);e.style.border=O});mxEvent.addListener(document,"mousemove",function(fa){for(fa=mxEvent.getSource(fa);null!=fa;){if(fa==e||fa==k||fa==g)return;fa=fa.parentNode}ca()});mxEvent.addListener(document.body,"mouseleave",function(fa){ca()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&
@@ -4131,10 +4131,10 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){m.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";this.tagsEnabled&&(urlParams.tags="{}");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 k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var D=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,E=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var K=m.editor.graph,Q=K.container;Q.style.overflow="hidden";this.lightboxChrome?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",D)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(Q.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){Q.style.outline="none";Q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(Q);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+m.refresh=function(){};var D=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,E=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var L=m.editor.graph,Q=L.container;Q.style.overflow="hidden";this.lightboxChrome?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(Q.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){Q.style.outline="none";Q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(Q);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
+"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var D=m[k].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&e.push(m[k]))}return e};
@@ -4143,7 +4143,7 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function D(){this.q=[];this.add=function(z){this.q.push(z)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function E(g,x){if(!g.resizedAttached)g.resizedAttached=
new D,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.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>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var z=g.resizeSensor.childNodes[0],u=z.childNodes[0],H=g.resizeSensor.childNodes[1],L=function(){u.style.width="100000px";u.style.height="100000px";z.scrollLeft=1E5;z.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};L();var C=!1,G=function(){g.resizedAttached&&(C&&(g.resizedAttached.call(),C=!1),b(G))};b(G);var V,U,Y,O;x=function(){if((Y=g.offsetWidth)!=V||(O=g.offsetHeight)!=U)C=!0,V=Y,U=O;L()};var qa=function(oa,
-aa,ca){oa.attachEvent?oa.attachEvent("on"+aa,ca):oa.addEventListener(aa,ca)};qa(z,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},Q=Object.prototype.toString.call(k),d="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){Q=0;for(var f=k.length;Q<f;Q++)E(k[Q],K)}else E(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
+g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var z=g.resizeSensor.childNodes[0],u=z.childNodes[0],H=g.resizeSensor.childNodes[1],K=function(){u.style.width="100000px";u.style.height="100000px";z.scrollLeft=1E5;z.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};K();var C=!1,G=function(){g.resizedAttached&&(C&&(g.resizedAttached.call(),C=!1),b(G))};b(G);var V,U,Y,O;x=function(){if((Y=g.offsetWidth)!=V||(O=g.offsetHeight)!=U)C=!0,V=Y,U=O;K()};var qa=function(oa,
+aa,ca){oa.attachEvent?oa.attachEvent("on"+aa,ca):oa.addEventListener(aa,ca)};qa(z,"scroll",x);qa(H,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},Q=Object.prototype.toString.call(k),d="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){Q=0;for(var f=k.length;Q<f;Q++)E(k[Q],L)}else E(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 4d6b6dd7..2db2708f 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"20.2.0",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/"),
+var mxClient={VERSION:"20.2.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:"undefined"!==typeof InstallTrigger,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||"[object SVGForeignObjectElement]"!==
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index d9c11abe..f99a6279 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,c)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=c(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"3ac6a5a58a1f967b66aa1e399b7d47f2"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"82f8dd046bfa4d392a40949d24890062"},{url:"js/shapes-14-6-5.min.js",revision:"0e4ce222957707e50bc19057beb6fe46"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"b0cefd1e352803f8f71a69f91113e745"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"80d3c5ec6575b41d271eb6f7a6efe40b"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c36b256237fa27ea379e30f7d5add825"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"7dc22c622b238536ea550815d1364d52"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"7e198d0456c3075b4b305da188f09714"},{url:"connect/confluence/includeDiagram.html",revision:"99382f1af0419f116f056874ba17f0d7"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{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:"resources/dia.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_am.txt",revision:"1fbc0ff1ab0631a95e0eec65eadf947f"},{url:"resources/dia_ar.txt",revision:"76295b768e3443e2b3e81c76c8674955"},{url:"resources/dia_bg.txt",revision:"cd021b810f00fcb60754a009339da093"},{url:"resources/dia_bn.txt",revision:"d004918d24ce051628beb2ddbc274221"},{url:"resources/dia_bs.txt",revision:"dac946476177b2066b4ea8d9837e9664"},{url:"resources/dia_ca.txt",revision:"7957b4a052904394c2376099791deb76"},{url:"resources/dia_cs.txt",revision:"f0624407e102c3fdeb3b2811153798c7"},{url:"resources/dia_da.txt",revision:"6232ada9ab2f58f9165fec9cfb1f8cb4"},{url:"resources/dia_de.txt",revision:"a615e99b2c6427e0b2764762e518e7be"},{url:"resources/dia_el.txt",revision:"14503792e4932953678d7389cc48e132"},{url:"resources/dia_eo.txt",revision:"6cd7a9e39559ef9ec1421bcae62f12a4"},{url:"resources/dia_es.txt",revision:"15d5c773aa67d38e9fc955da76a05fbd"},{url:"resources/dia_et.txt",revision:"ce032655cfa41725f2232096c99f0784"},{url:"resources/dia_eu.txt",revision:"67a5533475b88addfd890b00132a8533"},{url:"resources/dia_fa.txt",revision:"ed063ed259647ad569231274af2ab224"},{url:"resources/dia_fi.txt",revision:"c2eafd8b219c9a3374b6c9d93e6a25b5"},{url:"resources/dia_fil.txt",revision:"cf87e966bc995fd4805a968cf5244584"},{url:"resources/dia_fr.txt",revision:"8986b0e1dec19655c80b1c5ab2faa032"},{url:"resources/dia_gl.txt",revision:"6250d60f8511b506866f2d36e67cc1f0"},{url:"resources/dia_gu.txt",revision:"27d7cc90c01e37eeeacab0d7170b973d"},{url:"resources/dia_he.txt",revision:"084e02f4ed843df855635d4af2ef5434"},{url:"resources/dia_hi.txt",revision:"a3702cc098d0fa75fe9af6d267882e8a"},{url:"resources/dia_hr.txt",revision:"f90bbba4cbabbfe9b8b8f0af33caf557"},{url:"resources/dia_hu.txt",revision:"889365cb400b98a4a71798267ce05dd1"},{url:"resources/dia_id.txt",revision:"37a696446a15336029071bfc17265bcb"},{url:"resources/dia_it.txt",revision:"45059ae2a8eeb92fb79c93fd73e41a67"},{url:"resources/dia_ja.txt",revision:"7c4477567bffcb2a34c7c17e610b8b32"},{url:"resources/dia_kn.txt",revision:"85594b11f140a62ae5208dc8a6031537"},{url:"resources/dia_ko.txt",revision:"9afaddadfc15116def46801c3fae3902"},{url:"resources/dia_lt.txt",revision:"1fda55cf1749eb28aaa15bcd4b263ff7"},{url:"resources/dia_lv.txt",revision:"6e655c38b13ca083e3d9e989b1625b72"},{url:"resources/dia_ml.txt",revision:"634ed48d153c436fdac54422d6f25c97"},{url:"resources/dia_mr.txt",revision:"c2e5e7d6d12f4d17eb3a8b116fea807d"},{url:"resources/dia_ms.txt",revision:"ded8350e4fc8d592127a5611fea1cf52"},{url:"resources/dia_my.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_nl.txt",revision:"aa811a09d78454b81d891be16ef0849e"},{url:"resources/dia_no.txt",revision:"4df620a4f972b4ee9cf2084f77b0e055"},{url:"resources/dia_pl.txt",revision:"a148e99a59ca2aa67cfaa7374679c480"},{url:"resources/dia_pt-br.txt",revision:"cd200294760e0b37cb9c6861bde9977d"},{url:"resources/dia_pt.txt",revision:"acfc189c058ea58a50f0ea5f9ea37fd8"},{url:"resources/dia_ro.txt",revision:"320e258ccf0957f18f6cd1e499885506"},{url:"resources/dia_ru.txt",revision:"1ea33db8aa6d19e13642c3841ab90802"},{url:"resources/dia_si.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_sk.txt",revision:"ad54b43eb1cd46ad69032eb45abb3d02"},{url:"resources/dia_sl.txt",revision:"5704e95859a77900b20e225fe02f36f6"},{url:"resources/dia_sr.txt",revision:"ef0552ddce6b4dd91230c9114be2365b"},{url:"resources/dia_sv.txt",revision:"3df58a93314f87b21efb8f9fcc709c65"},{url:"resources/dia_sw.txt",revision:"cb5407bfa6e7779306f258615ea6497b"},{url:"resources/dia_ta.txt",revision:"cf6e1f9a9c18266599165d163a1225a5"},{url:"resources/dia_te.txt",revision:"17061b897a6f00a4c5beb835abaf4c31"},{url:"resources/dia_th.txt",revision:"b72ea1e62e361734ccd709ddb6935e2a"},{url:"resources/dia_tr.txt",revision:"7193eab9b177f514621b8479211f6ab4"},{url:"resources/dia_uk.txt",revision:"9d576620b92feeb088717eeb41e27c5c"},{url:"resources/dia_vi.txt",revision:"2a69b79be262348ba283d4a0611c75cc"},{url:"resources/dia_zh-tw.txt",revision:"c380c5550e86a5b263f8dec7282803b5"},{url:"resources/dia_zh.txt",revision:"851c7b377fc498df6b638300edfa3852"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,c)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=c(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"5d86303a64be6cb0733c3ffcdca71345"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"82f8dd046bfa4d392a40949d24890062"},{url:"js/shapes-14-6-5.min.js",revision:"0e4ce222957707e50bc19057beb6fe46"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"5b64cf20dc0bc5c1eb9aaa0086b8abda"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"80d3c5ec6575b41d271eb6f7a6efe40b"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c36b256237fa27ea379e30f7d5add825"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"7dc22c622b238536ea550815d1364d52"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"7e198d0456c3075b4b305da188f09714"},{url:"connect/confluence/includeDiagram.html",revision:"99382f1af0419f116f056874ba17f0d7"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{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:"resources/dia.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_am.txt",revision:"1fbc0ff1ab0631a95e0eec65eadf947f"},{url:"resources/dia_ar.txt",revision:"76295b768e3443e2b3e81c76c8674955"},{url:"resources/dia_bg.txt",revision:"cd021b810f00fcb60754a009339da093"},{url:"resources/dia_bn.txt",revision:"d004918d24ce051628beb2ddbc274221"},{url:"resources/dia_bs.txt",revision:"dac946476177b2066b4ea8d9837e9664"},{url:"resources/dia_ca.txt",revision:"7957b4a052904394c2376099791deb76"},{url:"resources/dia_cs.txt",revision:"f0624407e102c3fdeb3b2811153798c7"},{url:"resources/dia_da.txt",revision:"6232ada9ab2f58f9165fec9cfb1f8cb4"},{url:"resources/dia_de.txt",revision:"a615e99b2c6427e0b2764762e518e7be"},{url:"resources/dia_el.txt",revision:"14503792e4932953678d7389cc48e132"},{url:"resources/dia_eo.txt",revision:"6cd7a9e39559ef9ec1421bcae62f12a4"},{url:"resources/dia_es.txt",revision:"15d5c773aa67d38e9fc955da76a05fbd"},{url:"resources/dia_et.txt",revision:"ce032655cfa41725f2232096c99f0784"},{url:"resources/dia_eu.txt",revision:"67a5533475b88addfd890b00132a8533"},{url:"resources/dia_fa.txt",revision:"ed063ed259647ad569231274af2ab224"},{url:"resources/dia_fi.txt",revision:"c2eafd8b219c9a3374b6c9d93e6a25b5"},{url:"resources/dia_fil.txt",revision:"cf87e966bc995fd4805a968cf5244584"},{url:"resources/dia_fr.txt",revision:"8986b0e1dec19655c80b1c5ab2faa032"},{url:"resources/dia_gl.txt",revision:"6250d60f8511b506866f2d36e67cc1f0"},{url:"resources/dia_gu.txt",revision:"27d7cc90c01e37eeeacab0d7170b973d"},{url:"resources/dia_he.txt",revision:"084e02f4ed843df855635d4af2ef5434"},{url:"resources/dia_hi.txt",revision:"a3702cc098d0fa75fe9af6d267882e8a"},{url:"resources/dia_hr.txt",revision:"f90bbba4cbabbfe9b8b8f0af33caf557"},{url:"resources/dia_hu.txt",revision:"889365cb400b98a4a71798267ce05dd1"},{url:"resources/dia_id.txt",revision:"37a696446a15336029071bfc17265bcb"},{url:"resources/dia_it.txt",revision:"45059ae2a8eeb92fb79c93fd73e41a67"},{url:"resources/dia_ja.txt",revision:"7c4477567bffcb2a34c7c17e610b8b32"},{url:"resources/dia_kn.txt",revision:"85594b11f140a62ae5208dc8a6031537"},{url:"resources/dia_ko.txt",revision:"9afaddadfc15116def46801c3fae3902"},{url:"resources/dia_lt.txt",revision:"1fda55cf1749eb28aaa15bcd4b263ff7"},{url:"resources/dia_lv.txt",revision:"6e655c38b13ca083e3d9e989b1625b72"},{url:"resources/dia_ml.txt",revision:"634ed48d153c436fdac54422d6f25c97"},{url:"resources/dia_mr.txt",revision:"c2e5e7d6d12f4d17eb3a8b116fea807d"},{url:"resources/dia_ms.txt",revision:"ded8350e4fc8d592127a5611fea1cf52"},{url:"resources/dia_my.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_nl.txt",revision:"aa811a09d78454b81d891be16ef0849e"},{url:"resources/dia_no.txt",revision:"4df620a4f972b4ee9cf2084f77b0e055"},{url:"resources/dia_pl.txt",revision:"a148e99a59ca2aa67cfaa7374679c480"},{url:"resources/dia_pt-br.txt",revision:"cd200294760e0b37cb9c6861bde9977d"},{url:"resources/dia_pt.txt",revision:"acfc189c058ea58a50f0ea5f9ea37fd8"},{url:"resources/dia_ro.txt",revision:"320e258ccf0957f18f6cd1e499885506"},{url:"resources/dia_ru.txt",revision:"1ea33db8aa6d19e13642c3841ab90802"},{url:"resources/dia_si.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_sk.txt",revision:"ad54b43eb1cd46ad69032eb45abb3d02"},{url:"resources/dia_sl.txt",revision:"5704e95859a77900b20e225fe02f36f6"},{url:"resources/dia_sr.txt",revision:"ef0552ddce6b4dd91230c9114be2365b"},{url:"resources/dia_sv.txt",revision:"3df58a93314f87b21efb8f9fcc709c65"},{url:"resources/dia_sw.txt",revision:"cb5407bfa6e7779306f258615ea6497b"},{url:"resources/dia_ta.txt",revision:"cf6e1f9a9c18266599165d163a1225a5"},{url:"resources/dia_te.txt",revision:"17061b897a6f00a4c5beb835abaf4c31"},{url:"resources/dia_th.txt",revision:"b72ea1e62e361734ccd709ddb6935e2a"},{url:"resources/dia_tr.txt",revision:"7193eab9b177f514621b8479211f6ab4"},{url:"resources/dia_uk.txt",revision:"9d576620b92feeb088717eeb41e27c5c"},{url:"resources/dia_vi.txt",revision:"2a69b79be262348ba283d4a0611c75cc"},{url:"resources/dia_zh-tw.txt",revision:"c380c5550e86a5b263f8dec7282803b5"},{url:"resources/dia_zh.txt",revision:"851c7b377fc498df6b638300edfa3852"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index cddd2f95..c21c29ef 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":["../../../../../../../tmp/566cb27ce15b1b7de7d58efa1348563f/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/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.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"3ac6a5a58a1f967b66aa1e399b7d47f2\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"82f8dd046bfa4d392a40949d24890062\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"0e4ce222957707e50bc19057beb6fe46\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\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\": \"b0cefd1e352803f8f71a69f91113e745\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"80d3c5ec6575b41d271eb6f7a6efe40b\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c36b256237fa27ea379e30f7d5add825\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"7dc22c622b238536ea550815d1364d52\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"7e198d0456c3075b4b305da188f09714\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"99382f1af0419f116f056874ba17f0d7\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\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/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\": \"resources/dia.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"1fbc0ff1ab0631a95e0eec65eadf947f\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"76295b768e3443e2b3e81c76c8674955\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cd021b810f00fcb60754a009339da093\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d004918d24ce051628beb2ddbc274221\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"dac946476177b2066b4ea8d9837e9664\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7957b4a052904394c2376099791deb76\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"f0624407e102c3fdeb3b2811153798c7\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"6232ada9ab2f58f9165fec9cfb1f8cb4\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"a615e99b2c6427e0b2764762e518e7be\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"14503792e4932953678d7389cc48e132\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6cd7a9e39559ef9ec1421bcae62f12a4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"15d5c773aa67d38e9fc955da76a05fbd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ce032655cfa41725f2232096c99f0784\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"67a5533475b88addfd890b00132a8533\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"ed063ed259647ad569231274af2ab224\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"c2eafd8b219c9a3374b6c9d93e6a25b5\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"cf87e966bc995fd4805a968cf5244584\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"8986b0e1dec19655c80b1c5ab2faa032\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6250d60f8511b506866f2d36e67cc1f0\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"27d7cc90c01e37eeeacab0d7170b973d\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"084e02f4ed843df855635d4af2ef5434\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"a3702cc098d0fa75fe9af6d267882e8a\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"f90bbba4cbabbfe9b8b8f0af33caf557\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"889365cb400b98a4a71798267ce05dd1\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"37a696446a15336029071bfc17265bcb\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"45059ae2a8eeb92fb79c93fd73e41a67\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"7c4477567bffcb2a34c7c17e610b8b32\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"85594b11f140a62ae5208dc8a6031537\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"9afaddadfc15116def46801c3fae3902\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"1fda55cf1749eb28aaa15bcd4b263ff7\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"6e655c38b13ca083e3d9e989b1625b72\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"634ed48d153c436fdac54422d6f25c97\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"c2e5e7d6d12f4d17eb3a8b116fea807d\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ded8350e4fc8d592127a5611fea1cf52\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"aa811a09d78454b81d891be16ef0849e\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"4df620a4f972b4ee9cf2084f77b0e055\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a148e99a59ca2aa67cfaa7374679c480\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"cd200294760e0b37cb9c6861bde9977d\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"acfc189c058ea58a50f0ea5f9ea37fd8\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"320e258ccf0957f18f6cd1e499885506\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"1ea33db8aa6d19e13642c3841ab90802\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"ad54b43eb1cd46ad69032eb45abb3d02\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"5704e95859a77900b20e225fe02f36f6\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef0552ddce6b4dd91230c9114be2365b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3df58a93314f87b21efb8f9fcc709c65\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"cb5407bfa6e7779306f258615ea6497b\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cf6e1f9a9c18266599165d163a1225a5\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"17061b897a6f00a4c5beb835abaf4c31\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"b72ea1e62e361734ccd709ddb6935e2a\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"7193eab9b177f514621b8479211f6ab4\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9d576620b92feeb088717eeb41e27c5c\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2a69b79be262348ba283d4a0611c75cc\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"c380c5550e86a5b263f8dec7282803b5\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"851c7b377fc498df6b638300edfa3852\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,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,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,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/8c1fb7dcbfb0f79db7083165d0596950/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/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.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"5d86303a64be6cb0733c3ffcdca71345\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"82f8dd046bfa4d392a40949d24890062\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"0e4ce222957707e50bc19057beb6fe46\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\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\": \"5b64cf20dc0bc5c1eb9aaa0086b8abda\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"80d3c5ec6575b41d271eb6f7a6efe40b\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c36b256237fa27ea379e30f7d5add825\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"7dc22c622b238536ea550815d1364d52\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"7e198d0456c3075b4b305da188f09714\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"99382f1af0419f116f056874ba17f0d7\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\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/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\": \"resources/dia.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"1fbc0ff1ab0631a95e0eec65eadf947f\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"76295b768e3443e2b3e81c76c8674955\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cd021b810f00fcb60754a009339da093\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d004918d24ce051628beb2ddbc274221\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"dac946476177b2066b4ea8d9837e9664\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7957b4a052904394c2376099791deb76\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"f0624407e102c3fdeb3b2811153798c7\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"6232ada9ab2f58f9165fec9cfb1f8cb4\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"a615e99b2c6427e0b2764762e518e7be\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"14503792e4932953678d7389cc48e132\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6cd7a9e39559ef9ec1421bcae62f12a4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"15d5c773aa67d38e9fc955da76a05fbd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ce032655cfa41725f2232096c99f0784\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"67a5533475b88addfd890b00132a8533\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"ed063ed259647ad569231274af2ab224\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"c2eafd8b219c9a3374b6c9d93e6a25b5\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"cf87e966bc995fd4805a968cf5244584\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"8986b0e1dec19655c80b1c5ab2faa032\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6250d60f8511b506866f2d36e67cc1f0\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"27d7cc90c01e37eeeacab0d7170b973d\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"084e02f4ed843df855635d4af2ef5434\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"a3702cc098d0fa75fe9af6d267882e8a\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"f90bbba4cbabbfe9b8b8f0af33caf557\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"889365cb400b98a4a71798267ce05dd1\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"37a696446a15336029071bfc17265bcb\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"45059ae2a8eeb92fb79c93fd73e41a67\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"7c4477567bffcb2a34c7c17e610b8b32\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"85594b11f140a62ae5208dc8a6031537\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"9afaddadfc15116def46801c3fae3902\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"1fda55cf1749eb28aaa15bcd4b263ff7\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"6e655c38b13ca083e3d9e989b1625b72\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"634ed48d153c436fdac54422d6f25c97\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"c2e5e7d6d12f4d17eb3a8b116fea807d\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ded8350e4fc8d592127a5611fea1cf52\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"aa811a09d78454b81d891be16ef0849e\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"4df620a4f972b4ee9cf2084f77b0e055\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a148e99a59ca2aa67cfaa7374679c480\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"cd200294760e0b37cb9c6861bde9977d\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"acfc189c058ea58a50f0ea5f9ea37fd8\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"320e258ccf0957f18f6cd1e499885506\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"1ea33db8aa6d19e13642c3841ab90802\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"ad54b43eb1cd46ad69032eb45abb3d02\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"5704e95859a77900b20e225fe02f36f6\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef0552ddce6b4dd91230c9114be2365b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3df58a93314f87b21efb8f9fcc709c65\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"cb5407bfa6e7779306f258615ea6497b\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cf6e1f9a9c18266599165d163a1225a5\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"17061b897a6f00a4c5beb835abaf4c31\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"b72ea1e62e361734ccd709ddb6935e2a\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"7193eab9b177f514621b8479211f6ab4\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9d576620b92feeb088717eeb41e27c5c\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2a69b79be262348ba283d4a0611c75cc\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"c380c5550e86a5b263f8dec7282803b5\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"851c7b377fc498df6b638300edfa3852\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,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,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,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file