13.1.8 release

This commit is contained in:
David Benson [draw.io] 2020-05-29 17:55:57 +01:00
parent e0d5f75088
commit 305778edbf
9 changed files with 76 additions and 88 deletions

View file

@ -1,3 +1,7 @@
29-MAY-2020: 13.1.8
- Removes CSP from GAE config
29-MAY-2020: 13.1.7
- Adds multiple edge labels in CSV import

View file

@ -1 +1 @@
13.1.7
13.1.8

View file

@ -207,7 +207,7 @@ abstract public class AbsAuthServlet extends HttpServlet
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
//TODO after code is propagated, remove the version check
else if ("2".equals(version) && (stateToken == null || !stateToken.equals(cookieToken)))
else if ("3".equals(version) && (stateToken == null || !stateToken.equals(cookieToken)))
{
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
}

View file

@ -13,10 +13,8 @@
<!-- Path patterns not supported in production -->
<static-files>
<include path="/**">
<http-header name="X-XSS-Protection" value="1; mode=block"/>
<http-header name="Referrer-Policy" value="strict-origin" />
<http-header name="Access-Control-Allow-Origin" value="*"/>
<http-header name="Content-Security-Policy" value="default-src 'self'; script-src 'self' https://*.googleapis.com https://apis.google.com https://*.pusher.com https://code.jquery.com 'sha256-jsA78YB6l5VcS0/77x9mPWDga4n5mIWdGVnTqW5voMg=' 'sha256-4Dg3/NrB8tLC7TUSCbrtUDWD/J6bSLka01GHn+qtNZ0=' https://www.dropbox.com https://api.trello.com; connect-src 'self' https://*.draw.io https://*.googleapis.com wss://*.pusher.com https://api.github.com https://gitlab.com https://graph.microsoft.com https://*.sharepoint.com https://*.dropboxapi.com https://api.trello.com https://*.google.com https://fonts.gstatic.com https://fonts.googleapis.com https://*.1drv.com https://raw.githubusercontent.com; img-src * data:; media-src *; font-src *; frame-src 'self' https://*.google.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;"/>
</include>
</static-files>

View file

@ -9131,9 +9131,8 @@ function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.
MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/SVG"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},SVG:{font:null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX",useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");e.type="text/javascript";e.src=a;c[0].parentNode.appendChild(e)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,e){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(a)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.diagrams\.net\/proxy/.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var d=
a.convert,b=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=Editor.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=d.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};
var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,e){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(a)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(a){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
var d=a.convert,b=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=Editor.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=d.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};
Editor.prototype.convertImageToDataUri=function(a,d){try{var b=!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);b&&d(Editor.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c);b&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(b)try{var a=document.createElement("canvas"),
g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);d(a.toDataURL())}catch(W){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);b&&d(Editor.svgBrokenImage.src)};e.src=a}}catch(J){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(a,d,b,c){null==c&&(c=this.createImageUrlConverter());var e=0,g=b||{};b=mxUtils.bind(this,function(b,m){for(var f=a.getElementsByTagName(b),n=0;n<f.length;n++)mxUtils.bind(this,function(b){try{if(null!=b){var f=
c.convert(b.getAttribute(m));if(null!=f&&"data:"!=f.substring(0,5)){var n=g[f];null==n?(e++,this.convertImageToDataUri(f,function(c){null!=c&&(g[f]=c,b.setAttribute(m,c));e--;0==e&&d(a)})):b.setAttribute(m,n)}else null!=f&&b.setAttribute(m,f)}}catch(Z){}})(f[n])});b("image","xlink:href");b("img","src");0==e&&d(a)};Editor.base64Encode=function(a){for(var d="",b=0,c=a.length,e,g,m;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
@ -9272,7 +9271,7 @@ k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.classNa
"print":"ok"),function(){a.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";m.appendChild(q);a.editor.cancelFirst||m.appendChild(k);g.appendChild(m);this.container=g};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(D.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 F=document.createElement("canvas"),H=new Image;H.onload=function(){try{F.getContext("2d").drawImage(H,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};H.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(I){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.1.7";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.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.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.1.8";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.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.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":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.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
@ -10519,22 +10518,23 @@ this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisibl
this.menus.findWindow=null);p.apply(this,arguments)};var u=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){u.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
EditorUi.prototype.chromelessWindowResize=function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){e(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(b.menus.addMenuItems(a,["new","open","-"],c),EditorUi.isElectronApp&&b.menus.addMenuItems(a,["synchronize","-"],c),b.menus.addMenuItems(a,["save","saveAs","-"],c)):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),isLocalStorage&&this.addSubmenu("openRecent",a,c),a.addSeparator(c),null!=
d&&d.constructor==DriveFile&&b.menus.addMenuItems(a,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||b.menus.addMenuItems(a,["synchronize"],c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);b.menus.addMenuItems(a,["-","outline","layers"],c);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],
c);b.menus.addMenuItems(a,["-","find","tags"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();
null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var d=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,
function(a,c){d.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);b.menus.addSubmenu("units",a,c);a.addSeparator(c);
b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),
c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);b.menus.addSubmenu("table",a,d);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",
new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect",
"collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));
l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";
g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?
"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");
c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var e=a.nextSibling;
"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=e}p=n.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>c)||b("diagram");f([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
function(){e(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(b.menus.addMenuItems(a,["new","open","-"],c),EditorUi.isElectronApp&&b.menus.addMenuItems(a,["synchronize","-"],c),b.menus.addMenuItems(a,["save","saveAs","-"],c)):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&
b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),isLocalStorage&&this.addSubmenu("openRecent",a,c),a.addSeparator(c),null!=d&&d.constructor==DriveFile&&b.menus.addMenuItems(a,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||b.menus.addMenuItems(a,["synchronize"],c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);b.menus.addMenuItems(a,["-","outline","layers"],c);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c);b.menus.addMenuItems(a,["-","find","tags"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);
b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],
c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var d=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){d.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,
c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);b.menus.addSubmenu("units",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);
b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);b.menus.addSubmenu("table",a,d);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=
b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor=
"pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=
b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var e=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=e}p=n.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>c)||b("diagram");f([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,
null,mxResources.get("shapes"),l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);e=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([e,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=c&&(e=l.actions.get("undo"),a=l.actions.get("redo"),e=d("",e.funct,null,mxResources.get("undo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),f([e,a],60),480<=c)){var a=l.actions.get("zoomIn"),e=l.actions.get("zoomOut"),g=l.actions.get("resetView");

View file

@ -1487,28 +1487,7 @@
*/
Editor.prototype.isCorsEnabledForUrl = function(url)
{
//Disable proxy for electron since it doesn't exist (it is served locally) and it works with most of the sites
//The same with Chrome App, never use proxy
if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
{
return true;
}
if (urlParams['cors'] != null && this.corsRegExp == null)
{
this.corsRegExp = new RegExp(decodeURIComponent(urlParams['cors']));
}
// No access-control-allow-origin for some Iconfinder images, add this when fixed:
// /^https?:\/\/[^\/]*\.iconfinder.com\//.test(url) ||
return (this.corsRegExp != null && this.corsRegExp.test(url)) ||
url.substring(0, 34) === 'https://raw.githubusercontent.com/' ||
url.substring(0, 23) === 'https://cdn.rawgit.com/' ||
url.substring(0, 19) === 'https://rawgit.com/' ||
/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(url) ||
/^https?:\/\/[^\/]*\.diagrams\.net\/proxy/.test(url) ||
/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(url) ||
/^https?:\/\/[^\/]*\.github\.io\//.test(url);
return mxClient.IS_CHROMEAPP || EditorUi.isElectronApp;
};
/**

View file

@ -729,11 +729,18 @@ EditorUi.initMinimalTheme = function()
{
ui.actions.put('plantUml', new Action(mxResources.get('plantUml') + '...', function()
{
var dlg = new ParseDialog(ui, 'Insert from Text', 'plantUml');
var dlg = new ParseDialog(ui, mxResources.get('plantUml') + '...', 'plantUml');
ui.showDialog(dlg.container, 620, 420, true, false);
dlg.init();
}));
}
ui.actions.put('mermaid', new Action(mxResources.get('mermaid') + '...', function()
{
var dlg = new ParseDialog(ui, mxResources.get('mermaid') + '...', 'mermaid');
ui.showDialog(dlg.container, 620, 420, true, false);
dlg.init();
}));
this.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
{
@ -934,7 +941,7 @@ EditorUi.initMinimalTheme = function()
this.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent)
{
ui.menus.addMenuItems(menu, ['importText', 'plantUml', '-', 'formatSql', 'importCsv', '-', 'createShape', 'editDiagram'], parent);
ui.menus.addMenuItems(menu, ['importText', 'plantUml', 'mermaid', '-', 'formatSql', 'importCsv', '-', 'createShape', 'editDiagram'], parent);
})));
(mxUtils.bind(this, function()

View file

@ -2484,20 +2484,20 @@ a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=thi
!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var e=[],c=null,d=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=
this.view.getState(b[f]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,d=null!=d?Math.min(d,l):l;e.push(g)}}if(2<e.length){e.sort(function(b,e){return a?b.x-e.x:b.y-e.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var p=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var u=this.view.getState(this.model.getParent(e[f].cell)),n=this.getCellGeometry(e[f].cell),c=c+p;null!=n&&null!=u&&(n=n.clone(),a?n.x=
Math.round(c-n.width/2)-u.origin.x:n.y=Math.round(c-n.height/2)-u.origin.y,this.getModel().setGeometry(e[f].cell,n))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,
p,u){var n=this.useCssTransforms;n&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var A=this.view.scale,m=mxUtils.createXmlDocument(),k=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=
a:k.setAttribute("style","background-color:"+a));null==m.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/A;var y=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:0),v=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);k.setAttribute("version","1.1");k.setAttribute("width",y+"px");k.setAttribute("height",v+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+
" "+y+" "+v);m.appendChild(k);var K=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");k.appendChild(K);var x=this.createSvgCanvas(K);x.foOffset=d?-.5:0;x.textOffset=d?-.5:0;x.imageOffset=d?-.5:0;x.translate(Math.floor((e/b-t.x)/A),Math.floor((e/b-t.y)/A));var S=document.createElement("div"),q=x.getAlternateText;x.getAlternateText=function(a,b,e,c,d,f,g,l,p,u,oa,n,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(S.innerHTML=f,f=mxUtils.extractTextWithWhitespace(S.childNodes));
p,n){var u=this.useCssTransforms;u&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var A=this.view.scale,m=mxUtils.createXmlDocument(),k=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=
a:k.setAttribute("style","background-color:"+a));null==m.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/A;var y=Math.max(1,Math.ceil(t.width*a)+2*e)+(n?5:0),v=Math.max(1,Math.ceil(t.height*a)+2*e)+(n?5:0);k.setAttribute("version","1.1");k.setAttribute("width",y+"px");k.setAttribute("height",v+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+
" "+y+" "+v);m.appendChild(k);var K=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");k.appendChild(K);var x=this.createSvgCanvas(K);x.foOffset=d?-.5:0;x.textOffset=d?-.5:0;x.imageOffset=d?-.5:0;x.translate(Math.floor((e/b-t.x)/A),Math.floor((e/b-t.y)/A));var S=document.createElement("div"),q=x.getAlternateText;x.getAlternateText=function(a,b,e,c,d,f,g,l,p,n,oa,u,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(S.innerHTML=f,f=mxUtils.extractTextWithWhitespace(S.childNodes));
for(var Ma=Math.ceil(2*c/this.state.fontSize),A=[],k=0,m=0;(0==Ma||k<Ma)&&m<f.length;){var y=f.charCodeAt(m);if(10==y||13==y){if(0<k)break}else A.push(f.charAt(m)),255>y&&k++;m++}A.length<f.length&&1<f.length-A.length&&(f=mxUtils.trim(A.join(""))+"...");return f}catch(Ta){return q.apply(this,arguments)}else return q.apply(this,arguments)};var z=this.backgroundImage;if(null!=z){b=A/b;var M=this.view.translate,I=new mxRectangle(M.x*b,M.y*b,z.width*b,z.height*b);mxUtils.intersects(t,I)&&x.image(M.x,
M.y,z.width,z.height,z.src,!0)}x.scale(a);x.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var Q=l.drawCellState,C=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=C.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&Q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),
x);this.updateSvgLinks(k,p,!0);this.addForeignObjectWarning(x,k);return k}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||
x);this.updateSvgLinks(k,p,!0);this.addForeignObjectWarning(x,k);return k}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||
b.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);e.appendChild(c);
d.appendChild(f);e.appendChild(d);b.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,b,e){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var d=a[c].getAttribute("href");null==d&&(d=a[c].getAttribute("xlink:href"));null!=d&&(null!=b&&/^https?:\/\//.test(d)?a[c].setAttribute("target",b):e&&this.isCustomLink(d)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=
function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,e){for(;null!=a&&a.nodeName!=b;){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,e){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==e)return null;a=a.parentNode}return a};
Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var e=document.createRange();e.selectNode(a);b.removeAllRanges();b.addRange(e)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),e=b.createRange(),e.setEndPoint("StartToStart",a),e.select())};Graph.prototype.deleteCells=function(a,b){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);
if(this.isTable(d)){var f=this.getCellGeometry(a[c]),g=this.getCellGeometry(d);null!=f&&null!=g&&(g=g.clone(),g.height-=f.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,b)}finally{this.model.endUpdate()}if(null!=l)for(e=[],c=0;c<l.length;c++)this.model.contains(l[c])&&(this.model.isVertex(l[c])||this.model.isEdge(l[c]))&&e.push(l[c])}return e};Graph.prototype.insertTableColumn=function(a,b){var e=this.getModel();e.beginUpdate();
try{var c=a,d=0;if(this.isTableCell(a))var f=e.getParent(a),c=e.getParent(f),d=mxUtils.indexOf(e.getChildCells(f,!0),a);else this.isTableRow(a)?c=e.getParent(a):a=e.getChildCells(c,!0)[0],b||(d=e.getChildCells(a,!0).length-1);for(var g=e.getChildCells(c,!0),l=Graph.minTableColumnWidth,f=0;f<g.length;f++){var p=e.getChildCells(g[f],!0)[d],u=e.cloneCell(p,!1),n=this.getCellGeometry(u);u.value=null;if(null!=n){var l=n.width,t=this.getCellGeometry(g[f]);null!=t&&(n.height=t.height)}e.add(g[f],u,d+(b?
try{var c=a,d=0;if(this.isTableCell(a))var f=e.getParent(a),c=e.getParent(f),d=mxUtils.indexOf(e.getChildCells(f,!0),a);else this.isTableRow(a)?c=e.getParent(a):a=e.getChildCells(c,!0)[0],b||(d=e.getChildCells(a,!0).length-1);for(var g=e.getChildCells(c,!0),l=Graph.minTableColumnWidth,f=0;f<g.length;f++){var p=e.getChildCells(g[f],!0)[d],n=e.cloneCell(p,!1),u=this.getCellGeometry(n);n.value=null;if(null!=u){var l=u.width,t=this.getCellGeometry(g[f]);null!=t&&(u.height=t.height)}e.add(g[f],n,d+(b?
0:1))}var A=this.getCellGeometry(c);null!=A&&(A=A.clone(),A.width+=l,e.setGeometry(c,A))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=a;if(this.isTableCell(a))d=e.getParent(a),c=e.getParent(d);else if(this.isTableRow(a))c=e.getParent(a);else var f=e.getChildCells(c,!0),d=f[b?0:f.length-1];var g=e.getChildCells(d,!0),l=c.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var p=this.getCellGeometry(d);if(null!=p){for(f=0;f<g.length;f++){a=
e.cloneCell(g[f],!1);d.insert(a);a.value=null;var u=this.getCellGeometry(a);null!=u&&(u.height=p.height)}e.add(c,d,l+(b?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=p.height,e.setGeometry(c,n))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=this.getModel();b.beginUpdate();try{var e=a,c=0;if(this.isTableCell(a))var d=b.getParent(a),e=b.getParent(d),c=d.getIndex(a);else this.isTableRow(a)?(e=b.getParent(a),c=b.getChildCount(a)-1):this.isTable(a)&&
e.cloneCell(g[f],!1);d.insert(a);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=p.height)}e.add(c,d,l+(b?0:1));var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.height+=p.height,e.setGeometry(c,u))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=this.getModel();b.beginUpdate();try{var e=a,c=0;if(this.isTableCell(a))var d=b.getParent(a),e=b.getParent(d),c=d.getIndex(a);else this.isTableRow(a)?(e=b.getParent(a),c=b.getChildCount(a)-1):this.isTable(a)&&
(c=b.getChildCount(b.getChildAt(a,0))-1);for(var f=a=0;f<b.getChildCount(e);f++){var d=b.getChildAt(e,f),g=b.getChildAt(d,c);b.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var p=this.getCellGeometry(e);null!=p&&(p=p.clone(),p.width-=a,b.setGeometry(e,p))}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var e=a;this.isTableCell(a)?e=b.getParent(a):this.isTable(a)&&(e=b.getChildAt(a,b.getChildCount(a)-1));var c=
b.getParent(e);b.remove(e);a=0;var d=this.getCellGeometry(e);null!=d&&(a=d.height);var f=this.getCellGeometry(c);null!=f&&(f=f.clone(),f.height-=a,b.setGeometry(c,f))}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var e=a.tBodies[0],c=e.rows[0].cells,d=0,f=0;f<c.length;f++)var g=c[f].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);e=e.insertRow(b);for(f=0;f<d;f++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};
Graph.prototype.insertColumn=function(a,b){var e=a.tHead;if(null!=e)for(var c=0;c<e.rows.length;c++){var d=document.createElement("th");e.rows[c].appendChild(d);mxUtils.br(d)}e=a.tBodies[0];for(c=0;c<e.rows.length;c++)d=e.rows[c].insertCell(b),mxUtils.br(d);return e.rows[0].cells[0<=b?b:e.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var e=a.tBodies[0].rows,c=0;c<e.length;c++)e[c].cells.length>b&&e[c].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;
@ -2947,9 +2947,8 @@ function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.
MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/SVG"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},SVG:{font:null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX",useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var e=Editor.prototype.init;Editor.prototype.init=function(){e.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
b){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;c[0].parentNode.appendChild(d)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,e,c,d){void 0!==e?b.push(e.replace(/\\'/g,"'")):void 0!==c?b.push(c.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.diagrams\.net\/proxy/.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=
a.convert,e=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=Editor.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||e.crossOriginImages&&e.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};
var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,e,c,d){void 0!==e?b.push(e.replace(/\\'/g,"'")):void 0!==c?b.push(c.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.prototype.isCorsEnabledForUrl=function(a){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
var b=a.convert,e=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=Editor.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||e.crossOriginImages&&e.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};
Editor.prototype.convertImageToDataUri=function(a,b){try{var e=!0,c=window.setTimeout(mxUtils.bind(this,function(){e=!1;b(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);e&&b(Editor.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c);e&&b(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(c);if(e)try{var a=document.createElement("canvas"),
f=a.getContext("2d");a.height=d.height;a.width=d.width;f.drawImage(d,0,0);b(a.toDataURL())}catch(Z){b(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(c);e&&b(Editor.svgBrokenImage.src)};d.src=a}}catch(I){b(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,f=e||{};e=mxUtils.bind(this,function(e,g){for(var l=a.getElementsByTagName(e),p=0;p<l.length;p++)mxUtils.bind(this,function(e){try{if(null!=e){var l=
c.convert(e.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var p=f[l];null==p?(d++,this.convertImageToDataUri(l,function(c){null!=c&&(f[l]=c,e.setAttribute(g,c));d--;0==d&&b(a)})):e.setAttribute(g,p)}else null!=l&&e.setAttribute(g,l)}}catch(da){}})(l[p])});e("image","xlink:href");e("img","src");0==d&&b(a)};Editor.base64Encode=function(a){for(var b="",e=0,c=a.length,d,f,g;e<c;){d=a.charCodeAt(e++)&255;if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
@ -3006,10 +3005,10 @@ n.length;m<b;m++)n.push(p);n=n.join(",");k.setCellStyles(e.dependentProps[a],n,k
"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function f(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height=
"12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),m.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var p=g,t=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==a)p=p.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=n(a,"",k,0==t%2,l);c(a,d,
k);p.parentNode.insertBefore(t,p.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var p=0;p<d;p++)l[p]=null!=b[p]?b[p]:null!=c?c:"";m.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}function p(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,
"change",function(){c(a,d.checked?"1":"0",e)});return d}function n(b,e,n,k,m){var v=n.dispName,y=n.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=n.index&&(u.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",k=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(x.style.textAlign=
"right");u.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==y)x.appendChild(f(b,e,n));else if("bool"==y||"boolean"==y)x.appendChild(p(b,e,n));else if("enum"==y){var A=n.enumList;for(m=0;m<A.length;m++)if(v=A[m],v.val==e){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(t,function(){var f=document.createElement("select");d(x,f);for(var g=0;g<A.length;g++){var l=A[g],p=document.createElement("option");
p.value=mxUtils.htmlEntities(l.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(p)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,n)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?x.appendChild(g(b,e,n.subType,n.subDefVal,n.countProperty,u,m)):"staticArr"==y?x.appendChild(l(b,e,n.subType,n.subDefVal,n.size,u,m)):(x.innerHTML=e,mxEvent.addListener(x,
"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,n)}var g=document.createElement("input");d(x,g,!0);g.value=e;g.className="gePropEditor";"int"!=y&&"float"!=y||n.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=n.min&&
"change",function(){c(a,d.checked?"1":"0",e)});return d}function n(b,e,n,k,m){var y=n.dispName,v=n.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=n.index&&(u.setAttribute("data-index",n.index),y=(null!=y?y:"")+"["+n.index+"]",k=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(y,null,y));k&&(x.style.textAlign=
"right");u.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==v)x.appendChild(f(b,e,n));else if("bool"==v||"boolean"==v)x.appendChild(p(b,e,n));else if("enum"==v){var A=n.enumList;for(m=0;m<A.length;m++)if(y=A[m],y.val==e){x.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(t,function(){var f=document.createElement("select");d(x,f);for(var g=0;g<A.length;g++){var l=A[g],p=document.createElement("option");
p.value=mxUtils.htmlEntities(l.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(p)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,n)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==v?x.appendChild(g(b,e,n.subType,n.subDefVal,n.countProperty,u,m)):"staticArr"==v?x.appendChild(l(b,e,n.subType,n.subDefVal,n.size,u,m)):(x.innerHTML=e,mxEvent.addListener(x,
"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=v?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");c(b,a,n)}var g=document.createElement("input");d(x,g,!0);g.value=e;g.className="gePropEditor";"int"!=v&&"float"!=v||n.allowAuto||(g.type="number",g.step="int"==v?"1":"any",null!=n.min&&
(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));n.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",n,n.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",x.appendChild(m));u.appendChild(x);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position=
"relative";a.style.padding="0";var y=document.createElement("table");y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;u.appendChild(x);mxUtils.write(u,mxResources.get("property"));v.style.cursor="pointer";var A=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){x.src=
Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else x.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});v.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");
@ -3037,8 +3036,8 @@ if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.g
"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=C.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);
return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var B=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,p,n,t,k){var m=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(m=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
this.refresh());var y=B.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var v=y.ownerDocument,u=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var x="",A="",z=0;z<this.extFonts.length;z++){var q=this.extFonts[z].name,C=this.extFonts[z].url;0==C.indexOf(Editor.GOOGLE_FONTS)?x+="@import url("+C+");\n":A+='@font-face {\nfont-family: "'+
q+'";\nsrc: url("'+C+'");\n}\n'}u.appendChild(v.createTextNode(x+A));y.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return y};var D=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=D.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
this.refresh());var v=B.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=v.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var x="",A="",z=0;z<this.extFonts.length;z++){var q=this.extFonts[z].name,C=this.extFonts[z].url;0==C.indexOf(Editor.GOOGLE_FONTS)?x+="@import url("+C+");\n":A+='@font-face {\nfont-family: "'+
q+'";\nsrc: url("'+C+'");\n}\n'}u.appendChild(y.createTextNode(x+A));v.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return v};var D=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=D.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
@ -3543,13 +3542,13 @@ c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(
m[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[k],c))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!c);m=d;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return y.isVertex(a)&&f(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);
return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function b(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,c){c=null!=c?c:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=b(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||
g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var z=t.model.getTerminal(p[y],!1);if(g==b(z)){var u=t.view.getState(z);z!=a&&null!=u&&(q&&c!=u.getCenterX()<l.getCenterX()||!q&&c!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(e=10+Math.max(e,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(z=t.model.getTerminal(p[y],
!1),g==b(z)&&(u=t.view.getState(z),z!=a&&null!=u&&(q&&c!=u.getCenterX()<l.getCenterX()||!q&&c!=u.getCenterY()<l.getCenterY()))){var A=[];t.traverse(u.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var p=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?p.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*m:p.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*m;var n=t.getOutgoingEdges(t.model.getTerminal(e[0],
!0));if(null!=n){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<n.length;y++){var u=t.model.getTerminal(n[y],!1);if(g==b(u)){var z=t.view.getState(u);u!=a&&null!=z&&(q&&c!=z.getCenterX()<l.getCenterX()||!q&&c!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(p,z)&&(e=10+Math.max(e,(Math.min(p.x+p.width,z.x+z.width)-Math.max(p.x,z.x))/m),k=10+Math.max(k,(Math.min(p.y+p.height,z.y+z.height)-Math.max(p.y,z.y))/m))}}q?k=0:e=0;for(y=0;y<n.length;y++)if(u=t.model.getTerminal(n[y],
!1),g==b(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(q&&c!=z.getCenterX()<l.getCenterX()||!q&&c!=z.getCenterY()<l.getCenterY()))){var A=[];t.traverse(z.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,m=-m):c==mxConstants.DIRECTION_WEST?(l=-l,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
"vertical":"horizontal",[g[0]])}catch(Y){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,u=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/u-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
"vertical":"horizontal",[g[0]])}catch(Y){}}var e=t.getOutgoingEdges(a),p=d.geometry,k=[];t.view.currentRoot==d&&(p=new mxRectangle);for(l=0;l<e.length;l++){var n=t.model.getTerminal(e[l],!1);null!=n&&k.push(n)}var q=t.view.getBounds(k),y=t.view.translate,z=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/z-y.x-p.x+10,g[1].geometry.y+=g[1].geometry.height-p.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/z-y.x+-p.x+10,g[1].geometry.y-=g[1].geometry.height+p.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+p.x+40):g[1].geometry.x+(g[1].geometry.width-p.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/z-y.y+-p.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?v.actions.get("selectParent").funct():
d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=l(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,y=t.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
@ -3557,9 +3556,9 @@ if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1))
function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var C=t.removeCells;t.removeCells=function(b,c){c=null!=
c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return C.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
d))};var B=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=B.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var D=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-y.getCenterX())/t.view.scale,d=(u.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=D.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var z=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var D=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,p=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var n=0;n<b.length;n++)if(a(b[n])||t.model.isEdge(b[n])&&null==t.model.getTerminal(b[n],!0)){f=t.model.getParent(b[n]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var z=t.view.getState(m);null!=z&&(c=(z.getCenterX()-y.getCenterX())/t.view.scale,d=(z.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=D.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(n=0;n<l.length;n++)if(this.model.isEdge(l[n]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[n],!0))&&this.model.setTerminal(l[n],m,!0);else if(a(b[n])&&(q=t.getIncomingEdges(b[n]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[n]).length){p=m;if(null==p||p==t.model.getParent(b[n]))p=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),p,l[n])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var z=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(I){v.handleError(I)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
@ -3612,22 +3611,23 @@ this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisibl
this.menus.findWindow=null);l.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(b.menus.addMenuItems(a,["new","open","-"],c),EditorUi.isElectronApp&&b.menus.addMenuItems(a,["synchronize","-"],c),b.menus.addMenuItems(a,["save","saveAs","-"],c)):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),isLocalStorage&&this.addSubmenu("openRecent",a,c),a.addSeparator(c),null!=
d&&d.constructor==DriveFile&&b.menus.addMenuItems(a,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||b.menus.addMenuItems(a,["synchronize"],c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);b.menus.addMenuItems(a,["-","outline","layers"],c);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],
c);b.menus.addMenuItems(a,["-","find","tags"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();
null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,
function(a,c){e.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);b.menus.addSubmenu("units",a,c);a.addSeparator(c);
b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),
c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);b.menus.addSubmenu("table",a,d);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",
new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect",
"collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));
l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";
g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?
"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");
c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var c=a.nextSibling;
"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=n.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(b.menus.addMenuItems(a,["new","open","-"],c),EditorUi.isElectronApp&&b.menus.addMenuItems(a,["synchronize","-"],c),b.menus.addMenuItems(a,["save","saveAs","-"],c)):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&
b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),isLocalStorage&&this.addSubmenu("openRecent",a,c),a.addSeparator(c),null!=d&&d.constructor==DriveFile&&b.menus.addMenuItems(a,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||b.menus.addMenuItems(a,["synchronize"],c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);b.menus.addMenuItems(a,["-","outline","layers"],c);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c);b.menus.addMenuItems(a,["-","find","tags"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);
b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],
c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){e.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,
c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);b.menus.addSubmenu("units",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);
b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);b.menus.addSubmenu("table",a,d);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=
b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor=
"pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=
b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=n.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,
null,mxResources.get("shapes"),l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);c=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);e([c,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=f&&(c=l.actions.get("undo"),a=l.actions.get("redo"),c=d("",c.funct,null,mxResources.get("undo")+" ("+c.shortcut+")",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),e([c,a],60),480<=f)){var a=l.actions.get("zoomIn"),c=l.actions.get("zoomOut"),g=l.actions.get("resetView");

View file

@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
"revision": "945297eb7314367c6029a0122ec99067"
"revision": "092164cd50b7e6b4ee96f8e85b8d8684"
},
{
"url": "js/extensions.min.js",