13.4.6 release

This commit is contained in:
Gaudenz Alder 2020-07-17 18:49:43 +02:00
parent d851398458
commit ede772cf4c
75 changed files with 780 additions and 896 deletions

View file

@ -1,3 +1,7 @@
17-JUL-2020: 13.4.6
- Simplified Start Screen
16-JUL-2020: 13.4.5
- Fixes ignored right meta key on macOS

View file

@ -1 +1 @@
13.4.5
13.4.6

View file

@ -31,10 +31,12 @@ script.onload = function()
importBtn.click(function()
{
$('#busyIcon').show();
importBtn.prop('disabled', true); //Disable button to prevent concurrent execution
GliffyMassImporter(logDiv, function()
{
$('#busyIcon').hide();
importBtn.prop('disabled', false);
});
});
});

View file

@ -261,6 +261,8 @@ var MassDiagramsProcessor = function(macroName, readableName, attParams, process
var start = 0, limit = 100;
var regExps = getMacroRegExps(macroName, attParams);
var pagesCount = 0, pagesIndex = 0;
var pagesList = [], pagesMap = {};
function searchContentForMacro(onSuccess, onError)
{
@ -272,14 +274,18 @@ var MassDiagramsProcessor = function(macroName, readableName, attParams, process
contentType: 'application/json;charset=UTF-8',
success: function(resp) {
var resp = JSON.parse(resp);
var list = resp.results;
var list = resp.results.filter(function(p)
//Ensure pages list is unique since search api return duplicates
for (var i = 0; i < list.length; i++)
{
return p.status != 'trashed'; //remove trashed pages
});
Array.prototype.push.apply(pagesList, list);
pagesCount += list.length;
if (!pagesMap[list[i].id] && list[i].status != 'trashed') //remove duplicates & trashed pages
{
pagesList.push(list[i]);
pagesMap[list[i].id] = true;
pagesCount++;
}
}
//Support pageing
if (resp._links && resp._links.next)
@ -312,9 +318,6 @@ var MassDiagramsProcessor = function(macroName, readableName, attParams, process
};
};
var pagesCount = 0, pagesIndex = 0;
var pagesList = [];
//Process pages one at a time
function processPage()
{

View file

@ -57,9 +57,12 @@ script.onload = function()
importBtn.click(function()
{
$('#loadingImg').show();
importBtn.prop('disabled', true); //Disable button to prevent concurrent execution
LucidConnMassImporter(response.filesMap, importExtensionId, logDiv, function()
{
$('#loadingImg').hide();
importBtn.prop('disabled', false);
})
});
}

View file

@ -2288,8 +2288,8 @@ arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;th
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,c=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){"mouseDown"==b.getProperty("eventName")&&c.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));var d=
a.dblClick;a.dblClick=function(a,b){if(this.isEnabled())if(null!=b||null==c.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{mxEvent.consume(a);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(e.x,e.y)}};if(null!=this.hoverIcons){var b=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();b.apply(this,arguments)};var f=this.hoverIcons.execute;this.hoverIcons.execute=function(b,d,g){var e=g.getEvent();mxEvent.isControlDown(e)||
mxEvent.isShiftDown(e)?f.apply(this,arguments):this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(d,e,f){d=a.getCompositeParent(b.cell);e=a.getCellGeometry(d);for(g.consume();null!=d&&a.model.isVertex(d)&&null!=e&&e.relative;)cell=d,d=a.model.getParent(cell),e=a.getCellGeometry(d);c.showShapePicker(g.getGraphX(),g.getGraphY(),d,mxUtils.bind(this,function(a){f(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
EditorUi.prototype.showShapePicker=function(a,c,d,b){var f=this.getCellsForShapePicker(d);if(null!=f&&0<f.length){var e=this,h=this.editor.graph,g=document.createElement("div"),k=null!=d?h.copyStyle(d):null;g.className="geToolbarContainer geSidebarContainer geSidebar";g.style.cssText="position:absolute;left:"+(a-22)+"px;top:"+(c-22)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=h.background&&h.background!=mxConstants.NONE&&
(g.style.backgroundColor=h.background);h.container.appendChild(g);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(f);null!=k&&this.sidebar.graph.pasteStyle(k,[d]);e.insertHandler([d],""!=d.value,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);
EditorUi.prototype.showShapePicker=function(a,c,d,b){var f=this.getCellsForShapePicker(d);if(null!=f&&0<f.length){var e=this,h=this.editor.graph,g=document.createElement("div"),k=null!=d?h.copyStyle(d):null;g.className="geToolbarContainer geSidebarContainer geSidebar";g.style.cssText="position:absolute;left:"+(a-4)+"px;top:"+(c-4)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=h.background&&h.background!=mxConstants.NONE&&
(g.style.backgroundColor=h.background);h.container.appendChild(g);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(f);null!=k?this.sidebar.graph.pasteStyle(k,[d]):e.insertHandler([d],""!=d.value,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);
mxEvent.addListener(f,"click",function(){if(null!=b)b(d);else{d.geometry.x=h.snap(Math.round(a/h.view.scale)-h.view.translate.x-d.geometry.width/2);d.geometry.y=h.snap(Math.round(c/h.view.scale)-h.view.translate.y-d.geometry.height/2);h.model.beginUpdate();try{h.addCell(d)}finally{h.model.endUpdate()}h.setSelectionCell(d);h.scrollCellToVisible(h.getSelectionCell());h.startEditingAtCell(d)}e.hideShapePicker()})});for(var l=0;l<f.length;l++)d(f[l]);h.tooltipHandler.hideTooltip();this.hideCurrentMenu();
this.hideShapePicker();this.shapePickerCallback=b;this.shapePicker=g}};
EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,b,c,e){return this.editor.graph.createVertex(null,null,e||"",0,0,b||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
@ -2339,7 +2339,7 @@ this.cumulativeZoomFactor+")";z.style.transformOrigin=b+"px "+f+"px";z.style.tra
a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}N(e)};mxEvent.addGestureListeners(a.container,function(a){null!=A&&window.clearTimeout(A)},null,function(b){1!=a.cumulativeZoomFactor&&N(0)});mxEvent.addListener(a.container,"scroll",function(){A&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
N(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(b)){d=a.view.getTranslate();var e=40/a.view.scale;mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e))}else if(d||a.isZoomWheelEvent(b))for(d=mxEvent.getSource(b);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),E=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),
mxEvent.consume(b),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.createTemporaryGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,d=60;null!=c&&(d=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(d,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
@ -9032,8 +9032,8 @@ DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{e=this.getErrorMessage(a);if(null==e&&null!=this.lastSaved){var c=this.ui.timeSince(new Date(this.lastSaved));
null!=c&&(e=mxResources.get("lastSaved",[c]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+e+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:'+(mxClient.IS_FF?-3:-2)+'px"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");
null!=e&&0<e.length?mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=
window.setTimeout(mxUtils.bind(this,function(){this.saveDraft()}),0))}};
null!=e&&0<e.length?mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),
this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.saveDraft()}),0))}};
DrawioFile.prototype.addConflictStatus=function(a,e){this.invalidChecksum&&null==e&&(e=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""));this.ui.spinner.stop();this.clearAutosave();var c=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=c&&0<c.length?mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&
a()})):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};DrawioFile.prototype.setConflictStatus=function(a){this.ui.editor.setStatus('<div title="'+a+'" class="geStatusAlert geBlink" style="cursor:pointer;overflow:hidden;">'+a+' <a href="https://desk.draw.io/support/solutions/articles/16000087947" target="_blank"><img border="0" style="margin-left:2px;cursor:help;opacity:0.5;width:16px;height:16px;" valign="bottom" src="'+Editor.helpImage+'" style=""/></a></div>')};
DrawioFile.prototype.showRefreshDialog=function(a,e,c){null==c&&(c=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,e)}),c),this.ui.showError(mxResources.get("error")+" ("+c+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
@ -9076,47 +9076,37 @@ StorageFile.listFiles=function(a,e,c,b){a.getDatabaseItems(function(a){var b=[];
StorageLibrary.prototype.isRenamable=function(a,e,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,e,c){DrawioFile.call(this,a,e);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,e,c){RemoteFile.call(this,a,e,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,e,c){};
RemoteLibrary.prototype.saveAs=function(a,e,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,e,c){StorageFile.call(this,a,e,c);a=c;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,e,c){return!1};UrlLibrary.prototype.saveAs=function(a,e,c){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
var StorageDialog=function(a,e,c){function b(b,f,p,k,t,l){function z(){mxEvent.addListener(u,"click",null!=l?l:function(){p!=App.MODE_GOOGLE||a.isDriveDomain()?p==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,d.checked);e()})):p==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,d.checked);
e()})):(a.setMode(p,d.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}++g>c&&(mxUtils.br(m),g=0);var u=document.createElement("a");u.style.overflow="hidden";u.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";u.className="geBaseButton";u.style.boxSizing="border-box";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.marginTop="2px";u.style.padding="8px 10px 12px 10px";u.style.width="88px";u.style.height=StorageDialog.extended?"50px":
"100px";u.style.whiteSpace="nowrap";u.setAttribute("title",f);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.overflow="hidden";if(null!=b){var H=document.createElement("img");H.setAttribute("src",b);H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width=StorageDialog.extended?"24px":"60px";H.style.height=StorageDialog.extended?"24px":"60px";H.style.paddingBottom=StorageDialog.extended?
"4px":"6px";u.appendChild(H)}else q.style.paddingTop="5px",q.style.whiteSpace="normal",mxClient.IS_IOS?(u.style.padding="0px 10px 20px 10px",u.style.top="6px"):mxClient.IS_FF&&(q.style.paddingTop="0px",q.style.marginTop="-2px");StorageDialog.extended&&(u.style.paddingTop="4px",u.style.marginBottom="0px",q.display="inline-block",2==c&&(H.style.width="38px",H.style.height="38px",u.style.width="80px",u.style.height="68px"));u.appendChild(q);mxUtils.write(q,f);if(null!=t)for(b=0;b<t.length;b++)mxUtils.br(q),
mxUtils.write(q,t[b]);if(null!=k&&null==a[k]){H.style.visibility="hidden";mxUtils.setOpacity(q,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(u);var B=window.setTimeout(function(){null==a[k]&&(v.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(B),mxUtils.setOpacity(q,
100),H.style.visibility="",v.stop(),z(),"drive"==k&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else z();m.appendChild(u)}c=null!=c?c:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var f=a.addLanguageMenu(k,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",
mxResources.get("help"));f.setAttribute("target","_blank");f.style.position="absolute";f.style.userSelect="none";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";f.appendChild(l);
mxUtils.write(f,mxResources.get("help"));k.appendChild(f)}this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)q.style.marginLeft=-Math.round(q.clientWidth/2)+"px"};f=document.createElement("div");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="12px 0px 12px 0px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");
d.defaultChecked=!0;var g=0,m=document.createElement("div");m.style.paddingTop="2px";f.appendChild(m);var n=document.createElement("p"),l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.paddingTop="4px";l.style.paddingBottom="16px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");k.appendChild(l);var p=function(){g=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),
App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};k.appendChild(f);p();l=document.createElement("p");l.style.marginTop="8px";l.style.marginBottom="6px";var t=document.createElement("div");t.style.marginBottom="10px";if(!a.isOfflineApp()){var u=document.createElement("a");u.style.color="gray";u.style.cursor="pointer";u.style.userSelect=
"none";mxUtils.write(u,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");t.appendChild(u);l.appendChild(t);mxEvent.addListener(u,"click",function(a){m.innerHTML="";u.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(u,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}var q=document.createElement("div");q.style.cursor="pointer";q.style.color="gray";q.style.userSelect="none";
mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"...");mxEvent.addListener(q,"click",function(){if(null==a.storageFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(){null!=d.files&&(a.hideDialog(),a.openFiles(d.files,!0),d.type="",d.type="file",d.value="")});d.style.display="none";document.body.appendChild(d);
a.storageFileInputElt=d}a.storageFileInputElt.click()});l.appendChild(q);t=a.getRecent();if(!a.isOfflineApp()&&null!=t&&0<t.length){var v=document.createElement("select");v.style.marginTop="12px";v.style.maxWidth="170px";var x=document.createElement("option");x.setAttribute("value","");x.setAttribute("selected","selected");x.style.textAlign="center";mxUtils.write(x,mxResources.get("openRecent")+"...");v.appendChild(x);for(x=0;x<t.length;x++)(function(a){var d=a.mode;d==App.MODE_GOOGLE?d="googleDrive":
d==App.MODE_ONEDRIVE&&(d="oneDrive");var b=document.createElement("option");b.setAttribute("value",a.id);mxUtils.write(b,a.title+" ("+mxResources.get(d)+")");v.appendChild(b)})(t[x]);l.appendChild(v);mxEvent.addListener(v,"change",function(d){""!=v.value&&a.loadFile(v.value)})}else l.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(t=document.createElement("div"),t.style.marginBottom="10px",t.style.padding="18px 0px 6px 0px",x=document.createElement("a"),x.style.cursor=
"pointer",x.style.color="gray",x.style.userSelect="none",mxUtils.write(x,mxResources.get("decideLater")),mxEvent.addListener(x,"click",function(){a.hideDialog();var d=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d}),t.appendChild(x),l.appendChild(t),f.style.paddingBottom="4px");f.appendChild(l);t=document.createElement("div");t.style.position="absolute";t.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";t.style.cursor="pointer";
t.style.fontSize="12px";t.style.bottom="27px";t.style.left="0px";t.style.right="0px";t.style.color="gray";t.style.userSelect="none";d.setAttribute("id","geRememberSettingCheckbox");d.style.marginRight="6px";d.style.cursor="inherit";t.appendChild(d);f=document.createElement("label");f.setAttribute("for","geRememberSettingCheckbox");mxUtils.write(f,mxResources.get("rememberThisSetting"));f.style.cursor="inherit";t.appendChild(f);mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0)");t.style.left=
"50%";k.appendChild(t);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="7px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+
"</a>",k.appendChild(n))},5E3);this.container=k};StorageDialog.extended=!1;
var SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";var c=a.addLanguageMenu(e,!0);null!=c&&(c.style.bottom="19px");c=null;c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px";
c.style.left="26px";c.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";c.appendChild(b);mxUtils.write(c,mxResources.get("help"));e.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";b=document.createElement("img");
b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="40px";b.style.height="40px";b.style.marginRight="12px";b.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+
"/github-logo.svg",k=mxResources.get("github")):a.mode==App.MODE_GITLAB?(b.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",k=mxResources.get("device"));var f=document.createElement("div");f.style.margin="4px 0px 0px 0px";var l=document.createElement("button");
l.className="geBigButton";l.style.fontSize="18px";l.style.padding="10px";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(f.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):(c.appendChild(b),mxUtils.write(c,k),e.appendChild(c),f.style.border="1px solid #d3d3d3",f.style.borderWidth="1px 0px 1px 0px",f.style.padding="18px 0px 24px 0px",l.style.marginBottom="8px");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width=
"340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});f.appendChild(l);mxUtils.br(f);l=document.createElement("button");l.className="geBigButton";l.style.marginBottom="22px";l.style.fontSize="18px";l.style.padding="10px";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram"));mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});
f.appendChild(l);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=function(d){l.style.marginBottom=
"24px";var b=document.createElement("a");b.style.display="inline-block";b.style.color="gray";b.style.cursor="pointer";b.style.marginTop="6px";mxUtils.write(b,mxResources.get("signOut"));l.style.marginBottom="16px";f.style.paddingBottom="18px";mxEvent.addListener(b,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){d()})});f.appendChild(b)},d=null!=a.drive?a.drive.getUsersList():[];if(a.mode==App.MODE_GOOGLE&&0<d.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,
mxResources.get("changeUser")+":");l.style.marginBottom="16px";f.style.paddingBottom="18px";f.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.width="200px";for(c=0;c<d.length;c++)b=document.createElement("option"),mxUtils.write(b,d[c].displayName),b.value=c,g.appendChild(b),b=document.createElement("option"),b.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(b,"<"+d[c].email+">"),b.setAttribute("disabled","disabled"),g.appendChild(b);b=document.createElement("option");
mxUtils.write(b,mxResources.get("addAccount"));b.value=d.length;g.appendChild(b);mxEvent.addListener(g,"change",function(){var b=g.value,c=d.length!=b;c&&a.drive.setUser(d[b]);a.drive.authorize(c,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(d){a.handleError(d,null,function(){a.hideDialog();a.showSplash()})},!0)});f.appendChild(g)}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?c(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?c(function(){a.gitHub.logout();
a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&null!=a.gitLab?c(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&c(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&c(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")});mxUtils.br(f);c=document.createElement("a");c.style.display="inline-block";c.style.color="gray";c.style.cursor="pointer";
c.style.marginTop="8px";mxUtils.write(c,mxResources.get("changeStorage"));mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});f.appendChild(c)}if(isLocalStorage){c=document.createElement("div");c.style.position="absolute";c.style.cursor="pointer";c.style.fontSize="12px";c.style.bottom="22px";c.style.left="0px";c.style.right="0px";c.style.color="gray";c.style.userSelect="none";var m=document.createElement("input");m.setAttribute("type","checkbox");
m.setAttribute("id","geDoNotShowAgainCheckbox");m.style.marginRight="6px";c.appendChild(m);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));c.appendChild(b);mxEvent.addListener(m,"click",function(){mxSettings.setShowStartScreen(!m.checked);mxSettings.save()});e.appendChild(c)}e.appendChild(f);this.container=e},EmbedDialog=function(a,e,c,b,k,f,l){l=null!=l?l:"Check out the diagram I made using @drawio";b=document.createElement("div");
var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=f?mxUtils.write(b,f):mxUtils.write(b,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);f=document.createElement("div");f.style.position="absolute";f.style.top="30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(e.length));b.appendChild(f);var g=document.createElement("textarea");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize",
"off");g.setAttribute("spellcheck","false");g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.marginTop="10px";g.style.resize="none";g.style.height="150px";g.style.width="440px";g.style.border="1px solid gray";g.value=mxResources.get("updatingDocument");b.appendChild(g);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(g.value=e,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",
!1,null)):(g.setAttribute("readonly","true"),g.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var b=5E5>e.length?
g.value:e;if(null!=k)k(b);else if(d)try{var m=a.openLink(b);null!=m&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=m&&null!=m.location.href&&m.location.href.substring(0,8)!=b.substring(0,8)&&(m.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(v){}}),c||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",f.appendChild(m));if(!d||7500<e.length){var n=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",e,"text/plain")});n.className="geBtn";f.appendChild(n)}if(d&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var p=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+
encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img");n.setAttribute("src",Editor.facebookImage);n.setAttribute("width","18");n.setAttribute("height","18");n.setAttribute("border","0");p.appendChild(n);p.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>
e.length&&(p=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(l)+"&url="+encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img"),n.setAttribute("src",Editor.tweetImage),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("border","0"),n.style.marginBottom="5px",p.appendChild(n),p.setAttribute("title",mxResources.get("twitter")+
" ("+a.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",f.appendChild(p))}n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(n);p=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
5E5>e.length?mxClient.IS_SF||null!=document.documentMode?n.className="geBtn gePrimaryBtn":(f.appendChild(p),p.className="geBtn gePrimaryBtn",n.className="geBtn"):(f.appendChild(m),n.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};EmbedDialog.showPreviewOption=!0;
var StorageDialog=function(a,e,c){function b(b,m,f,k,q,v){function n(){mxEvent.addListener(p,"click",null!=v?v:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);e()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);e()})):
(a.setMode(f,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}++l>c&&(mxUtils.br(d),l=0);var p=document.createElement("a");p.style.overflow="hidden";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.marginTop="8px";p.style.marginBottom="0px";p.style.padding="8px 10px 8px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace=
"nowrap";p.setAttribute("title",m);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.overflow="hidden";t.style.position="absolute";t.style.bottom="8px";t.style.left="0px";t.style.right="0px";mxUtils.write(t,m);p.appendChild(t);if(null!=b){var z=document.createElement("img");z.setAttribute("src",b);z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="60px";z.style.height="60px";z.style.paddingBottom=
"6px";p.appendChild(z)}else t.style.paddingTop="5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");if(null!=q)for(b=0;b<q.length;b++)mxUtils.br(t),mxUtils.write(t,q[b]);if(null!=k&&null==a[k]){z.style.visibility="hidden";mxUtils.setOpacity(t,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,
hwaccel:!1,top:"40%",zIndex:2E9});u.spin(p);var C=window.setTimeout(function(){null==a[k]&&(u.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(C),mxUtils.setOpacity(t,100),z.style.visibility="",u.stop(),n(),"drive"==k&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else n();d.appendChild(p)}c=null!=c?c:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
"nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)demo.style.marginLeft=-Math.round(demo.clientWidth/2)+"px"};var f=document.createElement("div");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="10px 0px 20px 0px";mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");var l=0,d=document.createElement("div");d.style.paddingTop="2px";f.appendChild(d);var g=document.createElement("p"),
m=document.createElement("p");m.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(m,mxResources.get("saveDiagramsTo")+":");k.appendChild(m);k.appendChild(f);l=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",
mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,
"gitLab");f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("decideLater"));mxEvent.addListener(f,"click",function(){a.hideDialog();var d=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});k.appendChild(f);mxClient.IS_SVG&&isLocalStorage&&
"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(g.style.padding="7px",g.style.fontSize="9pt",g.style.marginTop="-14px",g.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+
"</a>",k.appendChild(g))},5E3);this.container=k},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var c=a.addLanguageMenu(e,!0);null!=c&&(c.style.bottom="19px")}a.getServiceCount();var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="32px";b.style.height="32px";b.style.marginRight="8px";b.style.marginTop="-4px";var k=document.createElement("div");
k.style.margin="8px 0px 0px 0px";k.style.padding="18px 0px 24px 0px";c="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",c=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",c=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",c=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",c=mxResources.get("github")):a.mode==App.MODE_GITLAB?(b.src=IMAGE_PATH+"/gitlab-logo.svg",
c=mxResources.get("gitlab")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",c=mxResources.get("browser")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+"/trello-logo.svg",c=mxResources.get("trello")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",k.style.paddingBottom="10px",k.style.paddingTop="30px",c=mxResources.get("device"));var f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="8px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";
if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.style.padding="42px 0px 56px 0px",f.style.marginBottom="12px";else{k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";var l=document.createElement("table"),d=document.createElement("tbody"),g=document.createElement("tr"),m=document.createElement("td"),n=document.createElement("td");l.setAttribute("align","center");m.appendChild(b);b=document.createElement("div");b.style.fontSize="22px";b.style.paddingBottom="6px";b.style.color=
"gray";mxUtils.write(b,c);n.style.textAlign="left";n.appendChild(b);g.appendChild(m);g.appendChild(n);d.appendChild(g);l.appendChild(d);e.appendChild(l);c=document.createElement("span");c.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0)");mxUtils.write(c,mxResources.get("changeStorage"));mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();
a.showSplash(!0)});e.appendChild(c)}mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(f.style.width="340px");mxUtils.write(f,mxResources.get("createNewDiagram"));mxEvent.addListener(f,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(f);mxUtils.br(k);f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="22px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";mxClient.IS_QUIRKS&&
(f.style.width="340px");mxUtils.write(f,mxResources.get("openExistingDiagram"));mxEvent.addListener(f,"click",function(){a.actions.get("open").funct()});k.appendChild(f);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?
mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(c=function(d){f.style.marginBottom="24px";var b=document.createElement("a");b.style.display="inline-block";b.style.color="gray";b.style.cursor="pointer";b.style.marginTop="6px";mxUtils.write(b,mxResources.get("signOut"));f.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(b,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){d()})});
k.appendChild(b)},a.mode==App.MODE_GOOGLE&&null!=a.drive){var p=a.drive.getUsersList();if(0<p.length){b=document.createElement("span");b.style.marginTop="6px";mxUtils.write(b,mxResources.get("changeUser")+":");f.style.marginBottom="16px";k.style.paddingBottom="18px";k.appendChild(b);var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(c=0;c<p.length;c++)l=document.createElement("option"),mxUtils.write(l,p[c].displayName),l.value=c,t.appendChild(l),l=document.createElement("option"),
l.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(l,"<"+p[c].email+">"),l.setAttribute("disabled","disabled"),t.appendChild(l);l=document.createElement("option");mxUtils.write(l,mxResources.get("addAccount"));l.value=p.length;t.appendChild(l);mxEvent.addListener(t,"change",function(){var d=t.value,b=p.length!=d;b&&a.drive.setUser(p[d]);a.drive.authorize(b,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(d){a.handleError(d,null,function(){a.hideDialog();a.showSplash()})},
!0)});k.appendChild(t)}else c(function(){a.drive.logout()})}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?c(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?c(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&null!=a.gitLab?c(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&c(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&
null!=a.dropbox&&c(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")});e.appendChild(k);this.container=e},EmbedDialog=function(a,e,c,b,k,f,l){l=null!=l?l:"Check out the diagram I made using @drawio";b=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=f?mxUtils.write(b,f):mxUtils.write(b,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);f=document.createElement("div");f.style.position="absolute";f.style.top=
"30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(e.length));b.appendChild(f);var g=document.createElement("textarea");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.marginTop="10px";g.style.resize="none";g.style.height="150px";g.style.width="440px";g.style.border="1px solid gray";g.value=mxResources.get("updatingDocument");
b.appendChild(g);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(g.value=e,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)):(g.setAttribute("readonly","true"),g.value=mxResources.get("tooLargeUseDownload"))},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&
!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var b=5E5>e.length?g.value:e;if(null!=k)k(b);else if(d)try{var m=a.openLink(b);null!=m&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=m&&null!=m.location.href&&m.location.href.substring(0,8)!=b.substring(0,8)&&(m.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(v){}}),
c||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",f.appendChild(m));if(!d||7500<e.length){var n=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
a.saveData("embed.txt","txt",e,"text/plain")});n.className="geBtn";f.appendChild(n)}if(d&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var p=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img");n.setAttribute("src",Editor.facebookImage);n.setAttribute("width","18");n.setAttribute("height","18");n.setAttribute("border",
"0");p.appendChild(n);p.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>e.length&&(p=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(l)+"&url="+encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img"),
n.setAttribute("src",Editor.tweetImage),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("border","0"),n.style.marginBottom="5px",p.appendChild(n),p.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",f.appendChild(p))}n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(n);p=mxUtils.button(mxResources.get("copy"),
function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?n.className="geBtn gePrimaryBtn":(f.appendChild(p),p.className="geBtn gePrimaryBtn",n.className="geBtn"):(f.appendChild(m),n.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};
EmbedDialog.showPreviewOption=!0;
var GoogleSitesDialog=function(a,e){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=t.value){var d="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(d+="&title="+encodeURIComponent(a));0<C.length&&(d+="&s="+C);""!=u.value&&"0"!=u.value&&(d+="&border="+u.value);""!=p.value&&(d+="&height="+p.value);d+="&pan="+(q.checked?"1":"0");d+="&zoom="+(v.checked?"1":"0");d+="&fit="+(z.checked?"1":"0");
d+="&resize="+(A.checked?"1":"0");d+="&x0="+Number(n.value);d+="&y0="+g;k.mathEnabled&&(d+="&math=1");y.checked?d+="&edit=_blank":x.checked&&(d+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=d}else D.constructor==DriveFile||D.constructor==DropboxFile?(d="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?d+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(d+=D.getHash().substring(1),d=D.constructor==DropboxFile?d+"&type=2":d+"&type=1"),null!=
a&&(d+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(n.value),d+="&height="+a),m.value=d):m.value=""}var b=document.createElement("div"),k=a.editor.graph,f=k.getGraphBounds(),l=k.view.scale,d=Math.floor(f.x/l-k.view.translate.x),g=Math.floor(f.y/l-k.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
@ -9150,12 +9140,12 @@ b||"plantUmlSvg"==b||"plantUmlTxt"==b){if(a.spinner.spin(document.body,mxResourc
295,212)},200):a.generatePlantUmlImage(d,n,function(b,c,e){a.spinner.stop();g(d,n,b,c,e)},function(d){a.handleError(d)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(m=a.editor.graph,a.generateMermaidImage(d,n,function(b,e,g){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,e,g));a.spinner.stop();var n=null;m.getModel().beginUpdate();try{n=m.insertVertex(null,null,null,f.x,f.y,e,g,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
b+";"),m.setAttributeForCell(n,"mermaidData",JSON.stringify({data:d,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=n&&(m.setSelectionCell(n),m.scrollCellToVisible(n))},function(d){a.handleError(d)}));else if("table"==b){var p=null,k=[],t=0;for(b=0;b<e.length;b++){var l=mxUtils.trim(e[b]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),p=new mxCell(l,new mxGeometry(t,
0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,k.push(p),l=a.editor.graph.getPreferredSizeForCell(q),null!=l&&(p.geometry.width=l.width+10);else if(null!=p&&")"==l.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=l&&null!=p&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var u=l.toLowerCase().indexOf("primary key"),
l=l.replace(/primary key/i,""),q=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");q.vertex=!0;var I=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));I.vertex=!0;q.insert(I);l=new mxCell(l,new mxGeometry(30,
l=l.replace(/primary key/i,""),q=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");q.vertex=!0;var H=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));H.vertex=!0;q.insert(H);l=new mxCell(l,new mxGeometry(30,
0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));l.vertex=!0;q.insert(l);l=a.editor.graph.getPreferredSizeForCell(l);null!=l&&p.geometry.width<l.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,l.width+30)));p.insert(q);p.geometry.height+=30}}0<k.length&&(m=a.editor.graph,f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),m.setSelectionCells(m.importCells(k,
f.x,f.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==b){if(0<e.length){m=a.editor.graph;q=null;k=[];for(b=p=0;b<e.length;b++)";"!=e[b].charAt(0)&&(0==e[b].length?q=null:null==q?(q=new mxCell(e[b],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),q.vertex=!0,k.push(q),l=m.getPreferredSizeForCell(q),null!=l&&q.geometry.width<l.width+10&&(q.geometry.width=
l.width+10),p+=q.geometry.width+40):"--"==e[b]?(l=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),l.vertex=!0,q.geometry.height+=l.geometry.height,q.insert(l)):0<e[b].length&&(t=new mxCell(e[b],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
t.vertex=!0,l=m.getPreferredSizeForCell(t),null!=l&&t.geometry.width<l.width&&(t.geometry.width=l.width),q.geometry.width=Math.max(q.geometry.width,t.geometry.width),q.geometry.height+=t.geometry.height,q.insert(t)));if(0<k.length){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0));m.getModel().beginUpdate();try{k=m.importCells(k,f.x,f.y);l=[];for(b=0;b<k.length;b++)l.push(k[b]),l=l.concat(k[b].children);m.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{m.getModel().endUpdate()}m.setSelectionCells(k);
m.scrollCellToVisible(m.getSelectionCell())}}}else{var q=function(a){var d=H[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,H[a]=d,k.push(d));return d},H={},k=[];for(b=0;b<e.length;b++)if(";"!=e[b].charAt(0)){var K=e[b].split("->");2<=K.length&&(u=q(K[0]),I=q(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,u.insertEdge(K,!0),I.insertEdge(K,!1),k.push(K))}if(0<k.length){e=document.createElement("div");e.style.visibility="hidden";
m.scrollCellToVisible(m.getSelectionCell())}}}else{var q=function(a){var d=I[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,I[a]=d,k.push(d));return d},I={},k=[];for(b=0;b<e.length;b++)if(";"!=e[b].charAt(0)){var K=e[b].split("->");2<=K.length&&(u=q(K[0]),H=q(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,u.insertEdge(K,!0),H.insertEdge(K,!1),k.push(K))}if(0<k.length){e=document.createElement("div");e.style.visibility="hidden";
document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{k=m.importCells(k);for(b=0;b<k.length;b++)m.getModel().isVertex(k[b])&&(l=m.getPreferredSizeForCell(k[b]),k[b].geometry.width=Math.max(k[b].geometry.width,l.width),k[b].geometry.height=Math.max(k[b].geometry.height,l.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
l=[];a.editor.graph.getModel().beginUpdate();try{k=m.getModel().getChildren(m.getDefaultParent()),f=mxEvent.isAltDown(c)?f:a.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),l=a.editor.graph.importCells(k,f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function k(){return"list"==
d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==d.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":
@ -9165,34 +9155,34 @@ null!=c&&"fromText"!=c||g.setAttribute("selected","selected");g=document.createE
mxUtils.write(g,mxResources.get("diagram"));"plantUml"!=c&&d.appendChild(g);g=document.createElement("option");g.setAttribute("value","plantUmlSvg");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&g.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var n=document.createElement("option");n.setAttribute("value",
"plantUmlTxt");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(d.appendChild(g),d.appendChild(m),d.appendChild(n));var p=k();l.value=p;e.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
a.dataTransfer.files[0];var d=new FileReader;d.onload=function(a){l.value=a.target.result};d.readAsText(a)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var a=k();if(0==l.value.length||l.value==p)p=a,l.value=p});a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),
function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});g.className="geBtn";a.editor.cancelFirst&&e.appendChild(g);m=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(l.value,d.value,c)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(){var a=!0;if(null!=N)for(;H<N.length&&(a||0!=mxUtils.mod(H,30));){var d=
N[H++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(ba)c||a.hideDialog(),u(ba,T,I.value);else if(b)c||a.hideDialog(),b(U,I.value);else{var d=I.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,U,null!=Y&&0<Y.length?Y:null,null,function(){a.hideDialog()},null,b,null,null!=V&&0<V.length?V:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,
b,c,e,m,f){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");G.removeAttribute("disabled");U=b;Y=c;V=f;Z=a;ba=e;T=m;Z.style.backgroundColor=d;Z.style.border=g}function B(d,b,c,e,g,m,f,n,p,k,l){var t=document.createElement("div");t.className="geTemplate";t.style.height=M+"px";t.style.width=ga+"px";"dark"==uiTheme&&(t.style.filter="invert(100%)");null!=c?t.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&t.setAttribute("title",e);if(null!=m)t.style.backgroundImage=
"url("+m+")",t.style.backgroundSize="contain",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(a){z(t,null,null,d,f,l)}),mxEvent.addListener(t,"dblclick",function(a){A()});else if(!k&&null!=d&&0<d.length){e=p||TEMPLATE_PATH+"/"+d.substring(0,d.length-4)+".png";t.style.backgroundImage="url("+e+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";null!=c&&(t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+
("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var H=!1;mxEvent.addListener(t,"click",function(c){G.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border=
"1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(t,a.getText(),b,null,null,l),H&&A())}))});mxEvent.addListener(t,"dblclick",function(a){H=!0})}else t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&z(t),null!=n?mxEvent.addListener(t,"click",n):(mxEvent.addListener(t,"click",function(a){z(t,null,null,d,f)}),mxEvent.addListener(t,"dblclick",function(a){A()}));P.appendChild(t);return t}function C(){sa&&(sa=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});g.className="geBtn";a.editor.cancelFirst&&e.appendChild(g);m=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(l.value,d.value,c)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(){var a=!0;if(null!=N)for(;I<N.length&&(a||0!=mxUtils.mod(I,30));){var d=
N[I++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(ba)c||a.hideDialog(),u(ba,T,H.value);else if(b)c||a.hideDialog(),b(U,H.value);else{var d=H.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,U,null!=Y&&0<Y.length?Y:null,null,function(){a.hideDialog()},null,b,null,null!=V&&0<V.length?V:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,
b,c,e,m,f){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");G.removeAttribute("disabled");U=b;Y=c;V=f;Z=a;ba=e;T=m;Z.style.backgroundColor=d;Z.style.border=g}function B(d,b,c,e,g,m,f,n,p,k,t){var l=document.createElement("div");l.className="geTemplate";l.style.height=M+"px";l.style.width=ga+"px";"dark"==uiTheme&&(l.style.filter="invert(100%)");null!=c?l.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&l.setAttribute("title",e);if(null!=m)l.style.backgroundImage=
"url("+m+")",l.style.backgroundSize="contain",l.style.backgroundPosition="center center",l.style.backgroundRepeat="no-repeat",mxEvent.addListener(l,"click",function(a){z(l,null,null,d,f,t)}),mxEvent.addListener(l,"dblclick",function(a){A()});else if(!k&&null!=d&&0<d.length){e=p||TEMPLATE_PATH+"/"+d.substring(0,d.length-4)+".png";l.style.backgroundImage="url("+e+")";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";null!=c&&(l.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+
("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var I=!1;mxEvent.addListener(l,"click",function(c){G.setAttribute("disabled","disabled");l.style.backgroundColor="transparent";l.style.border=
"1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(l,a.getText(),b,null,null,t),I&&A())}))});mxEvent.addListener(l,"dblclick",function(a){I=!0})}else l.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&z(l),null!=n?mxEvent.addListener(l,"click",n):(mxEvent.addListener(l,"click",function(a){z(l,null,null,d,f)}),mxEvent.addListener(l,"dblclick",function(a){A()}));P.appendChild(l);return l}function C(){sa&&(sa=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
mxUtils.write(d,mxResources.get("custom"));Q.appendChild(d);for(var b in X){var c=document.createElement("div"),d=b,e=X[b];18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",d+" ("+e.length+")");mxUtils.write(c,c.getAttribute("title"));null!=m&&(c.style.padding=m);Q.appendChild(c);(function(d,b){mxEvent.addListener(c,"click",function(){a!=
b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",H=0,N=X[d],O=null,y())})})(b,c)}d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,"draw.io");Q.appendChild(d)}for(b in R)c=document.createElement("div"),d=mxResources.get(b),e=R[b],null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1)),18<d.length&&(d=d.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=m&&(c.style.padding=m),Q.appendChild(c),null==a&&0<e.length&&(a=c,a.style.backgroundColor=l,N=e),function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",H=0,N=R[d],O=null,y())})}(b,c);y()}c=null!=c?c:!0;k=null!=k?k:!1;l=null!=l?l:"#ebf2f9";d=null!=d?d:"dark"==uiTheme?"#a2a2a2":"#e6eff8";g=null!=g?g:"dark"==uiTheme?"1px dashed #00a8ff":
b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",I=0,N=X[d],O=null,y())})})(b,c)}d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,"draw.io");Q.appendChild(d)}for(b in R)c=document.createElement("div"),d=mxResources.get(b),e=R[b],null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1)),18<d.length&&(d=d.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=m&&(c.style.padding=m),Q.appendChild(c),null==a&&0<e.length&&(a=c,a.style.backgroundColor=l,N=e),function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",I=0,N=R[d],O=null,y())})}(b,c);y()}c=null!=c?c:!0;k=null!=k?k:!1;l=null!=l?l:"#ebf2f9";d=null!=d?d:"dark"==uiTheme?"#a2a2a2":"#e6eff8";g=null!=g?g:"dark"==uiTheme?"1px dashed #00a8ff":
"1px solid #ccd9ea";n=null!=n?n:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";c&&D.appendChild(E);var F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.width="40px";F.style.height="40px";F.style.marginRight="10px";F.style.paddingBottom="4px";F.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?
IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&c&&E.appendChild(F);c&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+
":");F=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?F=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?F=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?F=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?F=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?F=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(F=a.trello.extension);var I=document.createElement("input");I.setAttribute("value",a.defaultFilename+F);I.style.marginLeft="10px";
I.style.width=e?"144px":"244px";this.init=function(){c&&(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?I.select():document.execCommand("selectAll",!1,null))};c&&(E.appendChild(I),null!=a.editor.diagramFileTypes&&(F=FilenameDialog.createFileTypes(a,I,a.editor.diagramFileTypes),F.style.marginLeft="6px",F.style.width=e?"80px":"180px",E.appendChild(F)),null!=a.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(a,I,a.editor.fileExtensions),F.style.marginTop=
"12px",E.appendChild(F)));var E=!1,H=0,K=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(v||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");A();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(p||t){var L=[],O=null,J=null,S=null,W=function(a){G.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":"geBtn"},
E=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";W(0);P.scrollTop=0;P.innerHTML="";H=0;O!=N&&(N=O,R=J,da=S,Q.innerHTML="",C(),O=null)});L.push(F);v.appendChild(F);var aa=function(a){Q.style.display="none";P.style.left="30px";W(a?-1:1);null==O&&(O=N);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){H=0;K.stop();N=a;b=b||
":");F=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?F=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?F=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?F=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?F=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?F=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(F=a.trello.extension);var H=document.createElement("input");H.setAttribute("value",a.defaultFilename+F);H.style.marginLeft="10px";
H.style.width=e?"144px":"244px";this.init=function(){c&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};c&&(E.appendChild(H),null!=a.editor.diagramFileTypes&&(F=FilenameDialog.createFileTypes(a,H,a.editor.diagramFileTypes),F.style.marginLeft="6px",F.style.width=e?"80px":"180px",E.appendChild(F)),null!=a.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(a,H,a.editor.fileExtensions),F.style.marginTop=
"12px",E.appendChild(F)));var E=!1,I=0,K=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(v||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");A();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(p||t){var L=[],O=null,J=null,S=null,W=function(a){G.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":"geBtn"},
E=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";W(0);P.scrollTop=0;P.innerHTML="";I=0;O!=N&&(N=O,R=J,da=S,Q.innerHTML="",C(),O=null)});L.push(F);v.appendChild(F);var aa=function(a){Q.style.display="none";P.style.left="30px";W(a?-1:1);null==O&&(O=N);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){I=0;K.stop();N=a;b=b||
{};var c=0,e;for(e in b)c+=b[e].length;if(d)P.innerHTML=d;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){Q.style.display="";P.style.left="160px";Q.innerHTML="";da=0;R={"draw.io":a};for(e in b)R[e]=b[e];C()}else y()};a?t(ca.value,d):p(d)};p&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){aa()}),v.appendChild(F),L.push(F));if(t){F=document.createElement("span");F.style.marginLeft="10px";
F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(F);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(a){13==a.keyCode&&aa(!0)});v.appendChild(ca);F=mxUtils.button(mxResources.get("search"),function(){aa(!0)});F.className="geBtn";v.appendChild(F)}W(0)}var Y=null,V=null,U=null,Z=null,ba=null,T=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
P.style.position="absolute";P.style.left="160px";P.style.right="34px";v=(c?72:40)+(E?30:0);P.style.top=v+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var M=140,ga=140,R={},X={},da=0,sa=!0;R.basic=[{title:"blankDiagram",select:!0}];var N=R.basic;if(!e){var ha=function(){mxUtils.get(ea,
function(a){if(!fa){fa=!0;a=a.getXml().documentElement.firstChild;for(var d={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var b=a.getAttribute("name"),c=a.getElementsByTagName("add"),e=[],g=0;g<c.length;g++)e.push(encodeURIComponent(mxUtils.getTextContent(c[g])));null!=b&&0<e.length&&(d[b]=e.join(";"))}else b=a.getAttribute("url"),null!=b&&(c=a.getAttribute("section"),null==c&&(c=b.indexOf("/"),c=b.substring(0,c)),b=R[c],null==b&&(b=[],R[c]=b),c=a.getAttribute("clibs"),
null!=d[c]&&(c=d[c]),b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}K.stop();C()}})};D.appendChild(Q);D.appendChild(P);var fa=!1,ea=n;/^https?:\/\//.test(ea)&&!a.editor.isCorsEnabledForUrl(ea)&&(ea=PROXY_URL+"?url="+encodeURIComponent(ea));K.spin(P);null!=x?x(function(a,d){X=a;S=da=d;ha()},ha):ha();J=R}mxEvent.addListener(I,"keypress",function(d){a.dialog.container.firstChild==
null!=d[c]&&(c=d[c]),b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}K.stop();C()}})};D.appendChild(Q);D.appendChild(P);var fa=!1,ea=n;/^https?:\/\//.test(ea)&&!a.editor.isCorsEnabledForUrl(ea)&&(ea=PROXY_URL+"?url="+encodeURIComponent(ea));K.spin(P);null!=x?x(function(a,d){X=a;S=da=d;ha()},ha):ha();J=R}mxEvent.addListener(H,"keypress",function(d){a.dialog.container.firstChild==
D&&13==d.keyCode&&A()});n=document.createElement("div");n.style.marginTop=e?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";e||a.isOffline()||!c||null!=b||k||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",n.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});x.className=
"geBtn";!a.editor.cancelFirst||k&&null==f||n.appendChild(x);e||"1"==urlParams.embed||k||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var d=new FilenameDialog(a,"",mxResources.get("create"),function(d){null!=d&&0<d.length&&(d=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(I.value)+"&create="+encodeURIComponent(d)),null==a.getCurrentFile()?window.location.href=d:window.openWindow(d))},mxResources.get("url"));a.showDialog(d.container,300,80,!0,!0);d.init()}),
"geBtn";!a.editor.cancelFirst||k&&null==f||n.appendChild(x);e||"1"==urlParams.embed||k||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var d=new FilenameDialog(a,"",mxResources.get("create"),function(d){null!=d&&0<d.length&&(d=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(d)),null==a.getCurrentFile()?window.location.href=d:window.openWindow(d))},mxResources.get("url"));a.showDialog(d.container,300,80,!0,!0);d.init()}),
e.className="geBtn",n.appendChild(e));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var d=document.createElement("input");d.setAttribute("multiple","multiple");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(b){a.openFiles(d.files,!0);d.value=""});d.style.display="none";document.body.appendChild(d);a.newDlgFileInputElt=d}a.newDlgFileInputElt.click()}),q.className="geBtn",n.appendChild(q));n.appendChild(G);a.editor.cancelFirst||
null!=b||k&&null==f||n.appendChild(x);D.appendChild(n);this.container=D},CreateDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(d,b,c,g){function m(){mxEvent.addListener(f,"click",function(){var d=c;if(l){var b=B.value,g=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>g){var d=null!=d?d:E.value,m="";d==App.MODE_GOOGLE?m=a.drive.extension:d==App.MODE_GITHUB?m=a.gitHub.extension:d==App.MODE_GITLAB?m=a.gitLab.extension:d==App.MODE_TRELLO?m=a.trello.extension:d==App.MODE_DROPBOX?m=a.dropbox.extension:
d==App.MODE_ONEDRIVE?m=a.oneDrive.extension:d==App.MODE_DEVICE&&(m=".drawio");0<=g&&(b=b.substring(0,g));B.value=b+m}}A(c)})}var f=document.createElement("a");f.style.overflow="hidden";var n=document.createElement("img");n.src=d;n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width="60px";n.style.height="60px";n.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding=
"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(f);var H=window.setTimeout(function(){null==
a[g]&&(t.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(H),mxUtils.setOpacity(k,100),n.style.visibility="",t.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)x&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;x=null!=x?x:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var z=
"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(f);var I=window.setTimeout(function(){null==
a[g]&&(t.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(I),mxUtils.setOpacity(k,100),n.style.visibility="",t.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)x&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;x=null!=x?x:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var z=
document.createElement("h2");mxUtils.write(z,k||mxResources.get("create"));z.style.marginTop="0px";z.style.marginBottom="24px";f.appendChild(z);mxUtils.write(f,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",e);B.style.width="200px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
!1,null)};f.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(a,B,a.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",f.appendChild(k)),f.appendChild(FilenameDialog.createTypeHint(a,B,v)));null==t||null==u||"image/"!=u.substring(0,6)||"image/svg"==u.substring(0,9)&&!mxClient.IS_SVG||(B.style.width="160px",v=document.createElement("img"),t=q?t:btoa(unescape(encodeURIComponent(t))),v.setAttribute("src","data:"+u+";base64,"+t),v.style.position=
"absolute",v.style.top="70px",v.style.right="100px",v.style.maxWidth="120px",v.style.maxHeight="80px",mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)"),f.appendChild(v),g&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(){A("_blank")})));mxUtils.br(f);var C=document.createElement("div");C.style.textAlign="center";var D=0;C.style.marginTop="6px";f.appendChild(C);var E=document.createElement("select");E.style.marginLeft="10px";a.isOfflineApp()||
@ -9243,18 +9233,18 @@ A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style
(d.maxFitScale=8,d.fit(8),d.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=x&&(d.zoomActual(),d.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled",
"disabled");mxUtils.setOpacity(C,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var d=mxUtils.getXml(x.documentElement),b=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml"):(d=
"undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(Graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(d){a.spinner.stop();
a.replaceFileData(y);a.hideDialog()},function(d){a.spinner.stop();a.editor.setStatus("");a.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var I=document.createElement("select");I.setAttribute("disabled","disabled");I.style.maxWidth="80px";I.style.position="relative";I.style.top="-2px";I.style.verticalAlign="bottom";I.style.marginRight="6px";I.style.display="none";var H=null;mxEvent.addListener(I,"change",function(a){null!=
H&&(H(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(I.selectedIndex))});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled",
a.replaceFileData(y);a.hideDialog()},function(d){a.spinner.stop();a.editor.setStatus("");a.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var I=null;mxEvent.addListener(H,"change",function(a){null!=
I&&(I(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(H.selectedIndex))});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled",
"disabled");null!=c&&(G.style.display="none",F.className="geBtn gePrimaryBtn");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.width="640px";k.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var O=null;if(null!=e&&0<e.length){l.style.cursor="move";var J=document.createElement("table");J.style.border=
"1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";var S=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(g=mxUtils.indexOf(a.pages,a.currentPage));for(var aa=e.length-1;0<=aa;aa--){var ca=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var p=function(e){t.stop();var p=mxUtils.parseXml(e),k=a.editor.extractGraphModel(p.documentElement,!0);if(null!=k){var q=function(a){null!=a&&
(a=v(Editor.parseDiagramNode(a)));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return a};I.style.display="none";I.innerHTML="";x=p;y=e;m=parseSelectFunction=null;n=0;if("mxfile"==k.nodeName){p=k.getElementsByTagName("diagram");m=[];for(e=0;e<p.length;e++)m.push(p[e]);n=Math.min(g,m.length-1);0<m.length&&q(m[n]);if(1<m.length)for(I.removeAttribute("disabled"),
I.style.display="",e=0;e<m.length;e++)p=document.createElement("option"),mxUtils.write(p,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),p.setAttribute("value",e),e==n&&p.setAttribute("selected","selected"),I.appendChild(p);H=function(){try{var d=parseInt(I.value);n=g=d;q(m[d])}catch(X){I.value=g,a.handleError(X)}}}else v(k);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");D.innerHTML="";mxUtils.write(D,(null!=e?e+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());
D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),G.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60)}else I.style.display="none",I.innerHTML="",D.innerHTML="",
(a=v(Editor.parseDiagramNode(a)));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return a};H.style.display="none";H.innerHTML="";x=p;y=e;m=parseSelectFunction=null;n=0;if("mxfile"==k.nodeName){p=k.getElementsByTagName("diagram");m=[];for(e=0;e<p.length;e++)m.push(p[e]);n=Math.min(g,m.length-1);0<m.length&&q(m[n]);if(1<m.length)for(H.removeAttribute("disabled"),
H.style.display="",e=0;e<m.length;e++)p=document.createElement("option"),mxUtils.write(p,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),p.setAttribute("value",e),e==n&&p.setAttribute("selected","selected"),H.appendChild(p);I=function(){try{var d=parseInt(H.value);n=g=d;q(m[d])}catch(X){H.value=g,a.handleError(X)}}}else v(k);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");D.innerHTML="";mxUtils.write(D,(null!=e?e+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());
D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),G.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60)}else H.style.display="none",H.innerHTML="",D.innerHTML="",
mxUtils.write(D,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):c.toDateString()===W?mxUtils.write(k,c.toLocaleTimeString()):mxUtils.write(k,c.toLocaleDateString()+" "+c.toLocaleTimeString());f.appendChild(k);f.setAttribute("title",c.toLocaleDateString()+
" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){v!=b&&(t.stop(),null!=q&&(q.style.backgroundColor=""),v=b,q=f,q.style.backgroundColor="#ebf2f9",y=x=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",d.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled",
"disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),t.spin(l),b.getXml(function(a){if(v==b)try{p(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},
function(a){t.stop();I.style.display="none";I.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(e[aa]);null!=ca&&aa==e.length-1&&(O=ca)}J.appendChild(S);f.appendChild(J)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";L.appendChild(I);L.appendChild(A);L.appendChild(z);L.appendChild(C);L.appendChild(B);a.editor.cancelFirst?(k.appendChild(f),k.appendChild(E),
"disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),t.spin(l),b.getXml(function(a){if(v==b)try{p(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},
function(a){t.stop();H.style.display="none";H.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(e[aa]);null!=ca&&aa==e.length-1&&(O=ca)}J.appendChild(S);f.appendChild(J)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";L.appendChild(H);L.appendChild(A);L.appendChild(z);L.appendChild(C);L.appendChild(B);a.editor.cancelFirst?(k.appendChild(f),k.appendChild(E),
k.appendChild(K),k.appendChild(F),k.appendChild(G)):(k.appendChild(E),k.appendChild(K),k.appendChild(F),k.appendChild(G),k.appendChild(f));b.appendChild(k);b.appendChild(L);b.appendChild(D);this.container=b},DraftDialog=function(a,e,c,b,k,f,l,d,g){var m=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,e);m.appendChild(n);var p=document.createElement("select"),t=mxUtils.bind(this,
function(){A=mxUtils.parseXml(g[p.value].data);z=a.editor.extractGraphModel(A.documentElement,!0);B=0;this.init()});if(null!=g){p.style.marginLeft="4px";for(e=0;e<g.length;e++){var u=document.createElement("option");u.setAttribute("value",e);var q=new Date(g[e].created),v=new Date(g[e].modified);mxUtils.write(u,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}n.appendChild(p);mxEvent.addListener(p,
"change",t)}null==c&&(c=g[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.marginTop="10px";x.style.left="40px";x.style.right="40px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);m.appendChild(x);var y=new Graph(x);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var A=
@ -9266,8 +9256,8 @@ v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;bac
return d}mxEvent.addListener(E,"change",function(a){B=parseInt(E.value);d(C[B]);mxEvent.consume(a)});if("mxfile"==z.nodeName){var b=z.getElementsByTagName("diagram");C=[];for(var c=0;c<b.length;c++)C.push(b[c]);0<C.length&&d(C[B]);E.innerHTML="";if(1<C.length)for(E.style.display="",c=0;c<C.length;c++)b=document.createElement("option"),mxUtils.write(b,C[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),b.setAttribute("value",c),c==B&&b.setAttribute("selected","selected"),E.appendChild(b);
else E.style.display="none"}else a(z)};v.appendChild(E);v.appendChild(c);v.appendChild(n);v.appendChild(u);v.appendChild(e);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");a.editor.cancelFirst?(q.appendChild(c),null!=d&&q.appendChild(d),q.appendChild(l),q.appendChild(f)):(q.appendChild(f),q.appendChild(l),null!=d&&q.appendChild(d),q.appendChild(c));m.appendChild(q);
m.appendChild(v);this.container=m},FindWindow=function(a,e,c,b,k){function f(a,d,b){if("object"===typeof d.value&&null!=d.value.attributes){d=d.value.attributes;for(var c=0;c<d.length;c++)if("label"!=d[c].nodeName){var e=mxUtils.trim(d[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&e.substring(0,b.length)===b||null!=a&&a.test(e))return!0}}return!1}function l(d){var b=g.model.getDescendants(g.model.getRoot()),c=u.value.toLowerCase(),e=q.checked?new RegExp(c):null,
k=null;m!=c&&(m=c,n=null,p=!1);var t=null==n;if(0<c.length){if(p){p=!1;for(var z,H=0;H<a.pages.length;H++)if(a.currentPage==a.pages[H]){z=H;break}d=(z+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=z);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(H=0;H<b.length;H++){z=g.view.getState(b[H]);if(null!=z&&null!=z.cell.value&&(t||null==k)&&(g.model.isVertex(z.cell)||
g.model.isEdge(z.cell))&&(g.isHtmlLabel(z.cell)?(y.innerHTML=g.sanitizeHtml(g.getLabel(z.cell)),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(z.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,z.cell,c))||null!=e&&(e.test(label)||f(e,z.cell,c))))if(t){k=z;break}else null==k&&(k=z);t=t||z==n}}if(null!=k){if(H==b.length&&x.checked)return n=null,p=!0,l(!0);n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?
k=null;m!=c&&(m=c,n=null,p=!1);var t=null==n;if(0<c.length){if(p){p=!1;for(var z,I=0;I<a.pages.length;I++)if(a.currentPage==a.pages[I]){z=I;break}d=(z+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=z);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(I=0;I<b.length;I++){z=g.view.getState(b[I]);if(null!=z&&null!=z.cell.value&&(t||null==k)&&(g.model.isVertex(z.cell)||
g.model.isEdge(z.cell))&&(g.isHtmlLabel(z.cell)?(y.innerHTML=g.sanitizeHtml(g.getLabel(z.cell)),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(z.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,z.cell,c))||null!=e&&(e.test(label)||f(e,z.cell,c))))if(t){k=z;break}else null==k&&(k=z);t=t||z==n}}if(null!=k){if(I==b.length&&x.checked)return n=null,p=!0,l(!0);n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?
g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!d&&x.checked)return p=!0,l(!0);g.isEnabled()&&g.clearSelection()}return 0==c.length||null!=k}var d=a.actions.get("find"),g=a.editor.graph,m=null,n=null,p=!1,t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding="10px";t.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom=
"6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";t.appendChild(u);mxUtils.br(t);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";t.appendChild(q);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");t.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));t.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";t.appendChild(v);mxUtils.br(t);var x=document.createElement("input");x.setAttribute("id","geFindWinAllPagesChck");x.setAttribute("type","checkbox");x.style.marginRight="4px";t.appendChild(x);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");t.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));t.appendChild(v);var y=document.createElement("div");mxUtils.br(t);v=mxUtils.button(mxResources.get("reset"),
@ -9318,16 +9308,16 @@ l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m
y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(c.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(y);d.appendChild(g);d.appendChild(m);l.appendChild(d);f.appendChild(l);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;d<e.length;d++){var b=c.getCellGeometry(e[d]);null!=
b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(t.value).length&&(b.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=Number(v.value)),0<mxUtils.trim(x.value).length&&(b.height=Number(x.value))),
c.getModel().setGeometry(e[d],b));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[d]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),f.appendChild(b));k.appendChild(f);this.container=k},LibraryDialog=function(a,
e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var d=null;if(null!=a)for(var b=u.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,t){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var H=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:
e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var d=null;if(null!=a)for(var b=u.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,t){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var I=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:
mxResources.get("untitled"));J.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};u.style.backgroundImage="";q.style.display="none";var G=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}G>K?(K=Math.round(100*K/G),G=100):(G=Math.round(100*G/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";
y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var L=document.createElement("img");L.setAttribute("src",z.convert(b));L.style.width=G+"px";L.style.height=K+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-K)/2)+"px";L.style.paddingLeft=Math.floor((100-G)/2)+"px";y.appendChild(L)}else if(null!=p){var O=a.stringToCells(Graph.decompress(p.xml));0<O.length&&(a.sidebar.createThumb(O,100,100,y,null,!0,!1),y.firstChild.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var D=document.createElement("img");D.setAttribute("src",Editor.closeImage);D.setAttribute("border","0");D.setAttribute("title",mxResources.get("delete"));D.setAttribute("align","top");D.style.paddingTop="4px";D.style.position="absolute";D.style.marginLeft="-12px";D.style.zIndex="1";D.style.cursor="pointer";mxEvent.addListener(D,"dragstart",function(a){mxEvent.consume(a)});(function(a,d,b){mxEvent.addListener(D,"click",function(c){v[d]=
null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(D,"dblclick",function(a){mxEvent.consume(a)})})(y,b,p);y.appendChild(D);y.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom=
"-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:t},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});H();y.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=J.getAttribute("contentEditable")&&
mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,H())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace=
"";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;H()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=p&&(D.style.visibility="hidden",J.style.visibility=
"-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:t},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});I();y.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=J.getAttribute("contentEditable")&&
mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,I())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace=
"";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;I()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=p&&(D.style.visibility="hidden",J.style.visibility=
"hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);x=l(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);D.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==D.style.visibility&&(D.style.visibility="",J.style.visibility="");x=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else B||
(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var I=G.documentElement.getElementsByTagName("diagram"),F=0;F<I.length;F++){var K=mxUtils.getTextContent(I[F]),
(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var H=G.documentElement.getElementsByTagName("diagram"),F=0;F<H.length;F++){var K=mxUtils.getTextContent(H[F]),
O=a.stringToCells(Graph.decompress(K)),M=a.editor.graph.getBoundingBoxFromGeometry(O);d(null,null,0,0,0,0,{xml:K,w:M.width,h:M.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=x)null!=y&&y<u.children.length?(n.splice(y>x?y-1:y,0,n.splice(x,1)[0]),
u.insertBefore(u.children[x],u.children[y])):(n.push(n.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,0,a.width,a.height);u.scrollTop=
u.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==k||k.isRenamable()||t.setAttribute("disabled",
@ -9356,19 +9346,19 @@ mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagra
var a=window.innerWidth,c=window.innerHeight,b=987,k=712;.9*a<b&&(b=Math.max(.9*a,600),e.style.width=b+"px");.9*c<k&&(k=Math.max(.9*c,300),e.style.height=k+"px");this.width=b;this.height=k;this.container=e};
TemplatesDialog.prototype.init=function(a,e,c,b,k,f,l,d,g,m){function n(){null!=F&&(F.style.fontWeight="normal",F.style.textDecoration="none",F=null)}function p(a,d,b,c,e,g,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+d).src="/images/"+b+"-sel.svg";C.querySelector("."+e).src="/images/"+
g+".svg";return!0}function t(a){function d(a){Y.removeChild(c);C.removeChild(b);Y.scrollTop=g}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var e=document.createElement("img");e.src=a;c.appendChild(e);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var g=Y.scrollTop;mxEvent.addListener(a,"click",d);mxEvent.addListener(b,"click",d);Y.appendChild(c);Y.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,d,b){if(null!=I){for(var c=I.className.split(" "),e=0;e<c.length;e++)if(-1<c[e].indexOf("Active")){c.splice(e,1);break}I.className=c.join(" ")}null!=a?(I=a,I.className+=" "+d,H=b,ba.className="geTempDlgCreateBtn"):(H=I=null,ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
function q(d){if(null!=H){var b=H;H=null;ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var g=Y.scrollTop;mxEvent.addListener(a,"click",d);mxEvent.addListener(b,"click",d);Y.appendChild(c);Y.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,d,b){if(null!=H){for(var c=H.className.split(" "),e=0;e<c.length;e++)if(-1<c[e].indexOf("Active")){c.splice(e,1);break}H.className=c.join(" ")}null!=a?(H=a,H.className+=" "+d,I=b,ba.className="geTempDlgCreateBtn"):(I=H=null,ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
function q(d){if(null!=I){var b=I;I=null;ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
a}function x(a,d,b){function c(){ba.innerHTML=d?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!d)}W.innerHTML="";u();O=a;var e=null;if(b){e=document.createElement("table");e.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));g.appendChild(m);e.appendChild(g);W.appendChild(e)}for(g=0;g<a.length;g++){a[g].isExternal=!d;var f=a[g].url,m=mxUtils.htmlEntities(a[g].title),n=a[g].tooltip||a[g].title,p=a[g].imgUrl,k=mxUtils.htmlEntities(a[g].changedBy||""),l=mxUtils.htmlEntities(a[g].lastModifiedOn||
"");p||(p=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var H=document.createElement("tr"),p=document.createElement("td"),z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramListPreviewBtn";z.setAttribute("title",mxResources.get("preview"));p.appendChild(z);n=document.createElement("span");n.className="geTempDlgDiagramTitle";n.innerHTML=m;p.appendChild(n);H.appendChild(p);p=document.createElement("td");
p.innerHTML=k;H.appendChild(p);p=document.createElement("td");p.innerHTML=l;H.appendChild(p);e.appendChild(H);null==I&&(c(),u(H,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(H,"click",function(){I!=d&&(c(),u(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(H,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],H)}else{var B=document.createElement("div");B.className="geTempDlgDiagramTile";B.setAttribute("title",n);null==I&&(c(),u(B,"geTempDlgDiagramTileActive",
a[g]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var G=document.createElement("img");G.style.display="none";(function(a,d){G.onload=function(){d.className="geTempDlgDiagramTileImg";a.style.display=""};G.onerror=function(){d.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(G,k);G.src=p;k.appendChild(G);B.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=m?m:"";B.appendChild(k);
z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramPreviewBtn";z.setAttribute("title",mxResources.get("preview"));B.appendChild(z);(function(a,d){mxEvent.addListener(B,"click",function(){I!=d&&(c(),u(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],B);W.appendChild(B)}}}function y(a,d){Z.innerHTML="";u();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==I&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);Z.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){I!=d&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}S.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
"");p||(p=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var I=document.createElement("tr"),p=document.createElement("td"),z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramListPreviewBtn";z.setAttribute("title",mxResources.get("preview"));p.appendChild(z);n=document.createElement("span");n.className="geTempDlgDiagramTitle";n.innerHTML=m;p.appendChild(n);I.appendChild(p);p=document.createElement("td");
p.innerHTML=k;I.appendChild(p);p=document.createElement("td");p.innerHTML=l;I.appendChild(p);e.appendChild(I);null==H&&(c(),u(I,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(I,"click",function(){H!=d&&(c(),u(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(I,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],I)}else{var G=document.createElement("div");G.className="geTempDlgDiagramTile";G.setAttribute("title",n);null==H&&(c(),u(G,"geTempDlgDiagramTileActive",
a[g]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var B=document.createElement("img");B.style.display="none";(function(a,d){B.onload=function(){d.className="geTempDlgDiagramTileImg";a.style.display=""};B.onerror=function(){d.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(B,k);B.src=p;k.appendChild(B);G.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=m?m:"";G.appendChild(k);
z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramPreviewBtn";z.setAttribute("title",mxResources.get("preview"));G.appendChild(z);(function(a,d){mxEvent.addListener(G,"click",function(){H!=d&&(c(),u(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(G,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],G);W.appendChild(G)}}}function y(a,d){Z.innerHTML="";u();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==H&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);Z.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){H!=d&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}S.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
b;for(b in a){var c=document.createElement("div"),e=mxResources.get(b),g=a[b];null==e&&(e=b.substring(0,1).toUpperCase()+b.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",e+" ("+g.length+")");e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");c.innerHTML=e+" ("+g.length+")";d.appendChild(c);(function(d,b,e){mxEvent.addListener(c,"click",function(){F!=e&&(null!=F?(F.style.fontWeight="normal",F.style.textDecoration="none"):(U.style.display="none",V.style.minHeight=
"100%"),F=e,F.style.fontWeight="bold",F.style.textDecoration="underline",Y.scrollTop=0,D&&(E=!0),aa.innerHTML=b,ca.style.display="none",x(a[d],!0))})})(b,e,c)}}function z(a){l&&(Y.scrollTop=0,W.innerHTML="",T.spin(W),E=!1,D=!0,aa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),J=null,l(X,a?null:f))}function B(a){n();Y.scrollTop=0;W.innerHTML="";T.spin(W);E=!1;D=!0;da=null;aa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+
' "'+mxUtils.htmlEntities(a)+'"';d(a,X,G?null:f);J=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,E=!1,F=null,I=null,H=null,K=!1,G=!0,L=!1,O=[],J,S=C.querySelector(".geTempDlgShowAllBtn"),W=C.querySelector(".geTempDlgDiagramsTiles"),aa=C.querySelector(".geTempDlgDiagramsListTitle"),ca=C.querySelector(".geTempDlgDiagramsListBtns"),Y=C.querySelector(".geTempDlgContent"),V=C.querySelector(".geTempDlgDiagramsList"),U=C.querySelector(".geTempDlgNewDiagramCat"),
' "'+mxUtils.htmlEntities(a)+'"';d(a,X,G?null:f);J=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,E=!1,F=null,H=null,I=null,K=!1,G=!0,L=!1,O=[],J,S=C.querySelector(".geTempDlgShowAllBtn"),W=C.querySelector(".geTempDlgDiagramsTiles"),aa=C.querySelector(".geTempDlgDiagramsListTitle"),ca=C.querySelector(".geTempDlgDiagramsListBtns"),Y=C.querySelector(".geTempDlgContent"),V=C.querySelector(".geTempDlgDiagramsList"),U=C.querySelector(".geTempDlgNewDiagramCat"),
Z=C.querySelector(".geTempDlgNewDiagramCatList"),ba=C.querySelector(".geTempDlgCreateBtn"),T=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(C.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){n();U.style.display="";V.style.minHeight="calc(100% - 280px)";z(G)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(G=!0,null==J?z(G):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(G=!1,null==J?z(G):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
"tiles",!1)&&(L=!0,x(O,!1,L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){p(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(L=!1,x(O,!1,L))});mxEvent.addListener(S,"click",function(){K?(U.style.height="280px",Z.style.height="190px",S.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(ga)):(U.style.height="440px",Z.style.height="355px",S.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
@ -9506,7 +9496,7 @@ function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(th
Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,d);b.appendChild(c)}};
Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,d,b,c,e,g,m,f,n,p,k,l,t,z,u,q){try{g=null!=g?g:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;t=null!=t?t:0;var v=n?null:l.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==n&&(v=q?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(l.getSvg(null,null,t,z,null,m,null,null,null,p,null,q),mxUtils.bind(this,function(b){try{var c=new Image;
c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){z.drawImage(c,0,0);a(n)},0):(z.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(b.getAttribute("width")),k=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=d&&(f=g?Math.min(1,Math.min(3*d/(4*k),d/p)):d/p);p=Math.ceil(f*p);k=Math.ceil(f*k);n.setAttribute("width",p);n.setAttribute("height",k);var z=n.getContext("2d");null!=v&&(z.beginPath(),z.rect(0,0,p,k),z.fillStyle=v,
z.fill());z.scale(f,f);if(u){var q=l.view,B=q.scale;q.scale=1;var x=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var x="data:image/svg+xml;base64,"+x,H=l.gridSize*q.gridSteps*f,C=l.getGraphBounds(),G=q.translate.x*B,y=q.translate.y*B,D=G+(C.x-G)/B-t,K=y+(C.y-y)/B-t,A=new Image;A.onload=function(){try{for(var a=-Math.round(H-mxUtils.mod((G-D)*f,H)),d=-Math.round(H-mxUtils.mod((y-K)*f,H));a<p;a+=H)for(var b=d;b<k;b+=H)z.drawImage(A,a/f,b/f);m()}catch(na){null!=e&&e(na)}};
z.fill());z.scale(f,f);if(u){var q=l.view,B=q.scale;q.scale=1;var x=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var x="data:image/svg+xml;base64,"+x,C=l.gridSize*q.gridSteps*f,I=l.getGraphBounds(),G=q.translate.x*B,y=q.translate.y*B,D=G+(I.x-G)/B-t,K=y+(I.y-y)/B-t,A=new Image;A.onload=function(){try{for(var a=-Math.round(C-mxUtils.mod((G-D)*f,C)),d=-Math.round(C-mxUtils.mod((y-K)*f,C));a<p;a+=C)for(var b=d;b<k;b+=C)z.drawImage(A,a/f,b/f);m()}catch(na){null!=e&&e(na)}};
A.onerror=function(a){null!=e&&e(a)};A.src=x}else m()}catch(ka){null!=e&&e(ka)}});c.onerror=function(a){null!=e&&e(a)};p&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=e&&e(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(m)}catch(X){null!=e&&e(X)}}))}catch(R){null!=
e&&e(R)}}),b,k)}catch(Q){null!=e&&e(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var f=k,l=0;8>l;l++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[k]=f;Editor.updateCRC=function(a,d,b,c){for(var e=0;e<c;e++)a=Editor.crcTable[(a^d.charCodeAt(b+e))&255]^a>>>8;return a};Editor.crc32=function(a){for(var d=-1,b=0;b<a.length;b++)d=d>>>8^Editor.crcTable[(d^a.charCodeAt(b))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(a,d,b,c,e){function g(a,d){var b=n;n+=d;return a.substring(b,n)}
function m(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,n);do{var p=m(a);if("IDAT"==g(a,4)){e=a.substring(0,n-8);"pHYs"==d&&"dpi"==
@ -9555,8 +9545,8 @@ q,t)):"staticArr"==u?v.appendChild(f(d,b,p.subType,p.subDefVal,p.size,q,t)):(v.i
"gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&g()});m.focus();mxEvent.addListener(m,"blur",function(){g()})})));p.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",p,p.index);mxEvent.consume(a)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",
v.appendChild(t));q.appendChild(v);return q}var k=this,l=this.editorUi.editor.graph,t=[];a.style.position="relative";a.style.padding="0";var z=document.createElement("table");z.className="geProperties";z.style.whiteSpace="nowrap";z.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var q=document.createElement("th");q.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;q.appendChild(v);mxUtils.write(q,mxResources.get("property"));
u.style.cursor="pointer";var B=function(){var d=z.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var e=a.childNodes[c],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(e)}catch(ma){}}else v.src=Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(u,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;
B()});u.appendChild(q);q=document.createElement("th");q.className="gePropHeaderCell";q.innerHTML=mxResources.get("value");u.appendChild(q);z.appendChild(u);var x=!1,C=!1,y;for(y in d)if(u=d[y],"function"!=typeof u.isVisible||u.isVisible(b,this)){var H=null!=b.style[y]?mxUtils.htmlEntities(b.style[y]+""):null!=u.getDefaultValue?u.getDefaultValue(b,this):u.defVal;if("separator"==u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(b.style[u.sizeProperty]||d[u.sizeProperty].defVal)||0;else if(null!=
u.dependentProps){for(var G=u.dependentProps,D=[],A=[],q=0;q<G.length;q++){var K=b.style[G[q]];A.push(d[G[q]].subDefVal);D.push(null!=K?K.split(","):[])}u.dependentPropsDefVal=A;u.dependentPropsVals=D}z.appendChild(p(y,H,u,x,C));x=!x}}for(q=0;q<t.length;q++)for(u=t[q],d=u.parentRow,b=0;b<u.values.length;b++)y=p(u.name,u.values[b],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,index:b,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==b%2,u.flipBkg),d.parentNode.insertBefore(y,
B()});u.appendChild(q);q=document.createElement("th");q.className="gePropHeaderCell";q.innerHTML=mxResources.get("value");u.appendChild(q);z.appendChild(u);var x=!1,C=!1,y;for(y in d)if(u=d[y],"function"!=typeof u.isVisible||u.isVisible(b,this)){var G=null!=b.style[y]?mxUtils.htmlEntities(b.style[y]+""):null!=u.getDefaultValue?u.getDefaultValue(b,this):u.defVal;if("separator"==u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(b.style[u.sizeProperty]||d[u.sizeProperty].defVal)||0;else if(null!=
u.dependentProps){for(var I=u.dependentProps,D=[],A=[],q=0;q<I.length;q++){var K=b.style[I[q]];A.push(d[I[q]].subDefVal);D.push(null!=K?K.split(","):[])}u.dependentPropsDefVal=A;u.dependentPropsVals=D}z.appendChild(p(y,G,u,x,C));x=!x}}for(q=0;q<t.length;q++)for(u=t[q],d=u.parentRow,b=0;b<u.values.length;b++)y=p(u.name,u.values[b],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,index:b,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==b%2,u.flipBkg),d.parentNode.insertBefore(y,
d.nextSibling),d=y;a.appendChild(z);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,c=b.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);
var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";for(var f=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){k(a)}))})(n);f.push(p);m.appendChild(p)}var k=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(f[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;l(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background=
@ -9609,11 +9599,11 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var D=mxMarker.createMarker;mxMarker.createMarker=
function(a,d,b,c,e,g,m,f,n,p){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(f,Math.max(parseInt(z.value),parseInt(t.value))));t.value=Math.max(1,Math.min(f,Math.min(parseInt(z.value),parseInt(t.value))))}function c(d){function b(d,b,g){var m=d.useCssTransforms,f=d.currentTranslate,n=d.currentScale,p=d.view.translate,k=
d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),t=0,u=0,z=qa.get(),q=1/d.pageScale,x=B.checked;if(x)var q=parseInt(K.value),C=parseInt(la.value),q=Math.min(z.height*C/(l.height/d.view.scale),z.width*q/(l.width/d.view.scale));else q=parseInt(v.value)/(100*d.pageScale),isNaN(q)&&(c=1/d.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*
c);z.height=Math.ceil(z.height*c);q*=c;!x&&d.pageVisible?(l=d.getPageLayout(),t-=l.x*z.width,u-=l.y*z.height):x=!0;if(null==b){b=PrintDialog.createPrintPreview(d,q,z,0,t,u,x);b.pageSelector=!1;b.mathEnabled=!1;t=a.getCurrentFile();null!=t&&(b.title=t.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),t=0,z=0,u=qa.get(),q=1/d.pageScale,x=B.checked;if(x)var q=parseInt(K.value),C=parseInt(la.value),q=Math.min(u.height*C/(l.height/d.view.scale),u.width*q/(l.width/d.view.scale));else q=parseInt(v.value)/(100*d.pageScale),isNaN(q)&&(c=1/d.pageScale,v.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*
c);u.height=Math.ceil(u.height*c);q*=c;!x&&d.pageVisible?(l=d.getPageLayout(),t-=l.x*u.width,z-=l.y*u.height):x=!0;if(null==b){b=PrintDialog.createPrintPreview(d,q,u,0,t,z,x);b.pageSelector=!1;b.mathEnabled=!1;t=a.getCurrentFile();null!=t&&(b.title=t.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var e=d.extFonts[c].name,g=d.extFonts[c].url;0==g.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+g+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+e+'";\n\tsrc: url("'+g+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var D=
b.renderPage;b.renderPage=function(d,b,c,e,g,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}t=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=t&&(e.stylesheet=t,e.refresh())}else{z=
d.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=x;b.appendGraph(d,q,t,u,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=0;g<d.extFonts.length;g++)t=d.extFonts[g].name,u=d.extFonts[g].url,0==u.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+u+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+t+'";\n\tsrc: url("'+u+'");\n}'),
b.renderPage;b.renderPage=function(d,b,c,e,g,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}t=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=t&&(e.stylesheet=t,e.refresh())}else{u=
d.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";b.backgroundColor=u;b.autoOrigin=x;b.appendGraph(d,q,t,z,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=0;g<d.extFonts.length;g++)t=d.extFonts[g].name,z=d.extFonts[g].url,0==z.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+t+'";\n\tsrc: url("'+z+'");\n}'),
b.wnd.document.writeln("</style>"))}m&&(d.useCssTransforms=m,d.currentTranslate=f,d.currentScale=n,d.view.translate=p,d.view.scale=k);return b}var c=parseInt(ia.value)/100;isNaN(c)&&(c=1,ia.value="100 %");var c=.75*c,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=t.value,f=z.value,p=!k.checked,l=null;p&&(p=m==n&&f==n);if(!p&&null!=a.pages&&a.pages.length){var u=0,p=a.pages.length-1;k.checked||(u=parseInt(m)-1,p=parseInt(f)-
1);for(var q=u;q<=p;q++){var x=a.pages[q],m=x==a.currentPage?e:null;if(null==m){var m=a.createTemporaryGraph(e.stylesheet),f=!0,u=!1,C=null,y=null;null==x.viewState&&null==x.root&&a.updatePageRoot(x);null!=x.viewState&&(f=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,y=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);m.background=C;m.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;m.pageVisible=f;m.mathEnabled=u;var D=m.getGlobalVariable;m.getGlobalVariable=
function(d){return"page"==d?x.getName():"pagenumber"==d?q+1:"pagecount"==d?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(x);m.model.setRoot(x.root)}l=b(m,l,q!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else l=b(e);null==l?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(l.mathEnabled&&(p=l.wnd.document,d&&(l.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
@ -9622,17 +9612,17 @@ l.closeDocument(),!l.mathEnabled&&d&&PrintDialog.printPreview(l));null!=g&&(e.st
t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";p.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var z=t.cloneNode(!0);p.appendChild(z);mxEvent.addListener(t,"focus",function(){l.checked=!0});mxEvent.addListener(z,"focus",function(){l.checked=!0});mxEvent.addListener(t,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(f=a.pages.length,
null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){n=m+1;t.value=n;z.value=n;break}t.setAttribute("max",f);z.setAttribute("max",f);a.isPagesEnabled()?1<f&&(g.appendChild(p),l.checked=!0):l.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type","radio");q.setAttribute("name","printZoom");u.appendChild(q);m=document.createElement("span");
mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";u.appendChild(v);mxEvent.addListener(v,"focus",function(){q.checked=!0});g.appendChild(u);var p=p.cloneNode(!1),B=q.cloneNode(!0);B.setAttribute("value","fit");q.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
m.appendChild(B);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),y=C.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),H=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),I=D.cloneNode(!0);D.style.textAlign="right";E.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";A.appendChild(K);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));H.appendChild(m);mxUtils.write(E,mxResources.get("fitToBy"));var la=K.cloneNode(!0);F.appendChild(la);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(la,"focus",function(){B.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));I.appendChild(m);C.appendChild(D);
C.appendChild(A);C.appendChild(H);y.appendChild(E);y.appendChild(F);y.appendChild(I);x.appendChild(C);x.appendChild(y);u.appendChild(x);p.appendChild(u);g.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
m.appendChild(B);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),y=C.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),I=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),H=D.cloneNode(!0);D.style.textAlign="right";E.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";A.appendChild(K);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));I.appendChild(m);mxUtils.write(E,mxResources.get("fitToBy"));var la=K.cloneNode(!0);F.appendChild(la);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(la,"focus",function(){B.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));H.appendChild(m);C.appendChild(D);
C.appendChild(A);C.appendChild(I);y.appendChild(E);y.appendChild(F);y.appendChild(H);x.appendChild(C);x.appendChild(y);u.appendChild(x);p.appendChild(u);g.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var ia=document.createElement("input");ia.style.cssText="margin:0 8px 0 8px;";ia.setAttribute("value","100 %");ia.style.width="60px";p.appendChild(ia);g.appendChild(p);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);a.isOffline()||
(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),u.className="geBtn",m.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});u.className="geBtn gePrimaryBtn";m.appendChild(u);a.editor.cancelFirst||m.appendChild(p);
g.appendChild(m);this.container=g};var E=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)):(E.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"),
I=new Image;I.onload=function(){try{F.getContext("2d").drawImage(I,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};I.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(H){}})();
(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.4.5";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.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
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.4.6";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.lightboxHost=window.DRAWIO_LIGHTBOX_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},
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"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"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}try{l||
null==window.console||console.error(k,a,b,c,e,f)}catch(v){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
@ -9678,16 +9668,16 @@ null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages
this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(a,b,c,e,f,k,l,q,v,x,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!f),
g=d+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,f,null,null,null,b);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=d+".png":"jpeg"==a&&(g=d+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;
null!=k&&(this.editor.graph.pageVisible=k);var g=this.createDownloadRequest(d,a,e,b,l,f,q,v,x,y);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var n=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var t=this.editor.graph.background;if(l||t==mxConstants.NONE)t=
null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=
null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=
function(a,b,c,e,f,k,l,q,v,x){var d=this.editor.graph,g=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==k?!1:"xmlpng"!=b);var m="",n="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==k&&(n="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=d.background;"png"!=b&&"pdf"!=b||!f?f||
null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;f={globalVars:d.getExportVariables()};v&&(f.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+m+n+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=l?"&scale="+l:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,
b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,e=mxUtils.bind(this,function(c){var e=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<e.length&&(e+="\n"),e+=c);c=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(e,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var g=null!=a.interval?parseInt(a.interval):6E4,m=null,f=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
n=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(f,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();f()}));n();f()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var g=a.url;/^https?:\/\//.test(g)&&!this.editor.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));this.editor.loadUrl(g,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=
new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,f=e.getModel();f.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=f.getCell(a.getAttribute("id"));if(null!=l){try{var v=a.getAttribute("value");if(null!=v){var x=
mxUtils.parseXml(v).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(l,x);else for(var y=x.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+l.id+": "+H)}try{var z=a.getAttribute("style");null!=z&&e.model.setStyle(l,z)}catch(H){null!=window.console&&console.log("Error in style for "+l.id+": "+H)}try{var B=a.getAttribute("icon");if(null!=B){var C=
0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,d(C))}}catch(H){null!=window.console&&console.log("Error in icon for "+l.id+": "+H)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),E=e.getCellGeometry(l);if(null!=E){E=E.clone();for(key in D){var F=parseFloat(D[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(D[key])}e.model.setGeometry(l,E)}}}catch(H){null!=window.console&&
console.log("Error in icon for "+l.id+": "+H)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
mxUtils.parseXml(v).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(l,x);else for(var y=x.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+l.id+": "+I)}try{var z=a.getAttribute("style");null!=z&&e.model.setStyle(l,z)}catch(I){null!=window.console&&console.log("Error in style for "+l.id+": "+I)}try{var B=a.getAttribute("icon");if(null!=B){var C=
0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,d(C))}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),E=e.getCellGeometry(l);if(null!=E){E=E.clone();for(key in D){var F=parseFloat(D[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(D[key])}e.model.setGeometry(l,E)}}}catch(I){null!=window.console&&
console.log("Error in icon for "+l.id+": "+I)}}}else if("model"==a.nodeName){for(var H=a.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(a.firstChild)).decode(H,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",e=d.lastIndexOf(".");0<=e&&(c=d.substring(e),d=d.substring(0,e));if(b)var g=new Date,e=g.getFullYear(),f=g.getMonth()+1,k=g.getDate(),l=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+f+"-"+k+"-"+l+"-"+x+"-"+g));
return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
@ -9702,27 +9692,27 @@ function(a,b,c,e,f,k,l){};EditorUi.prototype.isScratchpadEnabled=function(){retu
b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};
EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement));
this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=
null,f=mxUtils.bind(this,function(b,d){0==b.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),d.appendChild(g)):this.addLibraryEntries(b,d)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var n=m.parentNode.previousSibling;e=n.getAttribute("title");
null!=e&&0<e.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");n.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");
l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,B=null,
C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",k.insertBefore(B,k.firstChild),n.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),
b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),n.style.paddingRight=18*k.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),k.insertBefore(A,k.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(n.style.paddingRight=18*k.childNodes.length+
"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),n.style.paddingRight=18*k.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var k=z.getCellGeometry(a[f]);null!=k&&k.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
(a.title=e);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),F=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=z.getSelectionCells(),b=z.view.getBounds(d),c=z.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=z.view.translate.x;b.y-=z.view.translate.y;
E(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(m.style.backgroundColor=
null,f=mxUtils.bind(this,function(b,d){0==b.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),d.appendChild(g)):this.addLibraryEntries(b,d)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var k=m.parentNode.previousSibling;e=k.getAttribute("title");
null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");
l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,B=null,
C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var n=z.getCellGeometry(a[f]);null!=n&&n.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
(a.title=e);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),F=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),d=z.view.getBounds(b),c=z.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=z.view.translate.x;d.y-=z.view.translate.y;
E(b,d)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(m.style.backgroundColor=
"",m.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.first&&(z.graphHandler.resume(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",z.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,k,n,p,l,t,z){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,n,p),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var u=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var k=
JSON.parse(mxUtils.getTextContent(e.documentElement));f(k,m);b=b.concat(k);D(a);this.spinner.stop();u=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}u=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=z&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(z,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l)&&null!=z?this.parseFile(z,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));k.insertBefore(e,k.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
mxEvent.consume(a)})),k.insertBefore(e,k.firstChild))}n.appendChild(k);n.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,n,k,p,l,z,t){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,k,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,k,p),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var u=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var n=
JSON.parse(mxUtils.getTextContent(e.documentElement));f(n,m);b=b.concat(n);D(a);this.spinner.stop();u=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),n=0;n<k.length;n++){var p=this.stringToCells(Editor.getDiagramNodeXml(k[n])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}u=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=t&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(t,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));n.insertBefore(l,n.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,f){a=new ImageDialog(this,a,b,c,e,f);this.showDialog(a.container,Graph.fileSupport?
480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var d=new ChangePageSetup(this,null,a);d.ignoreColor=!0;this.editor.graph.model.execute(d)}});var d=new BackgroundImageDialog(this,a,b);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,d){if(!d){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var d=new BackgroundImageDialog(this,a,b);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));
a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,f,k,l){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=g||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),
@ -9731,7 +9721,7 @@ if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid
p);this.handleError(a,b,c,e,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var d=document.createElement("option");mxUtils.write(d,b[a].displayName);d.value=a;e.appendChild(d);d=document.createElement("option");d.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(d,"<"+b[a].email+">");d.setAttribute("disabled","disabled");e.appendChild(d)}d=document.createElement("option");mxUtils.write(d,mxResources.get("addAccount"));d.value=b.length;
e.appendChild(d)}var b=this.drive.getUsersList(),d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var d=e.value,c=b.length!=d;c&&this.drive.setUser(b[d]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
!0)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(d.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=g.message?l=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?l=mxUtils.htmlEntities(g.response.error):"undefined"!==typeof window.App&&(g.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):
g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var t=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,t,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,e,
g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var z=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,z,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,e,
f,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,f,null,null,null,null,g);this.showDialog(a.container,340,46+g,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+
"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(d);mxUtils.write(e,b);document.body.appendChild(e);
@ -9772,24 +9762,24 @@ y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"http
g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");g=m.cloneNode(!0);g.setAttribute("value","copy");f.appendChild(g);
var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxUtils.br(f);f.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));f.appendChild(k);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),f.appendChild(k),mxEvent.addListener(k,
"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));g.setAttribute("checked","checked");null==c&&m.setAttribute("disabled","disabled");d.appendChild(f);var n=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value="100%";d.appendChild(z);
var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(d,mxResources.get("allPages"),f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),E=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,E),I=F.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&E.checked?F.getEditSelect().removeAttribute("disabled"):
var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(d,mxResources.get("allPages"),f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),E=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,E),H=F.getEditInput();H.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&E.checked?F.getEditSelect().removeAttribute("disabled"):
F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(m.checked?c:null,A.checked,z.value,n.getTarget(),n.getColor(),B.checked,C.checked,D.checked,E.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,f,k,l){l=document.createElement("div");l.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,a||mxResources.get("link"));d.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=this.getCurrentFile(),d="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var d="https://desk.draw.io/support/solutions/articles/16000039384",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace=
"normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);l.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,
function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,z=null;if(null!=c||null!=e)a+=30,mxUtils.write(l,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight=
"16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",l.appendChild(p),mxUtils.write(l,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginLeft="6px",z.style.marginBottom="10px",z.value=e+"px",l.appendChild(z),mxUtils.br(l);var t=this.addLinkSection(l,k);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=
this.addCheckbox(l,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(l,mxResources.get("lightbox"),!0,null,null,!k),E=this.addEditButton(l,D),F=E.getEditInput();k&&(F.style.marginLeft=D.style.marginLeft,D.style.display="none",a-=30);var I=this.addCheckbox(l,mxResources.get("layers"),!0);I.style.marginLeft=F.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(I.removeAttribute("disabled"),F.removeAttribute("disabled")):(I.setAttribute("disabled",
"disabled"),F.setAttribute("disabled","disabled"));F.checked&&D.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,l,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==u?!0:u.checked,D.checked,E.getLink(),I.checked,null!=p?p.value:null,null!=z?z.value:null)}),null,mxResources.get("create"),d);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
this.addCheckbox(l,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(l,mxResources.get("lightbox"),!0,null,null,!k),E=this.addEditButton(l,D),F=E.getEditInput();k&&(F.style.marginLeft=D.style.marginLeft,D.style.display="none",a-=30);var H=this.addCheckbox(l,mxResources.get("layers"),!0);H.style.marginLeft=F.style.marginLeft;H.style.marginBottom="16px";H.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(H.removeAttribute("disabled"),F.removeAttribute("disabled")):(H.setAttribute("disabled",
"disabled"),F.setAttribute("disabled","disabled"));F.checked&&D.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,l,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==u?!0:u.checked,D.checked,E.getLink(),H.checked,null!=p?p.value:null,null!=z?z.value:null)}),null,mxResources.get("create"),d);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";d.appendChild(g);if(f){mxUtils.write(d,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type",
"text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var l=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(m.value)/100||1,b=parseInt(k.value)||0;c(!l.checked,null!=n?n.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
function(a,b,c,e,f,k,l,q){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,m="jpeg"==q?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight=
"12px";p.value=this.lastExportZoom||"100%";d.appendChild(p);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";d.appendChild(t);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=q),D=null;"dark"==uiTheme&&(D=this.addCheckbox(d,mxResources.get("dark"),!0),m+=26);var E=this.addCheckbox(d,
mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");k&&(d.appendChild(F),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),m+=26,mxEvent.addListener(E,"change",function(){E.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(F.setAttribute("checked","checked"),
F.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||H.setAttribute("disabled","disabled");b&&(d.appendChild(H),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),m+=26);var K=null;if("png"==q||"jpeg"==q)K=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
F.defaultChecked=!0);var H=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");b&&(d.appendChild(I),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),m+=26);var K=null;if("png"==q||"jpeg"==q)K=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
!0),m+=26;var G=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=q),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(d,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=q);O.style.marginLeft="24px";O.style.marginBottom="16px";L?m+=26:O.style.display="none";mxEvent.addListener(G,"change",function(){G.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});l&&L||O.setAttribute("disabled","disabled");var J=document.createElement("select");
J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));J.appendChild(a);"svg"==
q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(J),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=p.value;f(p.value,u.checked,!E.checked,I.checked,G.checked,H.checked,t.value,F.checked,!O.checked,J.value,null!=K?K.checked:null,null!=D?D.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(J),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=p.value;f(p.value,u.checked,!E.checked,H.checked,G.checked,I.checked,t.value,F.checked,!O.checked,J.value,null!=K?K.checked:null,null!=D?D.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(m)}var k=this.addCheckbox(d,mxResources.get("fit"),!0),l=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&e,
!e),n=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),z=this.addEditButton(d,p),B=z.getEditInput(),C=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));
B.checked&&p.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,l.checked,n.checked,p.checked,z.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,f,k,l,q){function d(b){var d=" ",m="";e&&(d=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@ -9843,8 +9833,8 @@ this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,x)
this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(T){return this.handleError(T),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,z=p,t=[],B=mxUtils.bind(this,function(a,b){t[a]=b;if(0==
--z){this.spinner.stop();if(null!=q)q(t);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<t.length;c++){var e=t[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),u=0;u<p;u++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,z=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(z+1)))),
u=mxUtils.parseXml(t),t=u.getElementsByTagName("svg");if(0<t.length){var t=t[0],q=A?null:t.getAttribute("content");null!=q&&"<"!=q.charAt(0)&&"%"!=q.charAt(0)&&(q=unescape(window.atob?atob(q):Base64.decode(q,!0)));null!=q&&"%"==q.charAt(0)&&(q=decodeURIComponent(q));null==q||"<mxfile "!==q.substring(0,8)&&"<mxGraphModel "!==q.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(p.substring(0,z+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),t=
g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),t=parseFloat(q[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),x=f(p,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(t*
v)),k.name);if(isNaN(l)||isNaN(t)){var C=new Image;C.onload=mxUtils.bind(this,function(){l=Math.max(1,C.width);t=Math.max(1,C.height);x[0].geometry.width=l;x[0].geometry.height=t;g.setAttribute("viewBox","0 0 "+l+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[x[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(q,
g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),t=parseFloat(q[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),C=f(p,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(t*
v)),k.name);if(isNaN(l)||isNaN(t)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);t=Math.max(1,x.height);C[0].geometry.width=l;C[0].geometry.height=t;g.setAttribute("viewBox","0 0 "+l+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[C[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return C}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(q,
"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==k.type){var v=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(v,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,p){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<x){var z=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/p)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*z),Math.round(p*z),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,f(p,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?p.readAsDataURL(k):p.readAsText(k)}})(u)});if(m){m=[];
@ -9921,46 +9911,46 @@ n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({e
640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,t=1==g.enableSearch,q=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
name:d,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),
null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var u=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,u):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var I=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var H=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=I;k.postMessage(JSON.stringify(b),"*")}),G=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(I)));H!=this.editor.graph&&H.container.parentNode.removeChild(H.container);
K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=H.getGlobalVariable,H=this.createTemporaryGraph(H.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){J=this.updatePageRoot(this.pages[S]);break}H.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(H.container);H.model.setRoot(J.root)}if(null!=g.layerIds){for(var W=
H.model,aa=W.getChildCells(W.getRoot()),l={},S=0;S<g.layerIds.length;S++)l[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],l[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){G(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){G(null)}),null,null,g.scale,null,null,null,H)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(I))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);u=this.createLoadMessage("export");u.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();u.xml=mxUtils.getXml(ca);
u.data=this.getFileData(null,null,!0,null,null,null,ca);u.format=g.format}else if("html"==g.format)I=this.editor.getGraphXml(),u.data=this.getHtml(I,this.editor.graph),u.xml=mxUtils.getXml(I),u.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);u.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);u.format="svg";var V=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();u.data=Editor.createSvgDataUri(a);
null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var u=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,u):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var H=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=H;k.postMessage(JSON.stringify(b),"*")}),G=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(H)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);
K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){J=this.updatePageRoot(this.pages[S]);break}I.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(J.root)}if(null!=g.layerIds){for(var W=
I.model,aa=W.getChildCells(W.getRoot()),l={},S=0;S<g.layerIds.length;S++)l[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],l[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){G(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){G(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(H))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);u=this.createLoadMessage("export");u.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();u.xml=mxUtils.getXml(ca);
u.data=this.getFileData(null,null,!0,null,null,null,ca);u.format=g.format}else if("html"==g.format)H=this.editor.getGraphXml(),u.data=this.getHtml(H,this.editor.graph),u.xml=mxUtils.getXml(H),u.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);u.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);u.format="svg";var V=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();u.data=Editor.createSvgDataUri(a);
k.postMessage(JSON.stringify(u),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(u.xml,this.editor.graph,null,!0,V,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var U=this.editor.graph.getSvg(Y);this.embedFonts(U,mxUtils.bind(this,function(a){g.embedImages||
null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){V(mxUtils.getXml(a))})):V(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(u),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),
this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var Z=this.getCurrentFile();null!=Z&&(n=m(g.xml),null!=n&&""!=n&&Z.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==
g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();c&&null==b&&(b=mxUtils.bind(this,
function(a,b){var c=m();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;k.postMessage(JSON.stringify(l),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,
function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
1)),function(a){ba(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ba(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
mxUtils.bind(this,function(a){ba(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),ba(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,d){l.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var c=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);
this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,
null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,x=null,y=null,
A=null,z=null,B=null,C=null,D="",E="auto",F="auto",I=null,H=null,K=40,G=40,L=100,O=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(ja):(J.setSelectionCells(ja),J.scrollCellToVisible(J.getSelectionCell()))},W=J.getFreeInsertPoint(),aa=W.x,ca=W.y,W=ca,Y=null,V="auto",C=null,U=[],Z=null,ba=null,T=0;T<c.length&&"#"==c[T].charAt(0);){a=c[T];for(T++;T<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[T].substring(1)),T++;if("#"!=
null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var g={},k=null,l=null,x=null,y=null,
A=null,z=null,B=null,C=null,D="",E="auto",F="auto",H=null,I=null,K=40,G=40,L=100,O=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(ja):(J.setSelectionCells(ja),J.scrollCellToVisible(J.getSelectionCell()))},W=J.getFreeInsertPoint(),aa=W.x,ca=W.y,W=ca,Y=null,V="auto",C=null,U=[],Z=null,ba=null,T=0;T<d.length&&"#"==d[T].charAt(0);){a=d[T];for(T++;T<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[T].substring(1)),T++;if("#"!=
a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),M=mxUtils.trim(a.substring(P+1));"label"==Q?Y=J.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?y=M:"labels"==Q&&0<M.length&&"-"!=M?A=JSON.parse(M):"style"==Q?k=M:"parentstyle"==Q?z=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?C=M:"namespace"==Q&&0<M.length&&"-"!=M?D=M:"width"==Q?E=M:"height"==Q?F=M:"left"==
Q&&0<M.length?I=M:"top"==Q&&0<M.length?H=M:"ignore"==Q?ba=M.split(","):"connect"==Q?U.push(JSON.parse(M)):"link"==Q?Z=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?G=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(V=M)}}}if(null==c[T])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[T]),Q=P=null,M=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),M.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=U)for(var X=0;X<U.length;X++)null==g[U[X].to]&&(g[U[X].to]={});B=[];for(R=T+1;R<c.length;R++){var da=this.editor.csvToArray(c[R]);if(null==da){var sa=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(sa+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var da=B[R],N=null,ha=null!=P?D+da[P]:null;null!=ha&&(N=J.model.getCell(ha));var c=null!=N,fa=new mxCell(Y,
new mxGeometry(aa,W,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=!0;fa.id=ha;for(var ea=0;ea<da.length;ea++)J.setAttributeForCell(fa,M[ea],da[ea]);if(null!=y&&null!=A){var la=A[fa.getAttribute(y)];null!=la&&J.labelChanged(fa,la)}if(null!=x&&null!=l){var qa=l[fa.getAttribute(x)];null!=qa&&(fa.style=qa)}J.setAttributeForCell(fa,"placeholders","1");fa.style=J.replacePlaceholders(fa,fa.style);c&&(J.model.setGeometry(N,fa.geometry),J.model.setStyle(N,fa.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=fa;if(!c)for(X=
0;X<U.length;X++)g[U[X].to][N.getAttribute(U[X].to)]=N;null!=Z&&"link"!=Z&&(J.setLinkForCell(N,N.getAttribute(Z)),J.setAttributeForCell(N,Z,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ia=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=I&&null!=N.getAttribute(I)&&(N.geometry.x=aa+parseFloat(N.getAttribute(I))),null!=H&&null!=N.getAttribute(H)&&(N.geometry.y=ca+parseFloat(N.getAttribute(H))),"@"==E.charAt(0)&&null!=N.getAttribute(E.substring(1))?N.geometry.width=
parseFloat(N.getAttribute(E.substring(1))):N.geometry.width="auto"==E?ia.width+O:parseFloat(E),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.height=parseFloat(N.getAttribute(F.substring(1))):N.geometry.height="auto"==F?ia.height+O:parseFloat(F),W+=N.geometry.height+G);c?(null==f[ha]&&(f[ha]=[]),f[ha].push(N)):(C=null!=Q?J.model.getCell(D+da[Q]):null,d.push(N),null!=C?(C.style=J.replacePlaceholders(C,z),J.addCell(N,C)):e.push(J.addCell(N)))}for(var ma=e.slice(),ja=e.slice(),X=0;X<
U.length;X++)for(var ua=U[X],R=0;R<d.length;R++){var N=d[R],va=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(J.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?J.replacePlaceholders(l,c.style):J.createCurrentEdgeStyle(),
k=J.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}ja.push(k);mxUtils.remove(c.invert?a:f,ma)}}});va(N,N,ua);if(null!=f[N.id])for(ea=0;ea<f[N.id].length;ea++)va(N,f[N.id][ea],
ua)}if(null!=ba)for(R=0;R<d.length;R++)for(N=d[R],ea=0;ea<ba.length;ea++)J.setAttributeForCell(N,mxUtils.trim(ba[ea]),null);if(0<e.length){var ka=new mxParallelEdgeLayout(J);ka.spacing=K;var ta=function(){0<ka.spacing&&ka.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var b=J.getCellGeometry(e[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==E&&(b.width=Math.round(J.snap(b.width)));"auto"==F&&(b.height=Math.round(J.snap(b.height)))}};if("["==V.charAt(0)){var wa=S;J.view.validate();
Q&&0<M.length?H=M:"top"==Q&&0<M.length?I=M:"ignore"==Q?ba=M.split(","):"connect"==Q?U.push(JSON.parse(M)):"link"==Q?Z=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?G=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(V=M)}}}if(null==d[T])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(d[T]),Q=P=null,M=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),M.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=U)for(var X=0;X<U.length;X++)null==g[U[X].to]&&(g[U[X].to]={});B=[];for(R=T+1;R<d.length;R++){var da=this.editor.csvToArray(d[R]);if(null==da){var sa=40<d[R].length?d[R].substring(0,40)+"...":d[R];throw Error(sa+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var da=B[R],N=null,ha=null!=P?D+da[P]:null;null!=ha&&(N=J.model.getCell(ha));var d=null!=N,fa=new mxCell(Y,
new mxGeometry(aa,W,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=!0;fa.id=ha;for(var ea=0;ea<da.length;ea++)J.setAttributeForCell(fa,M[ea],da[ea]);if(null!=y&&null!=A){var la=A[fa.getAttribute(y)];null!=la&&J.labelChanged(fa,la)}if(null!=x&&null!=l){var qa=l[fa.getAttribute(x)];null!=qa&&(fa.style=qa)}J.setAttributeForCell(fa,"placeholders","1");fa.style=J.replacePlaceholders(fa,fa.style);d&&(J.model.setGeometry(N,fa.geometry),J.model.setStyle(N,fa.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=fa;if(!d)for(X=
0;X<U.length;X++)g[U[X].to][N.getAttribute(U[X].to)]=N;null!=Z&&"link"!=Z&&(J.setLinkForCell(N,N.getAttribute(Z)),J.setAttributeForCell(N,Z,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ia=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=H&&null!=N.getAttribute(H)&&(N.geometry.x=aa+parseFloat(N.getAttribute(H))),null!=I&&null!=N.getAttribute(I)&&(N.geometry.y=ca+parseFloat(N.getAttribute(I))),"@"==E.charAt(0)&&null!=N.getAttribute(E.substring(1))?N.geometry.width=
parseFloat(N.getAttribute(E.substring(1))):N.geometry.width="auto"==E?ia.width+O:parseFloat(E),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.height=parseFloat(N.getAttribute(F.substring(1))):N.geometry.height="auto"==F?ia.height+O:parseFloat(F),W+=N.geometry.height+G);d?(null==f[ha]&&(f[ha]=[]),f[ha].push(N)):(C=null!=Q?J.model.getCell(D+da[Q]):null,c.push(N),null!=C?(C.style=J.replacePlaceholders(C,z),J.addCell(N,C)):e.push(J.addCell(N)))}for(var ma=e.slice(),ja=e.slice(),X=0;X<
U.length;X++)for(var ua=U[X],R=0;R<c.length;R++){var N=c[R],va=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(J.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=g[d.to][c[e]];if(null!=f){var k=d.label;null!=d.fromlabel&&(k=(b.getAttribute(d.fromlabel)||"")+(k||""));null!=d.tolabel&&(k=(k||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?J.replacePlaceholders(l,d.style):J.createCurrentEdgeStyle(),
k=J.insertEdge(null,null,k||"",d.invert?f:a,d.invert?a:f,l);if(null!=d.labels)for(l=0;l<d.labels.length;l++){var m=d.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}ja.push(k);mxUtils.remove(d.invert?a:f,ma)}}});va(N,N,ua);if(null!=f[N.id])for(ea=0;ea<f[N.id].length;ea++)va(N,f[N.id][ea],
ua)}if(null!=ba)for(R=0;R<c.length;R++)for(N=c[R],ea=0;ea<ba.length;ea++)J.setAttributeForCell(N,mxUtils.trim(ba[ea]),null);if(0<e.length){var ka=new mxParallelEdgeLayout(J);ka.spacing=K;var ta=function(){0<ka.spacing&&ka.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var b=J.getCellGeometry(e[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==E&&(b.width=Math.round(J.snap(b.width)));"auto"==F&&(b.height=Math.round(J.snap(b.height)))}};if("["==V.charAt(0)){var wa=S;J.view.validate();
this.executeLayoutList(JSON.parse(V),function(){ta();wa()});S=null}else if("circle"==V){var na=new mxCircleLayout(J);na.resetEdges=!1;var xa=na.isVertexIgnored;na.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(J.getDefaultParent());ta()},!0,S);S=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ja.length==2*e.length-1&&1==ma.length){J.view.validate();var ra=new mxCompactTreeLayout(J,"horizontaltree"==V);ra.levelDistance=
G;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,S);S=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ma.length){J.view.validate();var oa=new mxHierarchicalLayout(J,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=G;oa.parallelEdgeSpacing=K;oa.interRankCellSpacing=L;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(J.getDefaultParent(),ja);J.moveCells(ja,
aa,ca)},!0,S);S=null}else if("organic"==V||"auto"==V&&ja.length>e.length){J.view.validate();var pa=new mxFastOrganicLayout(J);pa.forceConstant=3*G;pa.resetEdges=!1;var ya=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ka=new mxParallelEdgeLayout(J);ka.spacing=K;this.executeLayout(function(){pa.execute(J.getDefaultParent());ta()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(za){this.handleError(za)}};EditorUi.prototype.getSearch=
function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/
a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||
b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};
@ -9983,8 +9973,8 @@ this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowed
d+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
isLocalStorage)}catch(u){null!=b&&b(u)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(F){console.log(F)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(F){console.log(F)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(I){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(I){console.log(I)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};
funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(F){console.log(F)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(F){console.log(F)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(H){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(H){console.log(H)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};
EditorUi.prototype.setDatabaseItem=function(a,b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=d.transaction(f,"readwrite");g.oncomplete=c;g.onerror=e;for(d=0;d<f.length;d++)g.objectStore(f[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,
"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],
"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.commentsSupported=
@ -10001,14 +9991,14 @@ var CommentsWindow=function(a,e,c,b,k,f){function l(){for(var a=A.getElementsByT
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),l()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function g(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function m(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function t(b,c,e,f,k){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});F.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=G;a(b);return{pdiv:d,replies:c}}function x(c,e,g,k,l){function z(){m(u);b.addReply(q,function(a){q.id=a;b.replies.push(q);p(u);g&&g()},function(b){B();n(u);a.handleError(b,null,
null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(q,u,function(a){z()},!0)}var v=C().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=t(q,b.replies,v,f+1);e?B():z()}if(k||!b.isResolved){z.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",b.id);G.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(G.style.backgroundColor="ghostWhite");
var y=document.createElement("div");y.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;y.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";y.appendChild(E);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");E.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);g(b,
H);E.appendChild(H);G.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");G.appendChild(y);b.isLocked&&(G.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";y.appendChild(F);u||b.isLocked||0!=f&&!q||B(mxResources.get("reply"),function(){x("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||u||b.isLocked||(B(mxResources.get("edit"),
function(){function c(){d(b,G,function(){m(G);b.editComment(b.content,function(){p(G)},function(b){n(G);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(G);b.deleteComment(function(a){if(!0===a){a=G.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=G.querySelectorAll(".geCommentAction");for(a=
0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(G);G.style.opacity="0.5"}else{d=C(b).replies;for(a=0;a<d.length;a++)A.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}z.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){n(G);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,
!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});G.appendChild(y);null!=e?A.insertBefore(G,e.nextSibling):A.appendChild(G);for(e=0;null!=b.replies&&e<b.replies.length;e++)y=b.replies[e],y.isResolved=b.isResolved,t(y,b.replies,null,f+1,k);null!=v&&(v.comment.id==b.id?(k=b.content,b.content=v.comment.content,d(b,G,v.saveCallback,v.deleteOnCancel),b.content=k):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return G}}var u=
"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});I.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function G(c,e,g,k,l){function z(){m(u);b.addReply(q,function(a){q.id=a;b.replies.push(q);p(u);g&&g()},function(b){B();n(u);a.handleError(b,null,
null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(q,u,function(a){z()},!0)}var v=C().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=t(q,b.replies,v,f+1);e?B():z()}if(k||!b.isResolved){z.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
var y=document.createElement("div");y.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;y.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";y.appendChild(E);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");E.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);g(b,
F);E.appendChild(F);x.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");x.appendChild(y);b.isLocked&&(x.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var I=document.createElement("ul");I.className="geCommentActionsList";y.appendChild(I);u||b.isLocked||0!=f&&!q||B(mxResources.get("reply"),function(){G("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||u||b.isLocked||(B(mxResources.get("edit"),
function(){function c(){d(b,x,function(){m(x);b.editComment(b.content,function(){p(x)},function(b){n(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=x.querySelectorAll(".geCommentAction");for(a=
0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(x);x.style.opacity="0.5"}else{d=C(b).replies;for(a=0;a<d.length;a++)A.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}z.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?G(mxResources.get("reOpened")+": ",!0,c,!1,
!0):G(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(y);null!=e?A.insertBefore(x,e.nextSibling):A.appendChild(x);for(e=0;null!=b.replies&&e<b.replies.length;e++)y=b.replies[e],y.isResolved=b.isResolved,t(y,b.replies,null,f+1,k);null!=v&&(v.comment.id==b.id?(k=b.content,b.content=v.comment.content,d(b,x,v.saveCallback,v.deleteOnCancel),b.content=k):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return x}}var u=
!a.canComment(),q=a.canReplyToReplies(),v=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;A.style.bottom=parseInt(y)+7+"px";x.appendChild(A);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(z,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var C=y.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function c(){d(e,f,function(b){m(f);a.addComment(b,function(a){b.id=a;E.push(b);p(f)},function(b){n(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=t(e,E,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
@ -10018,7 +10008,7 @@ mxEvent.addListener(C,"click",function(a){F();a.preventDefault();mxEvent.consume
a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(z);z.style.display="block";E=a;for(a=0;a<E.length;a++)b(E[a].replies),t(E[a],E,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});F();this.refreshComments=F;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(g(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<E.length;d++)a(E[d])}});setInterval(B,6E4);this.refreshCommentsTime=
B;this.window=new mxWindow(mxResources.get("comments"),x,e,c,b,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var H=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);this.window.destroy()}},ConfirmDialog=
function(a,e,c,b,k,f,l,d,g,m,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=n+"px";t.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(t.style.height="60px");mxUtils.write(t,e);p.appendChild(t);null!=m&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),t.appendChild(e),p.appendChild(t));m=document.createElement("div");
m.style.textAlign="center";m.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=d&&(f.innerHTML=d+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&m.appendChild(f);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=c&&
c(u.checked)});m.appendChild(q);null!=l?(q.innerHTML=l+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||m.appendChild(f);p.appendChild(m);g?(m.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.appendChild(u),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),t.appendChild(k),p.appendChild(t),
@ -10198,8 +10188,8 @@ this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryM
this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==g)if(m<this.staleEtagMaxRetries){m++;var d=2*m*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(B,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",m,"delay",d)}else{B(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(T){}}else"1"==urlParams.test&&c.headRevisionId==v&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),n(b,c)}catch(T){p(T)}}),mxUtils.bind(this,function(){n(b)})):
n(b)}catch(Z){p(Z)}}}))}catch(U){p(U)}}),B=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==g)k(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==v?("1"==urlParams.test&&g!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
"from",g,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g=e.etag,k(b)):n({error:{code:412}},e)}catch(U){p(U)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,n(b))}))}});if(x&&null==b){a.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/t.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(t.height*a);b.getContext("2d").drawImage(t,0,0,b.width,b.height);var c=b.toDataURL(),
c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");z.thumbnail={image:c,mimeType:"image/png"};B(!1)}catch(V){try{B(!1)}catch(U){p(U)}}});t.src="data:image/png;base64,"+c}else B(!1)}catch(aa){p(aa)}});if(x){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?C:null,K.scale,K.border)}else E(C,!1)}catch(G){p(G)}});try{a.saveLevel=2,(f||x||a.constructor==DriveLibrary||!this.enableThumbnails||
"from",g,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g=e.etag,k(b)):n({error:{code:412}},e)}catch(U){p(U)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,n(b))}))}});if(x&&null==b){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),
c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");z.thumbnail={image:c,mimeType:"image/png"};B(!1)}catch(V){try{B(!1)}catch(U){p(U)}}});q.src="data:image/png;base64,"+c}else B(!1)}catch(aa){p(aa)}});if(x){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?C:null,K.scale,K.border)}else E(C,!1)}catch(G){p(G)}});try{a.saveLevel=2,(f||x||a.constructor==DriveLibrary||!this.enableThumbnails||
"0"==urlParams.thumb||null!=z.mimeType&&"application/vnd.jgraph.mxfile"!=z.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(E){b=null}B(b,"image/png")}catch(E){p(E)}})))&&B(null,null,a.constructor!=DriveLibrary)}catch(C){p(C)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(C){p(C)}};
DriveClient.prototype.insertFile=function(a,e,c,b,k,f,l){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,e,!1,l),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,e,a)):0==a?null!=k&&k({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,e,a))}),k)};
DriveClient.prototype.createUploadRequest=function(a,e,c,b,k,f,l){k=null!=k?k:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(e)+
@ -10490,30 +10480,30 @@ App.prototype.showRefreshDialog=function(a,e){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();c.style.left="0";c.style.right="0";c.style.borderRadius="0";c.style.borderLeftStyle="none";c.style.borderRightStyle="none";c.style.marginBottom="26px";c.style.padding="8px 0 8px 0";this.dialog.container.appendChild(c)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
App.prototype.start=function(){var a=this;window.onerror=function(b,c,d,e,k){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,e,k,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var a=this;window.onerror=function(b,c,d,e,k){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,e,k,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(f){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),
c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(g){null!=document.body&&this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||
0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),
b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(g){}c?this.spinner.spin(document.body,
mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,function(){var a=decodeURIComponent(urlParams.viewbox||"");if(""!=a)try{var b=JSON.parse(a);this.editor.graph.fitWindow(b,b.border)}catch(n){console.error(n)}})):this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||
"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),k=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,
b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,
null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?k(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,
function(a){k(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&
null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(f){this.handleError(f)}};
mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,function(){var a=decodeURIComponent(urlParams.viewbox||"");if(""!=a)try{var b=JSON.parse(a);this.editor.graph.fitWindow(b,b.border)}catch(n){console.error(n)}})):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),k=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,
a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?k(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,
mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){k(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):
(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(f){this.handleError(f)}};
App.prototype.loadDraft=function(a,e){this.createFile(this.defaultFilename,a,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
App.prototype.checkDrafts=function(){try{var a=Editor.guid();localStorage.setItem(".draft-alive-check",a);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(e){for(var c=[],b=0;b<e.length;b++)try{var k=e[b].key;if(null!=k&&".draft_"==k.substring(0,7)){var f=JSON.parse(e[b].data);null!=f&&"draft"==f.type&&f.aliveCheck!=a&&(f.key=k,c.push(f))}}catch(l){}1==c.length?this.loadDraft(c[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[0].key)})):
1<c.length?(e=new Date(c[0].modified),e=new DraftDialog(this,1<c.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[e.toLocaleDateString()+" "+e.toLocaleTimeString()]),1<c.length?null:c[0].data,mxUtils.bind(this,function(a){this.hideDialog();a=""!=a?a:0;this.loadDraft(c[a].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key)}))}),mxUtils.bind(this,function(a,b){a=""!=a?a:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key);
null!=b&&b()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<c.length?c:null),this.showDialog(e.container,640,480,!0,!1,mxUtils.bind(this,function(a){"0"==urlParams.splash?this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.loadFile()})),e.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
null!=b&&b()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<c.length?c:null),this.showDialog(e.container,640,480,!0,!1,mxUtils.bind(this,function(a){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)})),e.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),c=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||mxClient.IS_ANDROID||
mxClient.IS_IOS||this.mode!=App.MODE_DEVICE&&this.mode!=App.MODE_BROWSER||this.showDownloadDesktopBanner()});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!a)null==urlParams.create&&c();else{a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();c()}),a);this.showDialog(b.container,3>a?
260:320,4<=e?440:this.isOfflineApp()?300:320,!0,!1);b.init()}};
App.prototype.showSplash=function(a){var e=this.getServiceCount(!0),c=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||mxClient.IS_ANDROID||
mxClient.IS_IOS||this.mode!=App.MODE_DEVICE||this.showDownloadDesktopBanner()});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!a)null==urlParams.create&&c();else{a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();c()}),a);this.showDialog(b.container,3>a?200:300,3<e?320:210,!0,!1);b.init()}};
App.prototype.addLanguageMenu=function(a,e){var c=null;if(null!=this.menus.get("language")){c=document.createElement("div");c.setAttribute("title",mxResources.get("language"));c.className="geIcon geSprite geSprite-globe";c.style.position="absolute";c.style.cursor="pointer";c.style.bottom="20px";c.style.right="20px";if(e){c.style.direction="rtl";c.style.textAlign="right";c.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";b.style.fontSize="12px";b.style.margin=
"5px 24px 0 0";b.style.color="gray";b.style.userSelect="none";mxUtils.write(b,mxResources.get("language"));c.appendChild(b)}mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var e=mxUtils.getOffset(c);
b.popup(e.x,e.y+c.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(c)}return c};
App.prototype.loadFileSystemEntry=function(a,e,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});a.getFile().then(mxUtils.bind(this,function(b){var k=new FileReader;k.onload=mxUtils.bind(this,function(f){try{if(null!=e){var k=f.target.result;"image/"==b.type.substring(0,6)&&(k=this.extractGraphModelFromPng(k));e(new LocalFile(this,k,b.name,null,a,b))}else this.openFileHandle(f.target.result,b.name,b,!1,a)}catch(d){c(d)}});k.onerror=c;"image"!==b.type.substring(0,5)&&"application/pdf"!==
b.type||"image/svg"===b.type.substring(0,9)?k.readAsText(b):k.readAsDataURL(b)}),c)};App.prototype.createFileSystemOptions=function(a){for(var e=[],c=0;c<this.editor.diagramFileTypes.length;c++)e.push({description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),extensions:[this.editor.diagramFileTypes[c].extension]});return{type:"save-file",accepts:e,fileName:a}};
b.type||"image/svg"===b.type.substring(0,9)?k.readAsText(b):k.readAsDataURL(b)}),c)};
App.prototype.createFileSystemOptions=function(a){var e=[],c=null;if(null!=a){var b=a.lastIndexOf(".");0<b&&(c=a.substring(b+1))}for(b=0;b<this.editor.diagramFileTypes.length;b++){var k={description:mxResources.get(this.editor.diagramFileTypes[b].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[b].extension+")":""),extensions:[this.editor.diagramFileTypes[b].extension]};this.editor.diagramFileTypes[b].extension==c?e.splice(0,0,k):e.push(k)}return{type:"save-file",accepts:e,fileName:a}};
App.prototype.chooseFileSystemEntries=function(a,e,c){e=null!=e?e:mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)});c=null!=c?c:this.createFileSystemOptions();window.chooseFileSystemEntries(c).then(mxUtils.bind(this,function(b){b.getFile().then(mxUtils.bind(this,function(c){a(b,c)}),e)}),e)};
App.prototype.pickFile=function(a){try{if(a=null!=a?a:this.mode,a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(a);if(null!=e)e.pickFile();else if(a==App.MODE_DEVICE&&"chooseFileSystemEntries"in window)window.chooseFileSystemEntries().then(mxUtils.bind(this,function(a){this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(a)}),
mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)}));else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.openFiles(c.files),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.openFileInputElt=c}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
@ -10644,8 +10634,8 @@ b.pages&&1<b.pages.length&&(b.editor.editable||"1"!=urlParams["hide-pages"])?450
k.getSelectionCount()){var a=k.getSelectionCell(),c=k.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...",function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var d=new RevisionDialog(b,a,c);b.showDialog(d.container,
640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");n=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(n.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=
b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(n=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();k.model.execute(a)}),n.setToggleAction(!0),
n.setSelectedCallback(function(){return b.isMathEnabled()}),n.isEnabled=f);if(isLocalStorage||mxClient.IS_CHROMEAPP)n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&
b.editor.autosave});b.actions.addAction("editGeometry...",function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;b.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){k.isEnabled()&&
n.setSelectedCallback(function(){return b.isMathEnabled()}),n.isEnabled=f);isLocalStorage&&(n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&b.editor.autosave});
b.actions.addAction("editGeometry...",function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;b.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){k.isEnabled()&&
!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n,v)}),!0,null,"svg")}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);
!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,p,null,v)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",
@ -10657,7 +10647,7 @@ n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&
b.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));b.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){b.exportVisio()}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&b.actions.addAction("configuration...",function(){var a=localStorage.getItem(".configuration"),
a=new TextareaDialog(b,mxResources.get("configuration")+":",null!=a?JSON.stringify(JSON.parse(a),null,2):"",function(a){if(null!=a)try{if(0<a.length){var c=JSON.parse(a);localStorage.setItem(".configuration",JSON.stringify(c))}else localStorage.removeItem(".configuration");b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}},null,null,null,null,null,!0,null,null,"https://desk.draw.io/support/solutions/articles/16000058316",EditorUi.isElectronApp?null:[[mxResources.get("reset"),
function(a,c){b.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(".configuration"),localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode"),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}})}],[mxResources.get("link"),function(a,c){if(0<c.value.length)try{var d=JSON.parse(c.value),e=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(d)),f=new EmbedDialog(b,
e);b.showDialog(f.container,440,240,!0);f.init()}catch(I){b.handleError(I)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this,
e);b.showDialog(f.container,440,240,!0);f.init()}catch(H){b.handleError(H)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this,
function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=
c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=document.createElement("div");d.style.backgroundImage=
"url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
@ -10673,8 +10663,8 @@ urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"1"==
mxResources.parse("testImportRtModel=Import RT model"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var a=k.cloneCells(k.getSelectionCells()),c=k.getBoundingBoxFromGeometry(a),a=k.moveCells(a,-c.x,-c.y);b.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+c.width+", "+c.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(a)))+"'),")}})),b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=
k.getGraphBounds(),b=k.view.translate,c=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=
e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):
mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(H){mxLog.debug("Error: ",
H.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(H){b.handleError(H),null!=window.console&&console.error(H)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,
mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(I){mxLog.debug("Error: ",
I.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(I){b.handleError(I),null!=window.console&&console.error(I)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,
b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(C){b.handleError(C),null!=window.console&&console.error(C)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,k.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=k.getGraphBounds(),c=k.view.scale,d=mxUtils.createXmlDocument(),
e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,g=d.save;d.save=function(){f++;g.apply(this,arguments)};var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(k.getView().getState(k.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",
f)})),b.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a+"/realtime?supportsAllDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,
@ -10728,7 +10718,7 @@ a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,
(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):g&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):d&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},
c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickLibrary(App.MODE_TRELLO)},c):m&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},
c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(I){b.handleError(I,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),
c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(H){b.handleError(H,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),
b.handleError(null,mxResources.get("errorLoadingFile"))},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["undo","redo","-","cut",
"copy"]);EditorUi.isElectronApp&&this.addMenuItems(a,["copyAsImage"]);this.addMenuItems(a,"paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));n=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),
this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&
@ -10819,12 +10809,12 @@ e[n]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[n],b))}for(n=0;n<k
return b}function e(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function d(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.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 g(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),e=q.getIncomingEdges(a),f=q.cloneCells([e[0],a]);q.model.setTerminal(f[0],q.model.getTerminal(e[0],!0),!0);var g=d(a),k=c.geometry;g==mxConstants.DIRECTION_SOUTH||
g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;q.view.currentRoot!=c&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=q.view.getState(a),m=q.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=q.getOutgoingEdges(q.model.getTerminal(e[0],
!0));if(null!=p){for(var v=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,t=k=e=0;t<p.length;t++){var u=q.model.getTerminal(p[t],!1);if(g==d(u)){var z=q.view.getState(u);u!=a&&null!=z&&(v&&b!=z.getCenterX()<l.getCenterX()||!v&&b!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,z)&&(e=10+Math.max(e,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}v?k=0:e=0;for(t=0;t<p.length;t++)if(u=q.model.getTerminal(p[t],
!1),g==d(u)&&(z=q.view.getState(u),u!=a&&null!=z&&(v&&b!=z.getCenterX()<l.getCenterX()||!v&&b!=z.getCenterY()<l.getCenterY()))){var x=[];q.traverse(z.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});q.moveCells(x,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,c)}finally{q.model.endUpdate()}}function m(a){q.model.beginUpdate();try{var b=d(a),c=q.getIncomingEdges(a),e=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);
!0));if(null!=p){for(var v=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,u=k=e=0;u<p.length;u++){var t=q.model.getTerminal(p[u],!1);if(g==d(t)){var z=q.view.getState(t);t!=a&&null!=z&&(v&&b!=z.getCenterX()<l.getCenterX()||!v&&b!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,z)&&(e=10+Math.max(e,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}v?k=0:e=0;for(u=0;u<p.length;u++)if(t=q.model.getTerminal(p[u],
!1),g==d(t)&&(z=q.view.getState(t),t!=a&&null!=z&&(v&&b!=z.getCenterX()<l.getCenterX()||!v&&b!=z.getCenterY()<l.getCenterY()))){var x=[];q.traverse(z.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});q.moveCells(x,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,c)}finally{q.model.endUpdate()}}function m(a){q.model.beginUpdate();try{var b=d(a),c=q.getIncomingEdges(a),e=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);
var f=q.model.getParent(a),g=f.geometry,k=[];q.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);q.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;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);q.moveCells(k,l,m);return q.addCells(e,f)}finally{q.model.endUpdate()}}function n(a,b){q.model.beginUpdate();try{var c=
q.model.getParent(a),e=q.getIncomingEdges(a),f=d(a);0==e.length&&(e=[q.createEdge(c,null,"",null,null,q.createCurrentEdgeStyle())],f=b);var g=q.cloneCells([e[0],a]);q.model.setTerminal(g[0],a,!0);if(null==q.model.getTerminal(g[0],!1)){q.model.setTerminal(g[0],g[1],!1);var k=q.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)q.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&q.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
"vertical":"horizontal",[g[0]])}catch(P){}}var e=q.getOutgoingEdges(a),n=c.geometry,k=[];q.view.currentRoot==c&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=q.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var v=q.view.getBounds(k),t=q.view.translate,u=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/u-t.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/u-t.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==v?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(v.y+v.height)/u-t.y+-n.y+10);return q.addCells(g,c)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=
"vertical":"horizontal",[g[0]])}catch(P){}}var e=q.getOutgoingEdges(a),n=c.geometry,k=[];q.view.currentRoot==c&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=q.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var v=q.view.getBounds(k),u=q.view.translate,t=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/t-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/t-u.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==v?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(v.y+v.height)/t-u.y+-n.y+10);return q.addCells(g,c)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=
[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.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 t(a,b){var c=d(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==e&&c!=b?u.actions.get("selectParent").funct():
c==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(e=p(q.model.getTerminal(c[0],!0),e,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(e,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=e.length-1&&q.setSelectionCell(e[c].cell)))))}var u=this,q=u.editor.graph,v=q.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);
@ -10833,15 +10823,15 @@ function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(
c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&e(g)&&(d.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return y.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
d))};var A=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.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])||q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var v=q.getIncomingEdges(b[0]);
if(0<v.length){var t=q.view.getState(q.model.getTerminal(v[0],!0));if(null!=t){var u=q.view.getState(m);null!=u&&(c=(u.getCenterX()-t.getCenterX())/q.view.scale,d=(u.getCenterY()-t.getCenterY())/q.view.scale)}}}}l=z.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])&&(v=q.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
if(0<v.length){var u=q.view.getState(q.model.getTerminal(v[0],!0));if(null!=u){var t=q.view.getState(m);null!=t&&(c=(t.getCenterX()-u.getCenterX())/q.view.scale,d=(t.getCenterY()-u.getCenterY())/q.view.scale)}}}}l=z.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])&&(v=q.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var B=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.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=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},D=u.onKeyDown;u.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
(9==b.which?c=mxEvent.isShiftDown(b)?m(q.getSelectionCell()):n(q.getSelectionCell()):13==b.which&&(c=g(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];
null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(t(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(J){u.handleError(J)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var E=q.connectVertex;q.connectVertex=
function(b,c,e,f,k,l,p){var v=q.getIncomingEdges(b);if(a(b)){var t=d(b),u=t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST,z=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;return t==c||0==v.length?n(b,c):u==z?m(b):g(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};q.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||l(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
function(b,c,e,f,k,l,p){var v=q.getIncomingEdges(b);if(a(b)){var u=d(b),t=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,z=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;return u==c||0==v.length?n(b,c):t==z?m(b):g(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};q.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||l(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
return!0});return d};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!l(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),e=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=
!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);a.insert(e);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
@ -10896,7 +10886,7 @@ b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var d=this.get("exportAs")
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 q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=t.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=
c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=u.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",
@ -10909,31 +10899,31 @@ a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;b
f([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=c?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=c?d("",e.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==O&&(e=t.addMenu("",a.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor=
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==O&&(e=u.addMenu("",a.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor=
"pointer",e.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(e),O=e),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=c||null!=urlParams.clibs||
null!=urlParams.libs)&&e(this,!0);1E3<=c&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
null!=urlParams.libs)&&e(this,!0);1E3<=c&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,u=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var t=l.descriptorChanged;l.descriptorChanged=function(){t.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,H=document.createElement("div");H.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var G=t.addMenu("100%",K.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration=
"none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.cursor="pointer";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";G.style.height=parseInt(l.tabContainerHeight)-1+"px";G.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";H.appendChild(G);K=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*
l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}H.appendChild(l.tabContainer);H.appendChild(n);H.appendChild(l.diagramContainer);
k.appendChild(H);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,I=document.createElement("div");I.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var G=u.addMenu("100%",K.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration=
"none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.cursor="pointer";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";G.style.height=parseInt(l.tabContainerHeight)-1+"px";G.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";I.appendChild(G);K=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*
l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}I.appendChild(l.tabContainer);I.appendChild(n);I.appendChild(l.diagramContainer);
k.appendChild(I);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,l){var d=c.y,f=c.x,k=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,t=new mxCellState,u=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);t.x=b.x+f;t.y=b.y+d;t.width=b.width;t.height=b.height;for(var v=[],x=[],y=0;y<this.states.length;y++){var A=this.states[y];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((t.x>=A.x&&t.x<=A.x+A.width||A.x>=t.x&&A.x<=t.x+t.width)&&(t.y>
A.y+A.height+4||t.y+t.height+4<A.y)?v.push(A):(t.y>=A.y&&t.y<=A.y+A.height||A.y>=t.y&&A.y<=t.y+t.height)&&(t.x>A.x+A.width+4||t.x+t.width+4<A.x)&&x.push(A))}var z=0,B=0,C=A=0,D=0,E=0,F=0,I=0,H=5*u;if(1<v.length){v.push(t);v.sort(function(a,b){return a.y-b.y});var K=!1,y=t==v[0],u=t==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(t==v[y]){u=v[y-1];y=v[y+1];A=B=C=(y.y-u.y-u.height-t.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],G=v[y+1],L=t==u||t==G,G=G.y-u.y-u.height,K=K|t==u;if(0==B&&
0==z)B=G,z=1;else if(Math.abs(B-G)<=(L||1==y&&K?q:0))z+=1;else if(1<z&&K){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!K)z=0,A=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=G)}3==v.length&&v[1]==t&&(A=0)}if(1<x.length){x.push(t);x.sort(function(a,b){return a.x-b.x});K=!1;y=t==x[0];u=t==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(t==x[y]){u=x[y-1];y=x[y+1];F=E=I=(y.x-u.x-u.width-t.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];G=x[y+1];L=t==u||t==G;G=G.x-u.x-u.width;K|=t==
u;if(0==E&&0==D)E=G,D=1;else if(Math.abs(E-G)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!K)D=0,F=E=0!=I?I:0,x.splice(0,0==y?1:y),y=-1;else break;0!=F||L||(E=F=G)}3==x.length&&x[1]==t&&(F=0)}q=function(a,b,c,d){var e=[],f;d?(d=H,f=0):(d=0,f=H);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};E=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==x.length-1){D=[];I=p.guidesArrHor;k=[];f=0;y=x[0]==t?1:0;K=x[y].y+x[y].height;if(0<F)for(y=0;y<x.length-1;y++)u=
x[y],G=x[y+1],t==u?(f=G.x-u.width-F,k.push(new mxPoint(f+u.width+H,K)),k.push(new mxPoint(G.x-H,K))):t==G?(k.push(new mxPoint(u.x+u.width+H,K)),f=u.x+u.width+F,k.push(new mxPoint(f-H,K))):(k.push(new mxPoint(u.x+u.width+H,K)),k.push(new mxPoint(G.x-H,K)));else u=x[0],y=x[2],f=u.x+u.width+(y.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+H,K)),k.push(new mxPoint(f-H,K)),k.push(new mxPoint(f+t.width+H,K)),k.push(new mxPoint(y.x-H,K));for(y=0;y<k.length;y+=2)x=k[y],F=k[y+1],x=q(x,F,null!=I?
I[y/2]:null),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=k.length/2;null!=I&&y<I.length;y++)I[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else E(!0);if(1<z&&z==v.length-1){D=[];I=p.guidesArrVer;n=[];d=0;y=v[0]==t?1:0;z=v[y].x+v[y].width;if(0<A)for(y=0;y<v.length-1;y++)u=v[y],G=v[y+1],t==u?(d=G.y-u.height-A,n.push(new mxPoint(z,d+u.height+H)),n.push(new mxPoint(z,G.y-H))):t==G?(n.push(new mxPoint(z,u.y+u.height+H)),d=u.y+u.height+A,n.push(new mxPoint(z,d-H))):(n.push(new mxPoint(z,u.y+
u.height+H)),n.push(new mxPoint(z,G.y-H)));else u=v[0],y=v[2],d=u.y+u.height+(y.y-u.y-u.height-t.height)/2,n.push(new mxPoint(z,u.y+u.height+H)),n.push(new mxPoint(z,d-H)),n.push(new mxPoint(z,d+t.height+H)),n.push(new mxPoint(z,y.y-H));for(y=0;y<n.length;y+=2)x=n[y],F=n[y+1],x=q(x,F,null!=I?I[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=n.length/2;null!=I&&y<I.length;y++)I[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else E(!1,!0)}if(k||n)return t=new mxPoint(f,d),v=a.call(this,
A.y+A.height+4||t.y+t.height+4<A.y)?v.push(A):(t.y>=A.y&&t.y<=A.y+A.height||A.y>=t.y&&A.y<=t.y+t.height)&&(t.x>A.x+A.width+4||t.x+t.width+4<A.x)&&x.push(A))}var z=0,B=0,C=A=0,D=0,E=0,F=0,H=0,I=5*u;if(1<v.length){v.push(t);v.sort(function(a,b){return a.y-b.y});var K=!1,y=t==v[0],u=t==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(t==v[y]){u=v[y-1];y=v[y+1];A=B=C=(y.y-u.y-u.height-t.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],G=v[y+1],L=t==u||t==G,G=G.y-u.y-u.height,K=K|t==u;if(0==B&&
0==z)B=G,z=1;else if(Math.abs(B-G)<=(L||1==y&&K?q:0))z+=1;else if(1<z&&K){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!K)z=0,A=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=G)}3==v.length&&v[1]==t&&(A=0)}if(1<x.length){x.push(t);x.sort(function(a,b){return a.x-b.x});K=!1;y=t==x[0];u=t==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(t==x[y]){u=x[y-1];y=x[y+1];F=E=H=(y.x-u.x-u.width-t.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];G=x[y+1];L=t==u||t==G;G=G.x-u.x-u.width;K|=t==
u;if(0==E&&0==D)E=G,D=1;else if(Math.abs(E-G)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!K)D=0,F=E=0!=H?H:0,x.splice(0,0==y?1:y),y=-1;else break;0!=F||L||(E=F=G)}3==x.length&&x[1]==t&&(F=0)}q=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};E=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==x.length-1){D=[];H=p.guidesArrHor;k=[];f=0;y=x[0]==t?1:0;K=x[y].y+x[y].height;if(0<F)for(y=0;y<x.length-1;y++)u=
x[y],G=x[y+1],t==u?(f=G.x-u.width-F,k.push(new mxPoint(f+u.width+I,K)),k.push(new mxPoint(G.x-I,K))):t==G?(k.push(new mxPoint(u.x+u.width+I,K)),f=u.x+u.width+F,k.push(new mxPoint(f-I,K))):(k.push(new mxPoint(u.x+u.width+I,K)),k.push(new mxPoint(G.x-I,K)));else u=x[0],y=x[2],f=u.x+u.width+(y.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+I,K)),k.push(new mxPoint(f-I,K)),k.push(new mxPoint(f+t.width+I,K)),k.push(new mxPoint(y.x-I,K));for(y=0;y<k.length;y+=2)x=k[y],F=k[y+1],x=q(x,F,null!=H?
H[y/2]:null),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=k.length/2;null!=H&&y<H.length;y++)H[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else E(!0);if(1<z&&z==v.length-1){D=[];H=p.guidesArrVer;n=[];d=0;y=v[0]==t?1:0;z=v[y].x+v[y].width;if(0<A)for(y=0;y<v.length-1;y++)u=v[y],G=v[y+1],t==u?(d=G.y-u.height-A,n.push(new mxPoint(z,d+u.height+I)),n.push(new mxPoint(z,G.y-I))):t==G?(n.push(new mxPoint(z,u.y+u.height+I)),d=u.y+u.height+A,n.push(new mxPoint(z,d-I))):(n.push(new mxPoint(z,u.y+
u.height+I)),n.push(new mxPoint(z,G.y-I)));else u=v[0],y=v[2],d=u.y+u.height+(y.y-u.y-u.height-t.height)/2,n.push(new mxPoint(z,u.y+u.height+I)),n.push(new mxPoint(z,d-I)),n.push(new mxPoint(z,d+t.height+I)),n.push(new mxPoint(z,y.y-I));for(y=0;y<n.length;y+=2)x=n[y],F=n[y+1],x=q(x,F,null!=H?H[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=n.length/2;null!=H&&y<H.length;y++)H[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else E(!1,!0)}if(k||n)return t=new mxPoint(f,d),v=a.call(this,
b,t,e,l),k&&!n?t.y=v.y:n&&!k&&(t.x=v.x),v.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;E(!0,!0);return a.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){e.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
c)for(l=0;l<c.length;l++)c[l].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,e=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=e){for(f=0;f<e.length;f++)e[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,e,c,b){function k(){var b=a.diagramContainer;m.style.top=b.offsetTop-l+"px";m.style.left=b.offsetLeft-l+"px";m.style.width=(c?0:b.offsetWidth)+l+"px";m.style.height=(c?b.offsetHeight:0)+l+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var l=this.RULER_THICKNESS,d=this;this.unit=e;var g="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},m=document.createElement("div");m.style.position="absolute";m.style.background=g.bkgClr;m.style[c?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;m.style.borderLeft="0.5px solid "+g.strokeClr;document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=a.refresh;a.refresh=function(b){d.editorUiRefresh.apply(a,
arguments);k()};k();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var p=n.getContext("2d");this.ui=a;var t=a.editor.graph;this.graph=t;this.container=m;this.canvas=n;var u=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
p.restore()):p.fillText(f,a,b))},q=function(){p.clearRect(0,0,n.width,n.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=g.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var a=t.view.scale,b=t.view.getBackgroundPageBounds(),e=t.view.translate,f=t.view.getGraphBounds(),k=t.pageVisible,m=k?l+(c?b.y-t.container.scrollTop:b.x-t.container.scrollLeft):l+(c?e.y-t.container.scrollTop:e.x-t.container.scrollLeft),q=0;k&&(q=c?Math.floor(((f.y+1)/a-e.y)/t.pageFormat.height)*t.pageFormat.height*
a:Math.floor(((f.x+1)/a-e.x)/t.pageFormat.width)*t.pageFormat.width*a);var D,E,F;switch(d.unit){case mxConstants.POINTS:D=F=10;E=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:F=10;D=mxConstants.PIXELS_PER_MM;E=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:F=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/F,E=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}e=D;2<=a?e=D/(2*Math.floor(a/2)):.5>=a&&(e=D*Math.floor(1/a/2)*(d.unit==mxConstants.MILLIMETERS?2:1));D=null;b=k?Math.min(m+(c?b.height:b.width),
c?n.height:n.width):c?n.height:n.width;k&&(p.fillStyle=g.outBkgClr,c?(p.fillRect(0,l,l,m-l),p.fillRect(0,b,l,n.height)):(p.fillRect(l,0,m-l,l),p.fillRect(b,0,n.width,l)));p.fillStyle=g.fontClr;for(k=k?m:m%(e*a);k<=b;k+=e*a)if(f=Math.round((k-m)/a/e),!(k<l||f==D)){D=f;var I=null;0==f%F&&(I=d.formatText(q+f*e)+"");c?u(l-E[Math.abs(f)%F],k,l,k,I):u(k,l-E[Math.abs(f)%F],k,l,I)}p.lineWidth=1;u(c?0:l,c?l:0,l,l);p.fillStyle=g.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=q;this.sizeListener=e=f(function(){var a=
c?n.height:n.width):c?n.height:n.width;k&&(p.fillStyle=g.outBkgClr,c?(p.fillRect(0,l,l,m-l),p.fillRect(0,b,l,n.height)):(p.fillRect(l,0,m-l,l),p.fillRect(b,0,n.width,l)));p.fillStyle=g.fontClr;for(k=k?m:m%(e*a);k<=b;k+=e*a)if(f=Math.round((k-m)/a/e),!(k<l||f==D)){D=f;var H=null;0==f%F&&(H=d.formatText(q+f*e)+"");c?u(l-E[Math.abs(f)%F],k,l,k,H):u(k,l-E[Math.abs(f)%F],k,l,H)}p.lineWidth=1;u(c?0:l,c?l:0,l,l);p.fillStyle=g.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=q;this.sizeListener=e=f(function(){var a=
t.container;c?(a=a.offsetHeight+l,n.height!=a&&(n.height=a,m.style.height=a+"px",q())):(a=a.offsetWidth+l,n.width!=a&&(n.width=a,m.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?t.container.scrollTop:t.container.scrollLeft;d.lastScroll!=a&&(d.lastScroll=a,q())},10);this.unitListener=function(a,b){d.setUnit(b.getProperty("unit"))};t.addListener(mxEvent.SIZE,e);t.container.addEventListener("scroll",b);t.view.addListener("unitChanged",this.unitListener);
a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){g=a;m.style.background=g.bkgClr;q()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,e,f){var k;if(c&&4<a.height||!c&&4<a.width){if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),p.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),p.putImageData(d.guidePart.imgData3,
d.guidePart.x3,d.guidePart.y3)}catch(L){}k=d.origGuideMove.apply(this,arguments);try{var m,n,q,t,v,y,x,A,G;p.lineWidth=.5;p.strokeStyle=g.guideClr;p.setLineDash([2]);c?(n=a.y+k.y+l-this.graph.container.scrollTop,m=0,v=n+a.height/2,t=l/2,A=n+a.height,x=0,q=p.getImageData(m,n-1,l,3),u(m,n,l,n),n--,y=p.getImageData(t,v-1,l,3),u(t,v,l,v),v--,G=p.getImageData(x,A-1,l,3),u(x,A,l,A),A--):(n=0,m=a.x+k.x+l-this.graph.container.scrollLeft,v=l/2,t=m+a.width/2,A=0,x=m+a.width,q=p.getImageData(m-1,n,3,l),u(m,

View file

@ -2711,6 +2711,16 @@ App.prototype.showAlert = function(message)
* @param {number} dy Y-coordinate of the translation.
*/
App.prototype.start = function()
{
if (this.bg != null && this.bg.parentNode != null)
{
this.bg.parentNode.removeChild(this.bg);
}
this.restoreLibraries();
this.spinner.stop();
try
{
// Handles all errors
var ui = this;
@ -2723,16 +2733,6 @@ App.prototype.start = function()
null, null, null, null, true);
};
if (this.bg != null && this.bg.parentNode != null)
{
this.bg.parentNode.removeChild(this.bg);
}
this.restoreLibraries();
this.spinner.stop();
try
{
// Listens to changes of the hash if not in embed or client mode
if (urlParams['client'] != '1' && urlParams['embed'] != '1')
{
@ -2907,9 +2907,9 @@ App.prototype.start = function()
{
var id = this.getDiagramId();
if (EditorUi.enableDrafts && urlParams['mode'] == null &&
this.getServiceName() == 'draw.io' &&
(id == null || id.length == 0))
if (EditorUi.enableDrafts && (urlParams['mode'] == null || EditorUi.isElectronApp) &&
this.getServiceName() == 'draw.io' && (id == null || id.length == 0))
{
this.checkDrafts();
}
@ -2934,6 +2934,10 @@ App.prototype.start = function()
}
}));
}
else if (urlParams['splash'] != '0')
{
this.loadFile();
}
else
{
this.createFile(this.defaultFilename, this.getFileData(), null, null, null, null, null, true);
@ -3206,13 +3210,13 @@ App.prototype.checkDrafts = function()
}), null, null, null, (drafts.length > 1) ? drafts : null);
this.showDialog(dlg.container, 640, 480, true, false, mxUtils.bind(this, function(cancel)
{
if (urlParams['splash'] == '0')
if (urlParams['splash'] != '0')
{
this.createFile(this.defaultFilename, this.getFileData(), null, null, null, null, null, true);
this.loadFile();
}
else
{
this.loadFile();
this.createFile(this.defaultFilename, this.getFileData(), null, null, null, null, null, true);
}
}));
dlg.init();
@ -3252,13 +3256,13 @@ App.prototype.checkDrafts = function()
*/
App.prototype.showSplash = function(force)
{
var serviceCount = this.getServiceCount(true, true);
var serviceCount = this.getServiceCount(true);
var showSecondDialog = mxUtils.bind(this, function()
{
var dlg = new SplashDialog(this);
this.showDialog(dlg.container, 340, (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp) ? 200 : 260, true, true,
this.showDialog(dlg.container, 340, (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp) ? 200 : 230, true, true,
mxUtils.bind(this, function(cancel)
{
// Creates a blank diagram if the dialog is closed
@ -3273,7 +3277,7 @@ App.prototype.showSplash = function(force)
if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && !this.isOfflineApp() &&
!mxClient.IS_ANDROID && !mxClient.IS_IOS &&
(this.mode == App.MODE_DEVICE || this.mode == App.MODE_BROWSER))
this.mode == App.MODE_DEVICE)
{
this.showDownloadDesktopBanner();
}
@ -3297,8 +3301,8 @@ App.prototype.showSplash = function(force)
showSecondDialog();
}), rowLimit);
this.showDialog(dlg.container, (rowLimit < 3) ? 260 : 320,
(serviceCount >= 4) ? 440 : ((this.isOfflineApp()) ? 300 : 320), true, false);
this.showDialog(dlg.container, (rowLimit < 3) ? 200 : 300,
((serviceCount > 3) ? 320 : 210), true, false);
dlg.init();
}
else if (urlParams['create'] == null)
@ -3435,12 +3439,32 @@ App.prototype.loadFileSystemEntry = function(fileHandle, success, error)
App.prototype.createFileSystemOptions = function(name)
{
var ext = [];
var temp = null;
if (name != null)
{
var idx = name.lastIndexOf('.');
if (idx > 0)
{
temp = name.substring(idx + 1);
}
}
for (var i = 0; i < this.editor.diagramFileTypes.length; i++)
{
ext.push({description: mxResources.get(this.editor.diagramFileTypes[i].description) +
var obj = {description: mxResources.get(this.editor.diagramFileTypes[i].description) +
((mxClient.IS_MAC) ? ' (.' + this.editor.diagramFileTypes[i].extension + ')' : ''),
extensions: [this.editor.diagramFileTypes[i].extension]});
extensions: [this.editor.diagramFileTypes[i].extension]};
if (this.editor.diagramFileTypes[i].extension == temp)
{
ext.splice(0, 0, obj);
}
else
{
ext.push(obj);
}
}
// TODO: Specify default filename

View file

@ -13,44 +13,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
div.style.paddingTop = '0px';
div.style.paddingBottom = '20px';
var elt = editorUi.addLanguageMenu(div, true);
var bottom = '28px';
if (elt != null)
{
elt.style.bottom = parseInt(bottom) - 3 + 'px';
}
if (!editorUi.isOffline() && editorUi.getServiceCount() > 1)
{
var help = document.createElement('a');
help.setAttribute('href', 'https://about.draw.io/support/');
help.setAttribute('title', mxResources.get('help'));
help.setAttribute('target', '_blank');
help.style.position = 'absolute';
help.style.userSelect = 'none';
help.style.textDecoration = 'none';
help.style.cursor = 'pointer';
help.style.fontSize = '12px';
help.style.bottom = bottom;
help.style.left = '26px';
help.style.color = 'gray';
var icon = document.createElement('img');
mxUtils.setOpacity(icon, 50);
icon.style.height = '16px';
icon.style.width = '16px';
icon.setAttribute('border', '0');
icon.setAttribute('valign', 'bottom');
icon.setAttribute('src', Editor.helpImage);
icon.style.marginRight = '2px';
help.appendChild(icon);
mxUtils.write(help, mxResources.get('help'));
div.appendChild(help);
}
this.init = function()
{
if (mxClient.IS_QUIRKS || document.documentMode == 8)
@ -60,6 +22,9 @@ var StorageDialog = function(editorUi, fn, rowLimit)
};
var buttons = document.createElement('div');
buttons.style.border = '1px solid #d3d3d3';
buttons.style.borderWidth = '1px 0px 1px 0px';
buttons.style.padding = '10px 0px 20px 0px';
if (mxClient.IS_QUIRKS)
{
@ -67,19 +32,11 @@ var StorageDialog = function(editorUi, fn, rowLimit)
buttons.style.cssFloat = 'left';
}
buttons.style.border = '1px solid #d3d3d3';
buttons.style.borderWidth = '1px 0px 1px 0px';
buttons.style.padding = '12px 0px 12px 0px';
var cb = document.createElement('input');
cb.setAttribute('type', 'checkbox');
cb.setAttribute('checked', 'checked');
cb.defaultChecked = true;
var count = 0;
var container = document.createElement('div');
container.style.paddingTop = '2px';
buttons.appendChild(container);
var p3 = document.createElement('p');
function addLogo(img, title, mode, clientName, labels, clientFn)
@ -98,10 +55,11 @@ var StorageDialog = function(editorUi, fn, rowLimit)
button.style.fontSize = '11px';
button.style.position = 'relative';
button.style.margin = '4px';
button.style.marginTop = '2px';
button.style.padding = '8px 10px 12px 10px';
button.style.marginTop = '8px';
button.style.marginBottom = '0px';
button.style.padding = '8px 10px 8px 10px';
button.style.width = '88px';
button.style.height = (StorageDialog.extended) ? '50px' : '100px';
button.style.height = '100px';
button.style.whiteSpace = 'nowrap';
button.setAttribute('title', title);
@ -115,6 +73,12 @@ var StorageDialog = function(editorUi, fn, rowLimit)
var label = document.createElement('div');
label.style.textOverflow = 'ellipsis';
label.style.overflow = 'hidden';
label.style.position = 'absolute';
label.style.bottom = '8px';
label.style.left = '0px';
label.style.right = '0px';
mxUtils.write(label, title);
button.appendChild(label);
if (img != null)
{
@ -122,9 +86,9 @@ var StorageDialog = function(editorUi, fn, rowLimit)
logo.setAttribute('src', img);
logo.setAttribute('border', '0');
logo.setAttribute('align', 'absmiddle');
logo.style.width = (StorageDialog.extended) ? '24px' : '60px';
logo.style.height = (StorageDialog.extended) ? '24px' : '60px';
logo.style.paddingBottom = (StorageDialog.extended) ? '4px' : '6px';
logo.style.width = '60px';
logo.style.height = '60px';
logo.style.paddingBottom = '6px';
button.appendChild(logo);
}
@ -146,24 +110,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
}
}
if (StorageDialog.extended)
{
button.style.paddingTop = '4px';
button.style.marginBottom = '0px';
label.display = 'inline-block';
if (rowLimit == 2)
{
logo.style.width = '38px';
logo.style.height = '38px';
button.style.width = '80px';
button.style.height = '68px';
}
}
button.appendChild(label);
mxUtils.write(label, title);
if (labels != null)
{
for (var i = 0; i < labels.length; i++)
@ -188,7 +134,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
editorUi.drive.checkToken(mxUtils.bind(this, function()
{
editorUi.spinner.stop();
editorUi.setMode(mode, cb.checked);
editorUi.setMode(mode, true);
fn();
}));
}
@ -198,13 +144,13 @@ var StorageDialog = function(editorUi, fn, rowLimit)
editorUi.oneDrive.checkToken(mxUtils.bind(this, function()
{
editorUi.spinner.stop();
editorUi.setMode(mode, cb.checked);
editorUi.setMode(mode, true);
fn();
}));
}
else
{
editorUi.setMode(mode, cb.checked);
editorUi.setMode(mode, true);
fn();
}
});
@ -269,12 +215,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
};
var hd = document.createElement('p');
hd.style.fontSize = '16pt';
hd.style.padding = '0px';
hd.style.paddingTop = '4px';
hd.style.paddingBottom = '16px';
hd.style.margin = '0px';
hd.style.color = 'gray';
hd.style.cssText = 'font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;';
mxUtils.write(hd, mxResources.get('saveDiagramsTo') + ':');
div.appendChild(hd);
@ -299,8 +240,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
addLogo(IMAGE_PATH + '/osa_database.png', mxResources.get('browser'), App.MODE_BROWSER);
}
if (StorageDialog.extended)
{
if (typeof window.DropboxClient === 'function')
{
addLogo(IMAGE_PATH + '/dropbox-logo.svg', mxResources.get('dropbox'), App.MODE_DROPBOX, 'dropbox');
@ -315,188 +254,26 @@ var StorageDialog = function(editorUi, fn, rowLimit)
{
addLogo(IMAGE_PATH + '/gitlab-logo.svg', mxResources.get('gitlab'), App.MODE_GITLAB, 'gitLab');
}
}
};
div.appendChild(buttons);
addButtons();
var p2 = document.createElement('p');
p2.style.marginTop = '8px';
p2.style.marginBottom = '6px';
var later = document.createElement('span');
later.style.cssText = 'position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;';
mxUtils.setPrefixedStyle(later.style, 'transform', 'translate(-50%,0)');
mxUtils.write(later, mxResources.get('decideLater'));
var temp = document.createElement('div');
temp.style.marginBottom = '10px';
if (!editorUi.isOfflineApp())
{
var showMore = document.createElement('a');
showMore.style.color = 'gray';
showMore.style.cursor = 'pointer';
showMore.style.userSelect = 'none';
mxUtils.write(showMore, ((StorageDialog.extended) ? mxResources.get('showLess') : mxResources.get('showMore')) + '...');
temp.appendChild(showMore);
p2.appendChild(temp);
mxEvent.addListener(showMore, 'click', function(evt)
{
container.innerHTML = '';
showMore.innerHTML = '';
StorageDialog.extended = !StorageDialog.extended;
addButtons();
mxUtils.write(showMore, ((StorageDialog.extended) ? mxResources.get('showLess') : mxResources.get('showMore')) + '...');
mxEvent.consume(evt);
});
}
var demo = document.createElement('div');
demo.style.cursor = 'pointer';
demo.style.color = 'gray';
demo.style.userSelect = 'none';
mxUtils.write(demo, mxResources.get('import') + ': ' + mxResources.get('gliffy') + ', ' +
mxResources.get('formatVssx') + ', ' + mxResources.get('formatVsdx') + ', ' +
mxResources.get('lucidchart') + '...');
mxEvent.addListener(demo, 'click', function()
{
if (editorUi.storageFileInputElt == null)
{
var input = document.createElement('input');
input.setAttribute('type', 'file');
mxEvent.addListener(input, 'change', function()
{
if (input.files != null)
{
// Using null for position will disable crop of input file
editorUi.hideDialog();
editorUi.openFiles(input.files, true);
// Resets input to force change event for same file (type reset required for IE)
input.type = '';
input.type = 'file';
input.value = '';
}
});
input.style.display = 'none';
document.body.appendChild(input);
editorUi.storageFileInputElt = input;
}
editorUi.storageFileInputElt.click();
});
p2.appendChild(demo);
var recent = editorUi.getRecent();
if (!editorUi.isOfflineApp() && recent != null && recent.length > 0)
{
var recentSelect = document.createElement('select');
recentSelect.style.marginTop = '12px';
recentSelect.style.maxWidth = '170px';
var titleOption = document.createElement('option');
titleOption.setAttribute('value', '');
titleOption.setAttribute('selected', 'selected');
titleOption.style.textAlign = 'center';
mxUtils.write(titleOption, mxResources.get('openRecent') + '...');
recentSelect.appendChild(titleOption);
for (var i = 0; i < recent.length; i++)
{
(function(entry)
{
var modeKey = entry.mode;
// Google and oneDrive use different keys
if (modeKey == App.MODE_GOOGLE)
{
modeKey = 'googleDrive';
}
else if (modeKey == App.MODE_ONEDRIVE)
{
modeKey = 'oneDrive';
}
var entryOption = document.createElement('option');
entryOption.setAttribute('value', entry.id);
mxUtils.write(entryOption, entry.title + ' (' + mxResources.get(modeKey) + ')');
recentSelect.appendChild(entryOption);
})(recent[i]);
}
p2.appendChild(recentSelect);
mxEvent.addListener(recentSelect, 'change', function(evt)
{
if (recentSelect.value != '')
{
editorUi.loadFile(recentSelect.value);
}
});
}
else
{
p2.style.marginTop = '20px';
buttons.style.padding = '30px 0px 26px 0px';
}
if (Graph.fileSupport)
{
var temp = document.createElement('div');
temp.style.marginBottom = '10px';
temp.style.padding = '18px 0px 6px 0px';
var link = document.createElement('a');
link.style.cursor = 'pointer';
link.style.color = 'gray';
link.style.userSelect = 'none';
mxUtils.write(link, mxResources.get('decideLater'));
mxEvent.addListener(link, 'click', function()
mxEvent.addListener(later, 'click', function()
{
editorUi.hideDialog();
var prev = Editor.useLocalStorage;
editorUi.createFile(editorUi.defaultFilename, null, null, null, null, null, null, true);
editorUi.createFile(editorUi.defaultFilename,
null, null, null, null, null, null, true);
Editor.useLocalStorage = prev;
});
temp.appendChild(link);
p2.appendChild(temp);
buttons.style.paddingBottom = '4px';
}
buttons.appendChild(p2);
var temp = document.createElement('div');
temp.style.position = 'absolute';
temp.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
temp.style.cursor = 'pointer';
temp.style.fontSize = '12px';
temp.style.bottom = '27px';
temp.style.left = '0px';
temp.style.right = '0px';
temp.style.color = 'gray';
temp.style.userSelect = 'none';
cb.setAttribute('id', 'geRememberSettingCheckbox');
cb.style.marginRight = '6px';
cb.style.cursor = 'inherit';
temp.appendChild(cb);
var label = document.createElement('label');
label.setAttribute('for', 'geRememberSettingCheckbox');
mxUtils.write(label, mxResources.get('rememberThisSetting'));
label.style.cursor = 'inherit';
temp.appendChild(label);
mxUtils.setPrefixedStyle(temp.style, 'transform', 'translate(-50%,0)');
temp.style.left = '50%';
div.appendChild(temp);
div.appendChild(later);
// Checks if Google Drive is missing after a 5 sec delay
if (mxClient.IS_SVG && isLocalStorage && urlParams['gapi'] != '0' &&
@ -511,10 +288,10 @@ var StorageDialog = function(editorUi, fn, rowLimit)
p3.style.padding = '7px';
p3.style.fontSize = '9pt';
p3.style.marginTop = '-14px';
p3.innerHTML = '<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" ' +
p3.innerHTML = '<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" ' +
'href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank">' +
'<img border="0" src="' + mxGraph.prototype.warningImage.src + '" align="top"> ' +
mxResources.get('googleDriveMissingClickHere') + '</a>';
'<img border="0" src="' + mxGraph.prototype.warningImage.src + '" align="absmiddle" ' +
'style="margin-top:-4px"> ' + mxResources.get('googleDriveMissingClickHere') + '</a>';
div.appendChild(p3);
}
}, 5000);
@ -523,11 +300,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
this.container = div;
};
/**
*
*/
StorageDialog.extended = false;
/**
* Constructs a dialog for creating new files from templates.
*/
@ -536,59 +308,28 @@ var SplashDialog = function(editorUi)
var div = document.createElement('div');
div.style.textAlign = 'center';
if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
{
var elt = editorUi.addLanguageMenu(div, true);
if (elt != null)
{
elt.style.bottom = '19px';
}
var help = null;
var serviceCount = editorUi.getServiceCount();
if (!editorUi.isOffline() && serviceCount > 1)
{
help = document.createElement('a');
help.setAttribute('href', 'https://about.draw.io/support/');
help.setAttribute('title', mxResources.get('help'));
help.setAttribute('target', '_blank');
help.style.position = 'absolute';
help.style.fontSize = '12px';
help.style.textDecoration = 'none';
help.style.cursor = 'pointer';
help.style.bottom = '22px';
help.style.left = '26px';
help.style.color = 'gray';
var icon = document.createElement('img');
mxUtils.setOpacity(icon, 50);
icon.style.height = '16px';
icon.style.width = '16px';
icon.setAttribute('border', '0');
icon.setAttribute('valign', 'bottom');
icon.setAttribute('src', Editor.helpImage);
icon.style.marginRight = '2px';
help.appendChild(icon);
mxUtils.write(help, mxResources.get('help'));
div.appendChild(help);
}
var hd = document.createElement('p');
hd.style.fontSize = '16pt';
hd.style.padding = '0px';
hd.style.paddingTop = '2px';
hd.style.margin = '0px';
hd.style.color = 'gray';
var serviceCount = editorUi.getServiceCount();
var logo = document.createElement('img');
logo.setAttribute('border', '0');
logo.setAttribute('align', 'absmiddle');
logo.style.width = '40px';
logo.style.height = '40px';
logo.style.marginRight = '12px';
logo.style.paddingBottom = '4px';
logo.style.width = '32px';
logo.style.height = '32px';
logo.style.marginRight = '8px';
logo.style.marginTop = '-4px';
var buttons = document.createElement('div');
buttons.style.margin = '8px 0px 0px 0px';
buttons.style.padding = '18px 0px 24px 0px';
var service = '';
@ -630,27 +371,60 @@ var SplashDialog = function(editorUi)
else
{
logo.src = IMAGE_PATH + '/osa_drive-harddisk.png';
buttons.style.paddingBottom = '10px';
buttons.style.paddingTop = '30px';
service = mxResources.get('device');
}
var buttons = document.createElement('div');
buttons.style.margin = '4px 0px 0px 0px';
var btn = document.createElement('button');
btn.className = 'geBigButton';
btn.style.marginBottom = '8px';
btn.style.fontSize = '18px';
btn.style.padding = '10px';
btn.style.width = '340px';
if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp)
{
hd.appendChild(logo);
mxUtils.write(hd, service);
div.appendChild(hd);
buttons.style.border = '1px solid #d3d3d3';
buttons.style.borderWidth = '1px 0px 1px 0px';
buttons.style.padding = '18px 0px 24px 0px';
btn.style.marginBottom = '8px';
var table = document.createElement('table');
var tbody = document.createElement('tbody');
var row = document.createElement('tr');
var left = document.createElement('td');
var right = document.createElement('td');
table.setAttribute('align', 'center');
left.appendChild(logo);
var title = document.createElement('div');
title.style.fontSize = '22px';
title.style.paddingBottom = '6px';
title.style.color = 'gray';
mxUtils.write(title, service);
right.style.textAlign = 'left';
right.appendChild(title);
row.appendChild(left);
row.appendChild(right);
tbody.appendChild(row);
table.appendChild(tbody);
div.appendChild(table);
var change = document.createElement('span');
change.style.cssText = 'position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;';
mxUtils.setPrefixedStyle(change.style, 'transform', 'translate(-50%,0)');
mxUtils.write(change, mxResources.get('changeStorage'));
mxEvent.addListener(change, 'click', function()
{
editorUi.hideDialog(false);
editorUi.setMode(null);
editorUi.clearMode();
editorUi.showSplash(true);
});
div.appendChild(change);
}
else
{
@ -738,8 +512,6 @@ var SplashDialog = function(editorUi)
if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp)
{
var driveUsers = (editorUi.drive != null) ? editorUi.drive.getUsersList() : [];
function addLogout(logout)
{
btn.style.marginBottom = '24px';
@ -766,7 +538,11 @@ var SplashDialog = function(editorUi)
buttons.appendChild(link);
};
if (editorUi.mode == App.MODE_GOOGLE && driveUsers.length > 0)
if (editorUi.mode == App.MODE_GOOGLE && editorUi.drive != null)
{
var driveUsers =editorUi.drive.getUsersList();
if (driveUsers.length > 0)
{
var title = document.createElement('span');
title.style.marginTop = '6px';
@ -775,12 +551,11 @@ var SplashDialog = function(editorUi)
// Makes room after last big buttons
btn.style.marginBottom = '16px';
buttons.style.paddingBottom = '18px';
buttons.appendChild(title);
var usersSelect = document.createElement('select');
usersSelect.style.marginLeft = '4px';
usersSelect.style.width = '200px';
usersSelect.style.width = '140px';
for (var i = 0; i < driveUsers.length; i++)
{
@ -829,6 +604,14 @@ var SplashDialog = function(editorUi)
buttons.appendChild(usersSelect);
}
else
{
addLogout(function()
{
editorUi.drive.logout();
});
}
}
else if (editorUi.mode == App.MODE_ONEDRIVE && editorUi.oneDrive != null)
{
addLogout(function()
@ -871,56 +654,6 @@ var SplashDialog = function(editorUi)
editorUi.openLink('https://www.dropbox.com/logout');
});
}
mxUtils.br(buttons);
var link = document.createElement('a');
link.style.display = 'inline-block';
link.style.color = 'gray';
link.style.cursor = 'pointer';
link.style.marginTop = '8px';
mxUtils.write(link, mxResources.get('changeStorage'));
mxEvent.addListener(link, 'click', function()
{
editorUi.hideDialog(false);
editorUi.setMode(null);
editorUi.clearMode();
editorUi.showSplash(true);
});
buttons.appendChild(link);
}
if (isLocalStorage)
{
var temp = document.createElement('div');
temp.style.position = 'absolute';
temp.style.cursor = 'pointer';
temp.style.fontSize = '12px';
temp.style.bottom = '22px';
temp.style.left = '0px';
temp.style.right = '0px';
temp.style.color = 'gray';
temp.style.userSelect = 'none';
var chk = document.createElement('input');
chk.setAttribute('type', 'checkbox');
chk.setAttribute('id', 'geDoNotShowAgainCheckbox');
chk.style.marginRight = '6px';
temp.appendChild(chk);
var label = document.createElement('label');
label.setAttribute('for', 'geDoNotShowAgainCheckbox');
mxUtils.write(label, mxResources.get('doNotShowAgain'));
temp.appendChild(label);
mxEvent.addListener(chk, 'click', function()
{
mxSettings.setShowStartScreen(!chk.checked);
mxSettings.save();
});
div.appendChild(temp);
}
div.appendChild(buttons);
@ -999,7 +732,7 @@ var EmbedDialog = function(editorUi, result, timeout, ignoreSize, previewFn, tit
else
{
text.setAttribute('readonly', 'true');
text.value = result.substring(0, 340) + '... (' + mxResources.get('drawingTooLarge') + ')';
text.value = mxResources.get('tooLargeUseDownload');
}
}, 0);
};

View file

@ -1516,7 +1516,7 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
' (' + mxUtils.htmlEntities(err.message) + ')</div>');
}
if (EditorUi.enableDrafts && this.getMode() == null)
if (EditorUi.enableDrafts && (this.getMode() == null || EditorUi.isElectronApp))
{
if (this.saveDraftThread != null)
{

View file

@ -87,8 +87,8 @@
/**
* Specifies if drafts should be saved in IndexedDB.
*/
EditorUi.enableDrafts = !mxClient.IS_CHROMEAPP && isLocalStorage &&
!EditorUi.isElectronApp && urlParams['drafts'] != '0';
EditorUi.enableDrafts = !mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
isLocalStorage && urlParams['drafts'] != '0';
/**
* Link for scratchpad help.
@ -12504,7 +12504,7 @@
/**
* Returns the number of storage options enabled
*/
EditorUi.prototype.getServiceCount = function(allowBrowser, splash)
EditorUi.prototype.getServiceCount = function(allowBrowser)
{
var serviceCount = 1;
@ -12513,7 +12513,7 @@
serviceCount++
}
if (!splash && (this.dropbox != null || typeof window.DropboxClient === 'function'))
if (this.dropbox != null || typeof window.DropboxClient === 'function')
{
serviceCount++
}
@ -12523,17 +12523,17 @@
serviceCount++
}
if (!splash && (this.gitHub != null))
if (this.gitHub != null)
{
serviceCount++
}
if (!splash && (this.gitLab != null))
if (this.gitLab != null)
{
serviceCount++
}
if (splash && allowBrowser && isLocalStorage && urlParams['browser'] == '1')
if (allowBrowser && isLocalStorage && urlParams['browser'] == '1')
{
serviceCount++
}

View file

@ -902,7 +902,7 @@ mxStencilRegistry.allowEval = false;
var paths = dialog.showOpenDialogSync({
defaultPath: lastDir || getDocumentsFolder(),
filters: [
{ name: 'draw.io Diagrams', extensions: ['drawio', 'xml'] },
{ name: 'draw.io Diagrams', extensions: ['drawio', 'xml', 'png', 'svg', 'html'] },
{ name: 'VSDX Documents', extensions: ['vsdx'] },
{ name: 'All Files', extensions: ['*'] }
],
@ -1355,8 +1355,24 @@ mxStencilRegistry.allowEval = false;
var dialog = remote.dialog;
const sysPath = require('path')
var lastDir = localStorage.getItem('.lastSaveDir');
var name = this.getFilename();
var ext = null;
var path = dialog.showSaveDialogSync({defaultPath: (lastDir || getDocumentsFolder()) + '/' + this.getFilename()});
if (name != null)
{
var idx = name.lastIndexOf('.');
if (idx > 0)
{
ext = name.substring(idx + 1);
name = name.substring(0, idx);
}
}
var path = dialog.showSaveDialogSync({
defaultPath: (lastDir || getDocumentsFolder()) + '/' + name,
filters: this.ui.createFileSystemFilters(ext)
});
if (path != null)
{
@ -1386,16 +1402,24 @@ mxStencilRegistry.allowEval = false;
var dialog = remote.dialog;
const sysPath = require('path')
var lastDir = localStorage.getItem('.lastSaveDir');
var name = this.getFilename();
var ext = null;
if (name == '' && this.fileObject != null && this.fileObject.name != null)
{
name = this.fileObject.name;
var idx = name.lastIndexOf('.');
if (idx > 0)
{
ext = name.substring(idx + 1);
name = name.substring(0, idx);
}
}
var path = dialog.showSaveDialogSync({
defaultPath: (lastDir || getDocumentsFolder()) + '/' + this.getFilename(),
filters: [
{ name: 'XML File (.drawio)', extensions: ['drawio'] },
{ name: 'Editable Bitmap Image (.png)', extensions: ['png'] },
{ name: 'Editable Vector Image (.svg)', extensions: ['svg'] },
{ name: 'HTML File (.html)', extensions: ['html'] },
{ name: 'XML File (.xml)', extensions: ['xml'] }
]
defaultPath: (lastDir || getDocumentsFolder()) + '/' + name,
filters: this.ui.createFileSystemFilters(ext)
});
if (path != null)
@ -1410,6 +1434,35 @@ mxStencilRegistry.allowEval = false;
}
};
/**
* Loads the given file handle as a local file.
*/
App.prototype.createFileSystemFilters = function(defaultExt)
{
var ext = [];
for (var i = 0; i < this.editor.diagramFileTypes.length; i++)
{
var obj = {name: mxResources.get(this.editor.diagramFileTypes[i].description) +
' (.' + this.editor.diagramFileTypes[i].extension + ')',
extensions: [this.editor.diagramFileTypes[i].extension]};
if (this.editor.diagramFileTypes[i].extension == defaultExt)
{
ext.splice(0, 0, obj);
}
else
{
ext.push(obj);
}
}
return ext;
};
/**
* Loads the given file handle as a local file.
*/
App.prototype.saveFile = function(forceDialog)
{
var file = this.getCurrentFile();
@ -1420,6 +1473,11 @@ mxStencilRegistry.allowEval = false;
{
file.save(true, mxUtils.bind(this, function()
{
if (EditorUi.enableDrafts)
{
file.removeDraft();
}
file.handleFileSuccess(true);
}), mxUtils.bind(this, function(err)
{
@ -1430,6 +1488,11 @@ mxStencilRegistry.allowEval = false;
{
file.saveAs(null, mxUtils.bind(this, function()
{
if (EditorUi.enableDrafts)
{
file.removeDraft();
}
file.handleFileSuccess(true);
}), mxUtils.bind(this, function(err)
{
@ -1441,9 +1504,6 @@ mxStencilRegistry.allowEval = false;
/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
App.prototype.saveLibrary = function(name, images, file, mode, noSpin, noReload, fn)
{

View file

@ -483,7 +483,7 @@
action.isEnabled = isGraphEnabled;
}
if (isLocalStorage || mxClient.IS_CHROMEAPP)
if (isLocalStorage)
{
var action = editorUi.actions.addAction('showStartScreen', function()
{

View file

@ -1258,9 +1258,12 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback)
var div = document.createElement('div');
var style = (source != null) ? graph.copyStyle(source) : null;
// Do not place entry under pointer for touch devices
var off = 4;
div.className = 'geToolbarContainer geSidebarContainer geSidebar';
div.style.cssText = 'position:absolute;left:' + (x - 22) + 'px;top:' +
(y - 22) + 'px;width:140px;border-radius:10px;padding:4px;text-align:center;' +
div.style.cssText = 'position:absolute;left:' + (x - off) + 'px;top:' +
(y - off) + 'px;width:140px;border-radius:10px;padding:4px;text-align:center;' +
'box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;';
if (graph.background != null && graph.background != mxConstants.NONE)
@ -1283,8 +1286,11 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback)
{
this.sidebar.graph.pasteStyle(style, [cell]);
}
else
{
ui.insertHandler([cell], cell.value != '', this.sidebar.graph.model);
}
this.sidebar.createThumb([cell], 25, 25, node, null, true, false, cell.geometry.width, cell.geometry.height);
mxEvent.addListener(node, 'click', function()
@ -2699,7 +2705,8 @@ EditorUi.prototype.isPagesEnabled = function()
*/
EditorUi.prototype.createTemporaryGraph = function(stylesheet)
{
var graph = new Graph(document.createElement('div'), null, null, stylesheet);
var graph = new Graph(document.createElement('div'));
graph.stylesheet.styles = mxUtils.clone(stylesheet.styles);
graph.resetViewOnRootChange = false;
graph.setConnectable(false);
graph.gridEnabled = false;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=‫إلى الخلف‬
toFront=‫إلى الأمام‬
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=‫تلميحات‬
top=‫أعلى‬

View file

@ -721,6 +721,7 @@ title=Заглавие
to=до
toBack=Назад
toFront=Напред
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Подсказки
top=Отгоре

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Naslov
to=do
toBack=Nazad
toFront=Ispred
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Opis alatki
top=Vrh

View file

@ -721,6 +721,7 @@ title=Títol
to=a
toBack=Vés enrere
toFront=Vés endavant
tooLargeUseDownload=Too large, use download instead.
toolbar=Barra d'eines
tooltips=Consells d'eines
top=Dalt

View file

@ -721,6 +721,7 @@ title=Nadpis
to=až
toBack=Do pozadí
toFront=Do popředí
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Popis nástrojů
top=Horní

View file

@ -721,6 +721,7 @@ title=Titel
to=til
toBack=Placer bagest
toFront=Placer forrest
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Øverst

View file

@ -721,6 +721,7 @@ title=Titel
to=bis
toBack=Nach hinten
toFront=Nach vorne
tooLargeUseDownload=Zu gross, bitte herunterladen.
toolbar=Symbolleiste
tooltips=Tooltips
top=Oben

View file

@ -721,6 +721,7 @@ title=Τίτλος
to=έως
toBack=Πίσω
toFront=Μπροστά
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Βοήθεια εργαλείων
top=Κορυφή

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Título
to=a
toBack=Hacia atrás
toFront=Hacia adelante
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Información de la herramienta
top=Arriba

View file

@ -721,6 +721,7 @@ title=Pealkiri
to=kuni
toBack=Taha
toFront=Ette
tooLargeUseDownload=Too large, use download instead.
toolbar=Tööriistariba
tooltips=Kohtspikker
top=Üles

View file

@ -721,6 +721,7 @@ title=Izenburua
to=to
toBack=Atzekaldera
toFront=Aurrekaldera
tooLargeUseDownload=Too large, use download instead.
toolbar=Tresna-barra
tooltips=Argibideak
top=Top

View file

@ -721,6 +721,7 @@ title=‫عنوان‬
to=‫به‬
toBack=‫به عقب‬
toFront=‫به جلو‬
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=‫جعبه نکات‬
top=‫بالا‬

View file

@ -721,6 +721,7 @@ title=Otsikko
to=asti
toBack=Taakse
toFront=Eteen
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Työkaluvihjeet
top=Ylös

View file

@ -721,6 +721,7 @@ title=Pamagat
to=sa
toBack=Papunta sa likod
toFront=Papunta sa harap
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Itaas

View file

@ -721,6 +721,7 @@ title=Titre
to=à
toBack=Placer en dessous
toFront=Placer au-dessus
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Bulle d'information
top=En haut

View file

@ -721,6 +721,7 @@ title=Título
to=cara
toBack=Cara Atrás
toFront=Cara Adiante
tooLargeUseDownload=Too large, use download instead.
toolbar=Barra de ferramentas
tooltips=Axuda de ferramentas
top=Enriba

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=‫כותרת‬
to=‫ל‬
toBack=‫לאחור‬
toFront=‫לפנים‬
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=‫טיפים‬
top=‫למעלה‬

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Cím
to=to
toBack=Hátra küld
toFront=Előre hoz
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Helyi súgók
top=Felső

View file

@ -721,6 +721,7 @@ title=title
to=to
toBack=toBack
toFront=toFront
tooLargeUseDownload=tooLargeUseDownload
toolbar=toolbar
tooltips=tooltips
top=top

View file

@ -721,6 +721,7 @@ title=Judul
to=ke
toBack=Ke Belakang
toFront=Ke Depan
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltip
top=Atas

View file

@ -721,6 +721,7 @@ title=Titolo
to=A
toBack=Porta dietro
toFront=Porta davanti
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Strumento di informazione
top=In alto

View file

@ -721,6 +721,7 @@ title=タイトル
to=から
toBack=背面に移動
toFront=前面に移動
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=ツールチップ
top=上

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=제목
to=로
toBack=뒤로
toFront=앞으로
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=말풍선
top=위쪽

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Tajuk
to=ke
toBack=Ke Belakang
toFront=Ke Depan
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Petua-petua alat
top=Atas

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Titel
to=tot
toBack=Naar achteren
toFront=Naar voren
tooLargeUseDownload=Too large, use download instead.
toolbar=Gereedschapsbalk
tooltips=Tooltips
top=Boven

View file

@ -721,6 +721,7 @@ title=Tittel
to=til
toBack=Plasser bakerst
toFront=Plasser foran
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Verktøytips
top=Topp

View file

@ -721,6 +721,7 @@ title=Tytuł
to=do
toBack=Do tyłu
toFront=Do przodu
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Dymki podpowiedzi
top=Góra

View file

@ -721,6 +721,7 @@ title=Título
to=Para
toBack=Para trás 
toFront=Para a frente 
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Dicas da ferramenta
top=Topo

View file

@ -721,6 +721,7 @@ title=Título
to=Para
toBack=Para trás 
toFront=Para a frente 
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Dicas de ferramenta
top=Topo

View file

@ -721,6 +721,7 @@ title=Titlu
to=către
toBack=Înapoi
toFront=Înainte
tooLargeUseDownload=Too large, use download instead.
toolbar=Unelte
tooltips=Sfaturi pentru folosirea instrumentelor
top=Sus

View file

@ -721,6 +721,7 @@ title=Название
to=по
toBack=На задний план
toFront=На передний план
tooLargeUseDownload=Too large, use download instead.
toolbar=Панель инструментов
tooltips=Подсказки
top=Сверху

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=do
toBack=Postavi iza
toFront=Postavi ispred
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Opisi alatki
top=Vrh

View file

@ -721,6 +721,7 @@ title=Titel
to=till
toBack=Lägg underst
toFront=Lägg överst
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Verktygstips
top=Överst

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=Title
to=to
toBack=To Back
toFront=To Front
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Tooltips
top=Top

View file

@ -721,6 +721,7 @@ title=ชื่อเรื่อง
to=ไปยัง
toBack=ไปยังด้านหลัง
toFront=ไปยังด้านหน้า
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=กล่องข้อความช่วยเหลือ
top=บนสุด

View file

@ -721,6 +721,7 @@ title=Başlık
to=...a
toBack=Geriye
toFront=İleriye
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Araç ipuçları
top=Üst

View file

@ -721,6 +721,7 @@ title=Заголовок
to=to
toBack=На задній план
toFront=На передній план
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Підказки
top=Верх

View file

@ -721,6 +721,7 @@ title=Tiêu đề
to=đến
toBack=Về sau
toFront=Tới trước
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=Chú giải
top=Trên cùng

View file

@ -721,6 +721,7 @@ title=標題
to=至
toBack=移至最後
toFront=移至最前
tooLargeUseDownload=Too large, use download instead.
toolbar=Toolbar
tooltips=提示
top=上

View file

@ -721,6 +721,7 @@ title=标题
to=至
toBack=移至最后
toFront=移至最前
tooLargeUseDownload=Too large, use download instead.
toolbar=工具栏
tooltips=提示
top=上

View file

@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
"revision": "11cff84625b1ac0ec2f4f4460e9cc44e"
"revision": "4bbfa6275903074279d0da15f6cad887"
},
{
"url": "js/extensions.min.js",
@ -62,231 +62,231 @@ if (workbox)
},
{
"url": "resources/dia.txt",
"revision": "27d259545a1519fb23cbec0f7360c9ce"
"revision": "056e6e45a1cf0b5dcf64512f1708314f"
},
{
"url": "resources/dia_cs.txt",
"revision": "5b06409cae80df1fb4db967a43198db8"
"revision": "349dd7fa410893c82768743455f11558"
},
{
"url": "resources/dia_my.txt",
"revision": "27d259545a1519fb23cbec0f7360c9ce"
"revision": "056e6e45a1cf0b5dcf64512f1708314f"
},
{
"url": "resources/dia_am.txt",
"revision": "8e270ea2a00eec62ed3056d8b173a343"
"revision": "87ca49daa5aca507bba6e6ed01ad6370"
},
{
"url": "resources/dia_ml.txt",
"revision": "6c6f33d1dafa9ad1763f8a0e1c77d9ea"
"revision": "ebe543620d88c3a09a09c68cf05c43a3"
},
{
"url": "resources/dia_uk.txt",
"revision": "31f1c8f4b0f4c7f247e2e4575ed049a7"
"revision": "7220391fbe0027c88e789ddaa8ff2a75"
},
{
"url": "resources/dia_bg.txt",
"revision": "205118129e8df0dc956285fcb6e13de7"
"revision": "d6720b26f6a8a9974f23f7eb9786b70d"
},
{
"url": "resources/dia_ca.txt",
"revision": "35b6a1ad89db2335060404dc242678ca"
"revision": "834ce0ead33125ab0f05b942be433239"
},
{
"url": "resources/dia_th.txt",
"revision": "2cd2be36fdf3465b7665ce13bc0322aa"
"revision": "2cb38568af63f0c6fd8fb72a4ae9409e"
},
{
"url": "resources/dia_bs.txt",
"revision": "a2616c76f9c6249a4f78a53a1cfd8891"
"revision": "fd881259654bf91f918b46da3b54d69b"
},
{
"url": "resources/dia_id.txt",
"revision": "e6a5f79703ae2c8d0e4b23375c19975a"
"revision": "52c2dbf156db4d4dcdf8d6a0c41033b3"
},
{
"url": "resources/dia_sk.txt",
"revision": "5d687f54cd8ee2061387af6f4cfe4fcf"
"revision": "4c027c68aecab9f2122f989f7e8d9d58"
},
{
"url": "resources/dia_ro.txt",
"revision": "a6697aaa230a97fd286a4f0aaa0727db"
"revision": "f541b0c99977a54333b14054ed89a8cf"
},
{
"url": "resources/dia_gl.txt",
"revision": "c88b2f76aeaa3138ade917bc399c98a8"
"revision": "bf23d9e561b1ba92f1d43862ced2e51f"
},
{
"url": "resources/dia_es.txt",
"revision": "15ab7e88a09d87498a4b6d048353eb34"
"revision": "586f89950b9eb01dfe974447eb3481e6"
},
{
"url": "resources/dia_eu.txt",
"revision": "ba5bb8c3bd6a492e3b45b69e9a4cf6bd"
"revision": "e383e7e556cae6226eef39d6fbce30c3"
},
{
"url": "resources/dia_ko.txt",
"revision": "da301eab521972967e51a5453fde6cb5"
"revision": "1336721d5286b7a96f810ac35d47dd58"
},
{
"url": "resources/dia_si.txt",
"revision": "27d259545a1519fb23cbec0f7360c9ce"
"revision": "056e6e45a1cf0b5dcf64512f1708314f"
},
{
"url": "resources/dia_kn.txt",
"revision": "f1cc8799dbfe7883329b037a632aa96e"
"revision": "237b4025d46694933c85d42e7ad63245"
},
{
"url": "resources/dia_hu.txt",
"revision": "0366546206854c2f3b53fbc2c1da106b"
"revision": "ccac54049a4030d3711c91d895b56c66"
},
{
"url": "resources/dia_fi.txt",
"revision": "736f51f7280ec763d7d8f69a2e2caf72"
"revision": "be18dc54e947285dff1972758566fba8"
},
{
"url": "resources/dia_da.txt",
"revision": "5ef39ca0106a36a0c3fe2039aa78d8bd"
"revision": "08ebaa04a6ef818bc01095dadd8f84f7"
},
{
"url": "resources/dia_de.txt",
"revision": "944822c5ff72d5fdcda8954ba7da66e2"
"revision": "aea7526194d50e3edef81c0952ec352e"
},
{
"url": "resources/dia_sl.txt",
"revision": "69599e42b93790a257b3b108cc5afc6c"
"revision": "64936a8797ede5bfac8aa2a60f6bcff8"
},
{
"url": "resources/dia_it.txt",
"revision": "8921764a2b7fad5602adc21e64a5ac2c"
"revision": "2405b0347b2d18bc54d36e8892e597b2"
},
{
"url": "resources/dia_hr.txt",
"revision": "7a245f1d5410c0aec61dd838a1fbac30"
"revision": "036653f52759815fe8e2be5c3bb53e96"
},
{
"url": "resources/dia_he.txt",
"revision": "89dfe0393507de57306bc533b09a7162"
"revision": "39b607ada96b68429ff6f4309dae183b"
},
{
"url": "resources/dia_pt.txt",
"revision": "6592ba85798cc4e975d84939eaf2892f"
"revision": "f84746863a838bca3f63aaa990626561"
},
{
"url": "resources/dia_zh-tw.txt",
"revision": "d2539f7b1fbd103087202bd3123d897e"
"revision": "c66ac58eae85088d1f0d9ed1094dbd49"
},
{
"url": "resources/dia_et.txt",
"revision": "e7bb4f0421d8e5c243ecdbf84a2164de"
"revision": "c03016b2ea79b7bb0336090aec8433fc"
},
{
"url": "resources/dia_ja.txt",
"revision": "290c8c8cf18bbade8db53b61a5b2f621"
"revision": "1731aa2e60463ebfebf62264addd4f82"
},
{
"url": "resources/dia_hi.txt",
"revision": "b775a5584628174079d451e431399eb3"
"revision": "e4490486e062022c16ec96cf71a59558"
},
{
"url": "resources/dia_eo.txt",
"revision": "8b6ce98e046bd84c5bdd760567e8d122"
"revision": "104021e104d1ae57dc3e0754bc29c06e"
},
{
"url": "resources/dia_fa.txt",
"revision": "dbf6176fc59f0f80725d8ca386d4bd7c"
"revision": "6816b3b2bbbdc19f31f90538d1002a19"
},
{
"url": "resources/dia_sw.txt",
"revision": "a433ab4b602e23136d8307ed0ae08aea"
"revision": "94416b358b42d47f25e0dc5da4502755"
},
{
"url": "resources/dia_pl.txt",
"revision": "193eb613e1cab6b1f9e64ff65a85e6d7"
"revision": "e29ff7ae404d2050cfe44a0863ef15ae"
},
{
"url": "resources/dia_pt-br.txt",
"revision": "0309a91a9f59afa320b5e7cd00e321ab"
"revision": "a22c37635a1e90d9a10c2af54bd90cd1"
},
{
"url": "resources/dia_sv.txt",
"revision": "e42b8f7023416170ecb52ca4690925f1"
"revision": "0188480624efd21aa87f99fb2a0482ff"
},
{
"url": "resources/dia_el.txt",
"revision": "05c8cae5b44a635d63bbd802fce54461"
"revision": "c0c141716e107d6bcf4488d6d46741fa"
},
{
"url": "resources/dia_sr.txt",
"revision": "219552d03be1a6852f09d5194795034c"
"revision": "1542d701f13e58ee30aeb11b48910557"
},
{
"url": "resources/dia_fr.txt",
"revision": "5ab266f4cfadfefd0961ad38cd9cfbd9"
"revision": "7da6942fb3fb14e842bac99c225cf696"
},
{
"url": "resources/dia_ru.txt",
"revision": "9ef9ef97ff682cd1be8e7f7532f54b1c"
"revision": "431d4ac88cc200f945245df1bf128e73"
},
{
"url": "resources/dia_gu.txt",
"revision": "bff8275e7576dbad9cec254aaa984dda"
"revision": "5228be56d12b7b115eed4147b9cf562d"
},
{
"url": "resources/dia_ar.txt",
"revision": "17819885a1e96766a80d7ea95fe92402"
"revision": "3aaa1af719a0fc87b6c3e7b9aaef4a13"
},
{
"url": "resources/dia_tr.txt",
"revision": "4465c048e1310af4e0bd07fc96144590"
"revision": "a211b9fb65cad325d50fa974dc735fa2"
},
{
"url": "resources/dia_te.txt",
"revision": "358f9f49641432b8b08a9865b098b765"
"revision": "b90bd5cd95035f8c34f8d18597be033c"
},
{
"url": "resources/dia_lt.txt",
"revision": "b521e91ade6f51790cc522703097c93c"
"revision": "bd620c1558d9156494c257faf834f9bb"
},
{
"url": "resources/dia_lv.txt",
"revision": "0692d5056e41a364defe7a9e874667ab"
"revision": "4afe7da399a8b42708e1836619844e2a"
},
{
"url": "resources/dia_mr.txt",
"revision": "74f5f13d5328ad08891f287a216b2b25"
"revision": "1b130ee36986100790765788fb66c3d0"
},
{
"url": "resources/dia_ms.txt",
"revision": "d1d4a4304760f021d14ae78d4c63c7ba"
"revision": "52d8ae70fd159d8f914a4dacb6bea7d8"
},
{
"url": "resources/dia_nl.txt",
"revision": "1eafabf4cc207df9d56d263f107db94c"
"revision": "a0a4fa0edb56c84b3e90aa339f1beb17"
},
{
"url": "resources/dia_fil.txt",
"revision": "0b519f89bea709a535a4b324ab2d4d0e"
"revision": "2e1e184c41fe0bab0eb9f12ab47d0e67"
},
{
"url": "resources/dia_zh.txt",
"revision": "52cdaffa00947dc3d6fef9f3469cc532"
"revision": "32632f015222f50ec3e8e3f5885f1267"
},
{
"url": "resources/dia_bn.txt",
"revision": "e9ac087d108743305398c1161eb81549"
"revision": "d88336ee3de4240b40f3041db3ea6d75"
},
{
"url": "resources/dia_no.txt",
"revision": "7ed3af9c4b4024168069dedc96c4c26b"
"revision": "340263eabe5af10e972e61fe454c32d5"
},
{
"url": "resources/dia_vi.txt",
"revision": "928311f19eaf8a634720389e4e2ff489"
"revision": "f65508207aa2a44caff8b35676cc9603"
},
{
"url": "resources/dia_ta.txt",
"revision": "022f9360053e669c9d1d03b87a84a5a7"
"revision": "297070d292fe275bec73d56dde70c7a5"
},
{
"url": "favicon.ico",

View file

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7Vvbdto4FP0aHpPlC7c8Arm0nTRDSyaZV4EFaJAtRhYh9Ot7ZMtXBbATXCeErqxV61iWLe2to61t07AH7vMNR8v5d+Zg2rAM57lhXzYsy7QsG/6TkU0Y6XbMMDDjxFGVksCI/MIqaKjoijjYz1QUjFFBltnghHkenohMDHHO1tlqU0azd12iGdYCowmievSROGKuemF1kvgXTGbz6M5m+yI846KosuqJP0cOW6dC9lXDHnDGRHjkPg8wlYMXjcvj180jvV20b7798P9H//T/ur97OAsbuy5zSdwFjj3x6qZ/LabXXx6a//27HF7/WBs3vfG3M3WJ8YToSo3XEHOfearHYhMNo78mLkUelPpT5omROgOD0EeUzDw4nsDTYQ6BJ8wFAQR66oRgS4hO5oQ6t2jDVrIPvkCTRVTqzxknv6BZROGUCQE4zYUik9XO1BjJKyFsQJRjH+oMo4Ex49At8oWqM2GUoqVPxsEDyyou4jPi9ZkQzI0aYivPwY4qxUgHBcHZIuaOvL4gHAo2ORr4OUVGBc8NZi4WfANV1NmYaZto8qnyOiGu2VaxeZq0dldNGDVZZnHb8e1+wuRC3gwGIbmfnbtfs+D9AJHM7RAF4D0kcF8Oo5+mIRykupqEAnKWIKqpEfUOuVijKYy0SFGS4qnYSkh/iSbEm90GdS6bSeSn6qkMMbh2SgMyzInjYC8gi0AChXySDFky4olgKFp9+IMBGxjnrUYLHmgAZTMpw5+szsWAecArRAICYSDrGkvCvkCtndN2P7U2WcTKIpsmUgbSsvhZeqKZM0+S8W7ljiFtHBuSOzLKXLhUHVaFd8uqGW9bw/vKRURe1nMcyNH+CfCDAt7p1gx4UwNcQ5iSQD+o0TBfXFv3wO8CkLK5CO97SYfLM1PjhK1zwn4Bf4rGmA6ZTwRhsn0e1s3xoq6sbRrNYqjuWP7fBGpLz9orPpkjXyZukF0LGN7g6Ajnc2WgmnXn5raG6kisHNnNgqrfOKn+w6l+M6f67Xa1qt/MqX67+35Vf2c7U49VNxZMO+3CNHsvO4CuhmUPnl66N5bxHZaSo0PyoIKwNN617wAuToLw4KAWVflV6UFT9wu/QuI3rgANMkbBMnPPZMDjTDZ3ZFM6LYKaVYHcrTtTm7rZdoPlkjvCLvEQl4jfowXWXeKPjm9VkNav+aMH2JWOsef05BsXKI0pk3K7DyGlx00jLF4TGi1dewRzdv3DzgxHUwfTMVtfJYF+EIATEVNKy22fwb4U74cMNhgzXGA7J592J7AvAckxRYI8ZV887RDnQ0ncRJhbRlaYW4adbSLspLoq/aanbEPhKGgNHcyr182/IWdT7PtM1+unLWb1W0w7v+UrusXsGHtJ/MIO024W2GF23scO09R9yxGiSGXcT7i2xZP34+wsTd2m1ND77FuN8rAW3UBWttfQbcpPpVgixN61ZDFzmb7zSsli5xqyOrlnqVqy6E7jtveUJ8FSvWBpGd0MHQp/CWOZOxaZ7Yql1fpAX8LoRupIcIz1tzefRbF0CtPr3SgW3RwdEHF8mvOgFnh5nGv3wC3dL4WkLY7vu7Waga796xdLt0xB2ctV3DIGzDkBfmDAC38ZUx3iuqE6gDERR+gc1I21/UoxdjisdUNTA/nTGwzlcW0VlGFVOQyW7v09AETOMS7Q1aHYrj0T6/bf3yuxXEl7oSffVd7KeXBCtDCiF7Xn23LWH1sGY73HqwgjA0YZD1qwjeCfbvvFjqFZvwmoRn2vBxihvNcEVAyQJEsbHk31QG/0A+M3PTGVrGwTRf3AVnNPQ1v8QK2hs/y7qFw7bDr1cSWWoqVbisb5eQR8QuTApkuliD0JaazMunB176PJYhbwNyK2xxJrUvngVvFsEc089WtM9ViN+JdpxS28szcyKiLmH4NLt9WKYxUpq48K1mFmf/S57h+HTnfTKPRCLv1oqyuaEup5VHV9XMTbj9X7bqxL+etvJIZGgG1cKb5OXByGKXbW34+S9Fu4AsXkt9hh9eQX7fbVbw==</diagram></mxfile>
<mxfile><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7VvZcuI4FP0aHpPywpZHIEt3TzpDN5lkXgUWoEG2GFmE0F/fV7a8KoCd4HZCqEpVrGtZtnSOro6OTcMeuM83HC3n35mDacMynOeGfdmwLNOybPgnI5sw0u2YYWDGiaMqJYER+YVV0FDRFXGwn6koGKOCLLPBCfM8PBGZGOKcrbPVpoxm77pEM6wFRhNE9egjccRc9cLqJPEvmMzm0Z3N9kV4xkVRZdUTf44ctk6F7KuGPeCMifDIfR5gKgcvGpfHr5tHerto33z74f+P/un/dX/3cBY2dl3mkrgLHHvi1U3/Wkyvvzw0//t3Obz+sTZueuNvZ+oS4wnRlRqvIeY+81SPxSYaRn9NXIo8KPWnzBMjdQYGoY8omXlwPIGnwxwCT5gLAgj01AnBlhCdzAl1btGGrWQffIEmi6jUnzNOfkGziMIpEwJwmgtFJqudqTGSV0LYgCjHPtQZRgNjxqFb5AtVZ8IoRUufjIMHllVcxGfE6zMhmBs1xFaegx1VipEOCoKzRcwdeX1BOBRscjTwc4qMCp4bzFws+AaqqLMx0zbR5FPldUJcs61i8zRp7a6aMGqyzOK249v9hMmFvBkMQnI/O3e/ZsH7ASKZ2yEKwHtI4L4cRj9NQzhIdTUJBeQsQVRTI+odcrFGUxhpkaIkxVOxlZD+Ek2IN7sN6lw2k8hP1VMZYnDtlAZkmBPHwV5AFoEECvkkGbJkxBPBULT68AcDNjDOW40WPNAAymZShj9ZnYsB84BXiAQEwkDWNZaEfYFaO6ftfmptsoiVRTZNpAykZfGz9EQzZ54k493KHUPaODYkd2SUuXCpOqwK75ZVM962hveVi4i8rOc4kKP9E+AHBbzTrRnwpga4hjAlgX5Qo2G+uLbugd8FIGVzEd73kg6XZ6bGCVvnhP0C/hSNMR0ynwjCZPs8rJvjRV1Z2zSaxVDdsfy/CdSWnrVXfDJHvkzcILsWMLzB0RHO58pANevOzW0N1ZFYObKbBVW/cVL9h1P9Zk712+1qVb+ZU/129/2q/s52ph6rbiyYdtqFafZedgBdDcsePL10byzjOywlR4fkQQVhabxr3wFcnAThwUEtqvKr0oOm7hd+hcRvXAEaZIyCZeaeyYDHmWzuyKZ0WgQ1qwK5W3emNnWz7QbLJXeEXeIhLhG/Rwusu8QfHd+qIK1f80cPsCsdY8/pyTcuUBpTJuV2H0JKj5tGWLwmNFq69gjm7PqHnRmOpg6mY7a+SgL9IAAnIqaUlts+g30p3g8ZbDBmuMB2Tj7tTmBfApJjigR5yr542iHOh5K4iTC3jKwwtww720TYSXVV+k1P2YbCUdAaOphXr5t/Q86m2PeZrtdPW8zqt5h2fstXdIvZMfaS+IUdpt0ssMPsvI8dpqn7liNEkcq4n3Btiyfvx9lZmrpNqaH32bca5WEtuoGsbK+h25SfSrFEiL1ryWLmMn3nlZLFzjVkdXLPUrVk0Z3Gbe8pT4KlesHSMroZOhT+EsYydywy2xVLq/WBvoTRjdSR4Bjrb28+i2LpFKbXu1Esujk6IOL4NOdBLfDyONfugVu6XwpJWxzfd2s1A1371y+WbpmCsperuGUMmHMC/MCAF/4ypjrEdUN1AGMijtA5qBtr+5Vi7HBY64amBvKnNxjK49oqKMOqchgs3ft7AIicY1ygq0OxXXsm1u2/v1diuZL2Qk++q7yV8+CEaGFEL2rPt+WsP7YMxrqcuRf7gmb9Vp8a271OX4TlXqtP4SyplLY1muqB3uj6xe9zYsJY2SaKun6t5p6Gtrh+WkNn+TdOuXbYdOrjSoxDSzcOjfPzCPiEroEZl0oEe9LOWFly4RreR5PFLODvgFHG4bzHEgNSud1W8ZwQzS/1m0v1WI3492fFjbqzNzIqIuYfg0s3z4pjFemnjwrWYWZ/9FHuH4dO98wo9EIu8Gir95mS43lUdRVcxMGPNfpurEu56G8khkaAbVwpvk5cHIYpdtbFj5L0W7gCxeQX12H15Hfr9tVv</diagram></mxfile>