diff --git a/ChangeLog b/ChangeLog index b957459bdd..a857fcabb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +04-APR-2023: 21.1.4 + +- Remerge and release of dev branch + +03-APR-2023: 21.1.3 + +- Adds zoom and border properties for XML+SVG files +- Adds Clear Formatting button in Text style panel +- Removes fontSource cell styles in clear formatting +- Fixes possible resolving of defaults in stylesheet +- Conf Cloud: Support proper versioning for embed -> upload [DID-7828] +- Enables compression with compressXml [drawio-3484] + 29-MAR-2023: 21.1.2 - Fixes handling of ctrl+shift+v on Mac [drawio-291] diff --git a/VERSION b/VERSION index 0ec4255d35..ea1c22b957 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -21.1.2 \ No newline at end of file +21.1.4 \ No newline at end of file diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 25481d15fb..a9eb927da6 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -1283,7 +1283,7 @@ b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c,b)}this.fireEvent(new mx mxGraph.prototype.updatePageBreaks=function(a,b,c){b=this.view.scale;c=this.view.translate;var d=this.pageFormat,e=b*this.pageScale,f=new mxRectangle(0,0,d.width*e,d.height*e);d=mxRectangle.fromRectangle(this.getGraphBounds());d.width=Math.max(1,d.width);d.height=Math.max(1,d.height);f.x=Math.floor((d.x-c.x*b)/f.width)*f.width+c.x*b;f.y=Math.floor((d.y-c.y*b)/f.height)*f.height+c.y*b;d.width=Math.ceil((d.width+(d.x-f.x))/f.width)*f.width;d.height=Math.ceil((d.height+(d.y-f.y))/f.height)*f.height; var g=(a=a&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(d.height/f.height)+1:0,k=a?Math.ceil(d.width/f.width)+1:0,l=(k-1)*f.width,m=(g-1)*f.height;null==this.horizontalPageBreaks&&0S.clientHeight-G&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")), +g&&document.body.appendChild(this.bg);var S=a.createDiv(t?"geTransDialog":"geDialog");g=this.getPosition(D,N,e,f);D=g.x;N=g.y;S.style.width=e+"px";S.style.height=f+"px";S.style.left=D+"px";S.style.top=N+"px";S.style.zIndex=this.zIndex;S.appendChild(b);document.body.appendChild(S);!n&&b.clientHeight>S.clientHeight-H&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")), d.className="geDialogClose",d.style.top=N+14+"px",d.style.left=D+e+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){T=!0}),null,mxUtils.bind(this,function(Z){T&&(a.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var Z=m();null!=Z&&(A=e=Z.w,C=f=Z.h)}Z=Editor.inlineFullscreen|| -null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);F=Z.height;this.bg.style.height=F+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(A,document.body.scrollWidth-G):A;f=Math.min(C,F-G);Z=Math.max(1,Math.round((Z.width-e-G)/2));var U=Math.max(1,Math.round((F-f-a.footerHeight)/3));U=this.getPosition(Z,U,e,f);Z=U.x;U=U.y;var X=mxUtils.getDocumentScrollOrigin(document);Z+=X.x;U+=X.y;Editor.inlineFullscreen|| -null==a.embedViewport||(U+=a.embedViewport.y,Z+=a.embedViewport.x);S.style.left=Z+"px";S.style.top=U+"px";S.style.width=e+"px";S.style.height=f+"px";!n&&b.clientHeight>S.clientHeight-G&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=U+14+"px",this.dialogImg.style.left=Z+e+38-x+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=S;a.editor.fireEvent(new mxEventObject("showDialog"))} +null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);F=Z.height;this.bg.style.height=F+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(A,document.body.scrollWidth-H):A;f=Math.min(C,F-H);Z=Math.max(1,Math.round((Z.width-e-H)/2));var U=Math.max(1,Math.round((F-f-a.footerHeight)/3));U=this.getPosition(Z,U,e,f);Z=U.x;U=U.y;var X=mxUtils.getDocumentScrollOrigin(document);Z+=X.x;U+=X.y;Editor.inlineFullscreen|| +null==a.embedViewport||(U+=a.embedViewport.y,Z+=a.embedViewport.x);S.style.left=Z+"px";S.style.top=U+"px";S.style.width=e+"px";S.style.height=f+"px";!n&&b.clientHeight>S.clientHeight-H&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=U+14+"px",this.dialogImg.style.left=Z+e+38-x+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=S;a.editor.fireEvent(new mxEventObject("showDialog"))} Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; @@ -2065,8 +2065,8 @@ this.container.parentNode.removeChild(this.container)}; var ErrorDialog=function(a,b,e,f,g,d,h,n,t,m,r){t=null!=t?t:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var A=document.createElement("div");A.style.padding="0px";A.style.margin="0px";A.style.fontSize="18px";A.style.paddingBottom="16px";A.style.marginBottom="10px";A.style.borderBottom="1px solid #c0c0c0";A.style.color="gray";A.style.whiteSpace="nowrap";A.style.textOverflow="ellipsis";A.style.overflow="hidden";mxUtils.write(A,b);A.setAttribute("title",b);x.appendChild(A)}b= document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"
"));b.innerHTML=e;x.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",e.appendChild(m));var C=mxUtils.button(f, function(){t&&a.hideDialog();null!=g&&g()});C.className="geBtn";e.appendChild(C);null!=h&&(f=mxUtils.button(h,function(){t&&a.hideDialog();null!=n&&n()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};x.appendChild(e);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(C){var G=h.checked||m.checked,D=parseInt(x.value)/100;isNaN(D)&&(D=1,x.value="100%");mxClient.IS_SF&&(D*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/e.pageScale;if(G){var P=h.checked?1:parseInt(r.value);isNaN(P)||(N=mxUtils.getScaleForPageCount(P,e,F))}var S=P=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*D);F.height=Math.ceil(F.height*D);N*=D;!G&&e.pageVisible?(D=e.getPageLayout(),P-=D.x*F.width,S-=D.y*F.height): -G=!0;G=PrintDialog.createPrintPreview(e,N,F,0,P,S,G);G.open();C&&PrintDialog.printPreview(G)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(h);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); +PrintDialog.prototype.create=function(a){function b(C){var H=h.checked||m.checked,D=parseInt(x.value)/100;isNaN(D)&&(D=1,x.value="100%");mxClient.IS_SF&&(D*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/e.pageScale;if(H){var P=h.checked?1:parseInt(r.value);isNaN(P)||(N=mxUtils.getScaleForPageCount(P,e,F))}var S=P=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*D);F.height=Math.ceil(F.height*D);N*=D;!H&&e.pageVisible?(D=e.getPageLayout(),P-=D.x*F.width,S-=D.y*F.height): +H=!0;H=PrintDialog.createPrintPreview(e,N,F,0,P,S,H);H.open();C&&PrintDialog.printPreview(H)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(h);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); n.appendChild(t);mxEvent.addListener(t,"click",function(C){h.checked=!h.checked;m.checked=!h.checked;mxEvent.consume(C)});mxEvent.addListener(h,"change",function(){m.checked=!h.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");n.appendChild(t);mxEvent.addListener(t, "click",function(C){m.checked=!m.checked;h.checked=!m.checked;mxEvent.consume(C)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change", function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");h.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; @@ -2078,27 +2078,27 @@ var PageSetupDialog=function(a){function b(){var D=x;null!=D&&null!=D.originalSr var d=document.createElement("tr");var h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("paperSize")+":");d.appendChild(h);h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";var n=PageSetupDialog.addPageFormatPanel(h,"pagesetupdialog",e.pageFormat);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("gridSize")+":");d.appendChild(h); h=document.createElement("td");h.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","number");t.setAttribute("min","0");t.style.width="40px";t.style.marginLeft="6px";t.value=e.getGridSize();h.appendChild(t);mxEvent.addListener(t,"change",function(){var D=parseInt(t.value);t.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":"); d.appendChild(h);h=document.createElement("td");var m=document.createElement("button");m.className="geBtn";m.style.margin="0px";mxUtils.write(m,mxResources.get("change")+"...");var r=document.createElement("div");r.style.display="inline-block";r.style.verticalAlign="middle";r.style.backgroundPosition="center center";r.style.backgroundRepeat="no-repeat";r.style.backgroundSize="contain";r.style.border="1px solid lightGray";r.style.borderRadius="4px";r.style.marginRight="14px";r.style.height="32px"; -r.style.width="64px";r.style.cursor="pointer";r.style.padding="4px";var x=e.backgroundImage,A=e.background,C=e.shadowVisible,G=function(D){a.showBackgroundImageDialog(function(F,N,P,S){N||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),x=F,C=S);A=P;b()},x,A,!0);mxEvent.consume(D)};mxEvent.addListener(m,"click",G);mxEvent.addListener(r,"click",G);b();h.appendChild(r);h.appendChild(m);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td"); -h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&h.appendChild(m);G=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(t.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,A,x,n.get());D.ignoreColor=e.background==A;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=x?x.src:null);null!=C&& -(D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});G.className="geBtn gePrimaryBtn";h.appendChild(G);a.editor.cancelFirst||h.appendChild(m);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,f){function g(Z,U,X){if(X||x!=document.activeElement&&A!=document.activeElement){Z=!1;for(U=0;U=Z)x.value=e.width/100;Z=parseFloat(A.value);if(isNaN(Z)||0>=Z)A.value=e.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), Math.floor(100*parseFloat(A.value)));"custom"!=n.value&&h.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));U&&P||Z.width==S.width&&Z.height==S.height||(S=Z,null!=f&&f(S))};mxEvent.addListener(b,"click",function(Z){d.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(m,"click",function(Z){h.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(A,"blur",T);mxEvent.addListener(A,"click",T);mxEvent.addListener(h,"change",T);mxEvent.addListener(d, "change",T);mxEvent.addListener(n,"change",function(Z){P="custom"==n.value;T(Z,!0)});T();return{set:function(Z){e=Z;g(null,null,!0)},get:function(){return S},widthInput:x,heightInput:A}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,e,f,g,d,h,n,t,m,r,x,A){t=null!=t?t:!0;var C=document.createElement("table"),G=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var D=document.createElement("tr");var F=document.createElement("td");F.style.textOverflow="ellipsis";F.style.textAlign="right";F.style.maxWidth=(A?A+15:100)+"px";F.style.fontSize="10pt";F.style.width=(A?A:84)+"px";mxUtils.write(F,(g||mxResources.get("filename"))+":");D.appendChild(F);var N= +var FilenameDialog=function(a,b,e,f,g,d,h,n,t,m,r,x,A){t=null!=t?t:!0;var C=document.createElement("table"),H=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var D=document.createElement("tr");var F=document.createElement("td");F.style.textOverflow="ellipsis";F.style.textAlign="right";F.style.maxWidth=(A?A+15:100)+"px";F.style.fontSize="10pt";F.style.width=(A?A:84)+"px";mxUtils.write(F,(g||mxResources.get("filename"))+":");D.appendChild(F);var N= document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var P=mxUtils.button(e,function(){if(null==d||d(N.value))t&&a.hideDialog(),f(N.value)});P.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==h)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=C.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave", function(Z){null!=T&&(T.style.backgroundColor="",T=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(Z){null==T&&(!mxClient.IS_IE||10'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,n){a.apply(this,arguments);if(null!=this.shiftPreview1){var t=this.view.canvas; -null!=t.ownerSVGElement&&(t=t.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+h,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";t.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(h,n,t){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,A=m*this.pageScale,C=this.view.getBackgroundPageBounds();n=C.width;t=C.height;var G=new mxRectangle(m* -r.x,m*r.y,x.width*A,x.height*A),D=(h=h&&Math.min(G.width,G.height)>this.minPageBreakDist)?Math.ceil(t/G.height)-1:0,F=h?Math.ceil(n/G.width)-1:0,N=C.x+n,P=C.y+t;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(t/H.height)-1:0,F=h?Math.ceil(n/H.width)-1:0,N=C.x+n,P=C.y+t;null==this.horizontalPageBreaks&&0mxUtils.indexOf(h,x[b])&&h.push(x[b]);var A="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),C=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(h,n[b])&&h.push(n[b]);var G=function(K,R,H,V,ea,O,fa){V=null!=V?V:g.currentVertexStyle;ea=null!=ea?ea:g.currentEdgeStyle;O=null!=O?O:!0;H=null!=H?H:g.getModel();if(fa){fa=[];for(var wa=0;wamxUtils.indexOf(t,Ga))&&(ab=mxUtils.setStyle(ab,Ga,cb))}Editor.simpleLabels&&(ab=mxUtils.setStyle(mxUtils.setStyle(ab,"html",null),"whiteSpace",null));H.setStyle(Fa,ab)}}finally{H.endUpdate()}return K};g.addListener("cellsInserted",function(K,R){G(R.getProperty("cells"),null,null,null, -null,!0,!0)});g.addListener("textInserted",function(K,R){G(R.getProperty("cells"),!0)});this.insertHandler=G;this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(K){null==K&&(K=window.event);return g.isEditing()||null!=K&&this.isSelectionAllowed(K)});this.container==document.body&&(this.menubarContainer.onselectstart=D,this.menubarContainer.onmousedown=D,this.toolbarContainer.onselectstart=D,this.toolbarContainer.onmousedown=D,this.diagramContainer.onselectstart=D,this.diagramContainer.onmousedown= +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(h,n[b])&&h.push(n[b]);var H=function(K,R,G,V,ea,O,fa){V=null!=V?V:g.currentVertexStyle;ea=null!=ea?ea:g.currentEdgeStyle;O=null!=O?O:!0;G=null!=G?G:g.getModel();if(fa){fa=[];for(var wa=0;wamxUtils.indexOf(t,Ga))&&(ab=mxUtils.setStyle(ab,Ga,cb))}Editor.simpleLabels&&(ab=mxUtils.setStyle(mxUtils.setStyle(ab,"html",null),"whiteSpace",null));G.setStyle(Fa,ab)}}finally{G.endUpdate()}return K};g.addListener("cellsInserted",function(K,R){H(R.getProperty("cells"),null,null,null, +null,!0,!0)});g.addListener("textInserted",function(K,R){H(R.getProperty("cells"),!0)});this.insertHandler=H;this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(K){null==K&&(K=window.event);return g.isEditing()||null!=K&&this.isSelectionAllowed(K)});this.container==document.body&&(this.menubarContainer.onselectstart=D,this.menubarContainer.onmousedown=D,this.toolbarContainer.onselectstart=D,this.toolbarContainer.onmousedown=D,this.diagramContainer.onselectstart=D,this.diagramContainer.onmousedown= D,this.sidebarContainer.onselectstart=D,this.sidebarContainer.onmousedown=D,this.formatContainer.onselectstart=D,this.formatContainer.onmousedown=D,this.footerContainer.onselectstart=D,this.footerContainer.onmousedown=D,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(b=function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var K=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(K[1],10),parseInt(K[2],10),parseInt(K[3]||0,10)]}}(),null!=b&&16<=b[0]&& (mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable? (b=function(K){if(null!=K){var R=mxEvent.getSource(K);if("A"==R.nodeName)for(;null!=R;){if("geHint"==R.className)return!0;R=R.parentNode}}return D(K)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position= @@ -2138,16 +2138,16 @@ D,this.sidebarContainer.onselectstart=D,this.sidebarContainer.onmousedown=D,this mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(K,R){return f.isSpaceDown()||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(K){16==K.which?this.shiftDown=!0:32!=K.which||g.isEditing()?mxEvent.isConsumed(K)||27!=K.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(K)!=g.container|| mxEvent.consume(K))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(K){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var P=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(K){return P.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(K.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(K.getEvent()))&&(!mxEvent.isControlDown(K.getEvent())&& mxEvent.isRightMouseButton(K.getEvent())||mxEvent.isMiddleMouseButton(K.getEvent()))};var S=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(K){return S.apply(this,arguments)||13==K.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K)||mxClient.IS_SF&&mxEvent.isShiftDown(K))};var T=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||T.apply(this,arguments)};var Z=!1,U=null,X=null,Y=null,ia=mxUtils.bind(this,function(){if(null!= -this.toolbar&&Z!=g.cellEditor.isContentEditing()){for(var K=this.toolbar.container.firstChild,R=[];null!=K;){var H=K.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,K)&&(K.parentNode.removeChild(K),R.push(K));K=H}K=this.toolbar.fontMenu;H=this.toolbar.sizeMenu;if(null==Y)this.toolbar.createTextToolbar();else{for(var V=0;VmxUtils.indexOf(this.toolbar.staticElements,K)&&(K.parentNode.removeChild(K),R.push(K));K=G}K=this.toolbar.fontMenu;G=this.toolbar.sizeMenu;if(null==Y)this.toolbar.createTextToolbar();else{for(var V=0;Vh.length?35*h.length:140;A.className="geToolbarContainer geSidebarContainer geShapePicker";A.setAttribute("title",mxResources.get("sidebarTooltip"));A.style.left=a+"px";A.style.top=b+"px";A.style.width=g+"px";mxClient.IS_POINTER&&(A.style.touchAction="none");n||mxUtils.setPrefixedStyle(A.style,"transform","translate(-22px,-22px)");null!=x.background&&x.background!=mxConstants.NONE&&(A.style.backgroundColor= -x.background);x.container.appendChild(A);g=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:1px";A.appendChild(F);null!=G&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(G,[D]):C.insertHandler([D],""!=D.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);var N=D.geometry;x.model.isEdge(D)&&(N=N.getTerminalPoint(!1),N=new mxRectangle(0, +g=x.view.getState(e);var H=null==e||null!=g&&x.isTransparentState(g)?null:x.copyStyle(e);g=6>h.length?35*h.length:140;A.className="geToolbarContainer geSidebarContainer geShapePicker";A.setAttribute("title",mxResources.get("sidebarTooltip"));A.style.left=a+"px";A.style.top=b+"px";A.style.width=g+"px";mxClient.IS_POINTER&&(A.style.touchAction="none");n||mxUtils.setPrefixedStyle(A.style,"transform","translate(-22px,-22px)");null!=x.background&&x.background!=mxConstants.NONE&&(A.style.backgroundColor= +x.background);x.container.appendChild(A);g=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:1px";A.appendChild(F);null!=H&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(H,[D]):C.insertHandler([D],""!=D.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);var N=D.geometry;x.model.isEdge(D)&&(N=N.getTerminalPoint(!1),N=new mxRectangle(0, 0,N.x,N.y));null!=N&&F.appendChild(this.sidebar.createVertexTemplateFromCells([D],N.width,N.height,"",!0,!1,null,!1,mxUtils.bind(this,function(P){if(!mxEvent.isShiftDown(P)||null==e&&x.isSelectionEmpty()){var S=x.cloneCell(D);if(null!=f)f(S);else{var T=t([S]);x.model.isEdge(S)?S.geometry.translate(T.x,T.y):(S.geometry.x=T.x,S.geometry.y=T.y);x.model.beginUpdate();try{x.addCell(S),x.model.isVertex(S)&&x.isAutoSizeCell(S)&&x.updateCellSize(S)}finally{x.model.endUpdate()}x.setSelectionCell(S);x.scrollCellToVisible(S); r&&x.startEditing(S);null!=C.hoverIcons&&C.hoverIcons.update(x.view.getState(S))}}else S=x.getEditableCells(null!=e?[e]:x.getSelectionCells()),x.updateShapes(D,S);null!=d&&d(P);mxEvent.consume(P)}),25,25,null,null,e))});for(m=0;m<(n?Math.min(h.length,4):h.length);m++)g(h[m]);h=A.offsetTop+A.clientHeight-(x.container.scrollTop+x.container.offsetHeight);0=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=O,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= -(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=O,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=ia.getAttribute("filter")&&(K=ia.getAttribute("filter"),ia.removeAttribute("filter"));qa=new mxPoint(a.container.scrollLeft,a.container.scrollTop);H=Math.round(Math.round(this.view.scale* -this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);O=V||null==ka?a.container.scrollLeft+a.container.clientWidth/2:ka.x+a.container.scrollLeft-a.container.offsetLeft;var fa=V||null==ka?a.container.scrollTop+a.container.clientHeight/2:ka.y+a.container.scrollTop-a.container.offsetTop;ia.style.transformOrigin=O+"px "+fa+"px";ia.style.transform="scale("+H+")";Y.style.transformOrigin=O+"px "+fa+"px";Y.style.transform="scale("+H+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node? -(O=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(O.style,"transform-origin",(V||null==ka?a.container.clientWidth/2+a.container.scrollLeft-O.offsetLeft+"px":ka.x+a.container.scrollLeft-O.offsetLeft-a.container.offsetLeft+"px")+" "+(V||null==ka?a.container.clientHeight/2+a.container.scrollTop-O.offsetTop+"px":ka.y+a.container.scrollTop-O.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(O.style,"transform","scale("+H+")")):a.view.validateBackgroundStyles(H,O,fa);a.view.getDecoratorPane().style.opacity= -"0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",H))}R(a.isFastZoomEnabled()?ea:0)};mxEvent.addGestureListeners(a.container,function(H){null!=na&&window.clearTimeout(na)},null,function(H){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(H){null==na||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(H,V,ea,O,fa){a.fireEvent(new mxEventObject("wheel")); -if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ea&&a.isScrollWheelEvent(H))ea=a.view.getTranslate(),O=40/a.view.scale,mxEvent.isShiftDown(H)?a.view.setTranslate(ea.x+(V?-O:O),ea.y):a.view.setTranslate(ea.x,ea.y+(V?O:-O));else if(ea||a.isZoomWheelEvent(H))for(var wa=mxEvent.getSource(H);null!=wa;){if(wa==a.container)return a.tooltipHandler.hideTooltip(),ka=null!=O&&null!=fa?new mxPoint(O,fa):new mxPoint(mxEvent.getClientX(H),mxEvent.getClientY(H)),L=ea,ea=a.zoomFactor,O=null,H.ctrlKey&& -null!=H.deltaY&&40>Math.abs(H.deltaY)&&Math.round(H.deltaY)!=H.deltaY?ea=1+Math.abs(H.deltaY)/20*(ea-1):null!=H.movementY&&"pointermove"==H.type&&(ea=1+Math.max(1,Math.abs(H.movementY))/20*(ea-1),O=-1),a.lazyZoom(V,null,O,ea),mxEvent.consume(H),!1;wa=wa.parentNode}}),a.container);a.panningHandler.zoomGraph=function(H){a.cumulativeZoomFactor=H.scale;a.lazyZoom(0=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=O,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= +(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=O,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=ia.getAttribute("filter")&&(K=ia.getAttribute("filter"),ia.removeAttribute("filter"));qa=new mxPoint(a.container.scrollLeft,a.container.scrollTop);G=Math.round(Math.round(this.view.scale* +this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);O=V||null==ka?a.container.scrollLeft+a.container.clientWidth/2:ka.x+a.container.scrollLeft-a.container.offsetLeft;var fa=V||null==ka?a.container.scrollTop+a.container.clientHeight/2:ka.y+a.container.scrollTop-a.container.offsetTop;ia.style.transformOrigin=O+"px "+fa+"px";ia.style.transform="scale("+G+")";Y.style.transformOrigin=O+"px "+fa+"px";Y.style.transform="scale("+G+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node? +(O=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(O.style,"transform-origin",(V||null==ka?a.container.clientWidth/2+a.container.scrollLeft-O.offsetLeft+"px":ka.x+a.container.scrollLeft-O.offsetLeft-a.container.offsetLeft+"px")+" "+(V||null==ka?a.container.clientHeight/2+a.container.scrollTop-O.offsetTop+"px":ka.y+a.container.scrollTop-O.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(O.style,"transform","scale("+G+")")):a.view.validateBackgroundStyles(G,O,fa);a.view.getDecoratorPane().style.opacity= +"0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",G))}R(a.isFastZoomEnabled()?ea:0)};mxEvent.addGestureListeners(a.container,function(G){null!=na&&window.clearTimeout(na)},null,function(G){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(G){null==na||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(G,V,ea,O,fa){a.fireEvent(new mxEventObject("wheel")); +if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ea&&a.isScrollWheelEvent(G))ea=a.view.getTranslate(),O=40/a.view.scale,mxEvent.isShiftDown(G)?a.view.setTranslate(ea.x+(V?-O:O),ea.y):a.view.setTranslate(ea.x,ea.y+(V?O:-O));else if(ea||a.isZoomWheelEvent(G))for(var wa=mxEvent.getSource(G);null!=wa;){if(wa==a.container)return a.tooltipHandler.hideTooltip(),ka=null!=O&&null!=fa?new mxPoint(O,fa):new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),L=ea,ea=a.zoomFactor,O=null,G.ctrlKey&& +null!=G.deltaY&&40>Math.abs(G.deltaY)&&Math.round(G.deltaY)!=G.deltaY?ea=1+Math.abs(G.deltaY)/20*(ea-1):null!=G.movementY&&"pointermove"==G.type&&(ea=1+Math.max(1,Math.abs(G.movementY))/20*(ea-1),O=-1),a.lazyZoom(V,null,O,ea),mxEvent.consume(G),!1;wa=wa.parentNode}}),a.container);a.panningHandler.zoomGraph=function(G){a.cumulativeZoomFactor=G.scale;a.lazyZoom(0t||Math.abs(r.y-mxEvent.getClientY(C))>t))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*A));h.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||x.itemClicked(e,b,C,a)),n.apply(b,arguments),mxUtils.setOpacity(a,100*A),r=null, -x.currentElt=a}catch(G){b.reset(),x.editorUi.handleError(G)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0mxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var F=null!=n?n[A]:null;null!=F&&C.push(F);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+f,Math.round(G*h),Math.round(D*h),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}), -!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==f&&(f="");null!=d&&d.call(this,x);if(null!=t)for(var A=0;AmxUtils.indexOf(g,G))&&x.appendChild(this.createVertexTemplate("shape="+C+G.toLowerCase()+f,Math.round(F*h),Math.round(N*h),"",G.replace(/_/g," "),!0))}),!0)}))}; +Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,n,t,m){h=null!=h?h:1;if(this.addStencilsToIndex){var r=[];if(null!=t)for(m=0;mmxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var F=null!=n?n[A]:null;null!=F&&C.push(F);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+f,Math.round(H*h),Math.round(D*h),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}), +!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==f&&(f="");null!=d&&d.call(this,x);if(null!=t)for(var A=0;AmxUtils.indexOf(g,H))&&x.appendChild(this.createVertexTemplate("shape="+C+H.toLowerCase()+f,Math.round(F*h),Math.round(N*h),"",H.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var f=0;fH||Math.abs(h.y-K.getGraphY())>H){var V=this.selectionCellsHandler.getHandler(R.cell);if(null!=V&&null!=V.bends&&0G||Math.abs(h.y-K.getGraphY())>G){var V=this.selectionCellsHandler.getHandler(R.cell);if(null!=V&&null!=V.bends&&0mxUtils.indexOf(t,m)});this.updateCellStyles(h,n)};Graph.prototype.updateCellStyles=function(h,n){this.model.beginUpdate();try{for(var t=0;tA?"a":"p",tt:12>A?"am":"pm",T:12>A?"A":"P",TT:12>A?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0A?"a":"p",tt:12>A?"am":"pm",T:12>A?"A":"P",TT:12>A?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0this.activationDelay)&&this.currentState!=a&&(f>this.updateDelay&&null!= a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,f,g){a=this.cloneCell(a);for(var d=0;d/g,"\n"));g=Editor.convertHtmlToText(g);this.cellLabelChanged(a,g);f=!0}b&&(this.setCellStyles("fontSource",null,[a]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[a]),this.setCellStyles(mxConstants.STYLE_FONTSIZE, +null,[a]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[a]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[a]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[a]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[a]))}finally{this.getModel().endUpdate()}return f};Graph.prototype.createParent=function(a,b,e,f,g){a=this.cloneCell(a);for(var d=0;dD||Math.abs(T.y-P.y)>D)&&(Math.abs(T.x-N.x)>D||Math.abs(T.y-N.y)>D)&&(Math.abs(T.x-ia.x)>D||Math.abs(T.y-ia.y)>D)&&(Math.abs(T.x-Y.x)>D||Math.abs(T.y-Y.y)>D)){Y=T.x-P.x;ia=T.y-P.y;T={distSq:Y*Y+ia*ia,x:T.x,y:T.y};for(Y=0;YT.distSq){S.splice(Y,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&S[S.length-1].y===T.y||S.push(T)}}}for(U= -0;UG*G&&0G*G&&(Y=new mxPoint(X.x-T.x,X.y-T.y),U=new mxPoint(X.x+T.x,X.y+T.y),S.push(Y),this.addPoints(r,S,A,C,!1,null,F),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,F=!1,"sharp"==D?(r.lineTo(Y.x-T.y*S,Y.y+T.x*S),r.lineTo(U.x-T.y*S,U.y+T.x*S),r.lineTo(U.x,U.y)):"line"==D?(r.moveTo(Y.x+T.y*S,Y.y-T.x*S),r.lineTo(Y.x-T.y*S,Y.y+T.x*S),r.moveTo(U.x-T.y*S,U.y+T.x*S),r.lineTo(U.x+ +N.y),P=Math.sqrt(T.x*T.x+T.y*T.y),0H*H&&0H*H&&(Y=new mxPoint(X.x-T.x,X.y-T.y),U=new mxPoint(X.x+T.x,X.y+T.y),S.push(Y),this.addPoints(r,S,A,C,!1,null,F),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,F=!1,"sharp"==D?(r.lineTo(Y.x-T.y*S,Y.y+T.x*S),r.lineTo(U.x-T.y*S,U.y+T.x*S),r.lineTo(U.x,U.y)):"line"==D?(r.moveTo(Y.x+T.y*S,Y.y-T.x*S),r.lineTo(Y.x-T.y*S,Y.y+T.x*S),r.moveTo(U.x-T.y*S,U.y+T.x*S),r.lineTo(U.x+ T.y*S,U.y-T.x*S),r.moveTo(U.x,U.y)):"arc"==D?(S*=1.3,r.curveTo(Y.x-T.y*S,Y.y+T.x*S,U.x-T.y*S,U.y+T.x*S,U.x,U.y)):(r.moveTo(U.x,U.y),F=!0),S=[U],Y=!0))}else T=null;Y||(S.push(X),N=X)}this.addPoints(r,S,A,C,!1,null,F);r.stroke()}};var h=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,A,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):h.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,A,C){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,C);var G=this.getNextPoint(r,A,C),D=this.graph.isOrthogonal(r),F=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=F){var P=Math.cos(-F),S=Math.sin(-F);G=mxUtils.getRotatedPoint(G,P,S,N)}P=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);P+=parseFloat(r.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);G=this.getPerimeterPoint(x,G,0==F&&D,P);0!=F&&(P=Math.cos(F),S=Math.sin(F),G=mxUtils.getRotatedPoint(G,P,S,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,A,C,G),C)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,A,C,G){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);C=A=null;if(null!=r)for(var D=0;D=d.getStatus()&&eval.call(window,d.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",a,e,b,g,h)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; @@ -2811,8 +2813,8 @@ function(u){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);i function(u,z){var B=this.getModel(),E=[];B.beginUpdate();try{for(var J=0;J=Ia.length||ca[za]!=Ia[za].node||ca[za]==Ia[za].node&&ca[za].getAttribute("color")!=Ia[za].color){Ia=ca[za].firstChild;if(null!=Ia&&"A"==Ia.nodeName&& @@ -3118,17 +3120,17 @@ d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgro null});za.style.backgroundColor=null==Ia||Ia==mxConstants.NONE?"":Ia})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var ca=U.getAttribute("cellPadding")||0;ca=new FilenameDialog(e,ca,mxResources.get("apply"),mxUtils.bind(this,function(ya){null!=ya&&0A;A++)(function(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(A);var Wa=mxUtils.bind(this,function(ca,ya,Ia){g=e.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);t.firstChild.nodeValue= -mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(Ia||document.activeElement!=H)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(C,ca==mxConstants.ALIGN_LEFT);b(G,ca==mxConstants.ALIGN_CENTER);b(D,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style, +mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(Ia||document.activeElement!=G)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),G.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(C,ca==mxConstants.ALIGN_LEFT);b(H,ca==mxConstants.ALIGN_CENTER);b(D,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style, mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(P,ca==mxConstants.ALIGN_MIDDLE);b(S,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);ya=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);na.value=ca==mxConstants.ALIGN_LEFT&&ya==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&ya==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&& ya==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&ya==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&ya==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&ya==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?L.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR? L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(Ia||document.activeElement!=Da)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Da.value=isNaN(ca)?"":ca+" pt";if(Ia||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),ua.value=isNaN(ca)?"":ca+" pt";if(Ia||document.activeElement!=Ha)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ha.value=isNaN(ca)?"":ca+" pt";if(Ia||document.activeElement!= Oa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Oa.value=isNaN(ca)?"":ca+" pt";if(Ia||document.activeElement!=Ka)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ka.value=isNaN(ca)?"":ca+" pt"});var db=this.installInputHandler(Da,mxConstants.STYLE_SPACING,2,-999,999," pt");var bb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var ab=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var cb= -this.installInputHandler(Oa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var gb=this.installInputHandler(Ka,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,Wa);this.addKeyHandler(Da,Wa);this.addKeyHandler(ua,Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Oa,Wa);this.addKeyHandler(Ka,Wa);f.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){f.getModel().removeListener(Wa)}});Wa();if(f.cellEditor.isContentEditing()){var kb=!1;d=function(){kb|| +this.installInputHandler(Oa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var gb=this.installInputHandler(Ka,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(G,Wa);this.addKeyHandler(Da,Wa);this.addKeyHandler(ua,Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Oa,Wa);this.addKeyHandler(Ka,Wa);f.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){f.getModel().removeListener(Wa)}});Wa();if(f.cellEditor.isContentEditing()){var kb=!1;d=function(){kb|| (kb=!0,window.setTimeout(function(){var ca=f.getSelectedEditingElement();if(null!=ca){var ya=function(ba,da){if(null!=ba&&null!=da){if(ba==da)return!0;if(ba.length>da.length+1)return ba.substring(ba.length-da.length-1,ba.length)=="-"+da}return!1},Ia=function(ba){if(null!=f.getParentByName(ca,ba,f.cellEditor.textarea))return!0;for(var da=ca;null!=da&&1==da.childNodes.length;)if(da=da.childNodes[0],da.nodeName==ba)return!0;return!1},za=function(ba){ba=null!=ba?ba.fontSize:null;return null!=ba&&"px"== ba.substring(ba.length-2)?parseFloat(ba):mxConstants.DEFAULT_FONTSIZE},u=function(ba,da,ra){return null!=ra.style&&null!=da?(da=da.lineHeight,null!=ra.style.lineHeight&&"%"==ra.style.lineHeight.substring(ra.style.lineHeight.length-1)?parseInt(ra.style.lineHeight)/100:"px"==da.substring(da.length-2)?parseFloat(da)/ba:parseInt(da)):""},z=mxUtils.getCurrentStyle(ca),B=za(z),E=u(B,z,ca),J=ca.getElementsByTagName("*");if(0U&&(A=function(ka){mxEvent.addListener(ka,"mouseenter",function(){ka.style.opacity="1"});mxEvent.addListener(ka,"mouseleave",function(){ka.style.opacity="0.5"})},m=document.createElement("div"), m.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom="0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px", @@ -3257,9 +3259,9 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput, function(){f.set(e.pageFormat)});var g=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});e.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){e.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a}; DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,k,q){mxShape.call(this);this.line=c;this.stroke=k;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxCylinder.call(this)}function x(){mxShape.call(this)} -function A(){mxShape.call(this)}function C(c,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;this.stroke=q;this.strokewidth=null!=l?l:1}function G(){mxActor.call(this)}function D(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function N(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function X(){mxActor.call(this)}function Y(c,k){this.canvas=c;this.canvas.setLineJoin("round"); +function A(){mxShape.call(this)}function C(c,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;this.stroke=q;this.strokewidth=null!=l?l:1}function H(){mxActor.call(this)}function D(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function N(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function X(){mxActor.call(this)}function Y(c,k){this.canvas=c;this.canvas.setLineJoin("round"); this.canvas.setLineCap("round");this.defaultVariation=k;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,Y.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,Y.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,Y.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,Y.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this, -Y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,Y.prototype.arcTo)}function ia(){mxRectangleShape.call(this)}function na(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function qa(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}function R(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function V(){mxShape.call(this)}function ea(){mxShape.call(this)}function O(){mxEllipse.call(this)} +Y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,Y.prototype.arcTo)}function ia(){mxRectangleShape.call(this)}function na(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function qa(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}function R(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function V(){mxShape.call(this)}function ea(){mxShape.call(this)}function O(){mxEllipse.call(this)} function fa(){mxShape.call(this)}function wa(){mxShape.call(this)}function Fa(){mxRectangleShape.call(this)}function ja(){mxShape.call(this)}function ua(){mxShape.call(this)}function Da(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Oa(){mxShape.call(this)}function Ha(){mxCylinder.call(this)}function Ga(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function Wa(){mxDoubleEllipse.call(this)}function db(){mxArrowConnector.call(this); this.spacing=0}function bb(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function gb(){mxActor.call(this)}function kb(){mxActor.call(this)}function ca(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ia(){mxActor.call(this)}function za(){mxActor.call(this)}function u(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function E(){mxActor.call(this)}function J(){mxEllipse.call(this)} function M(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function ba(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Ma(){mxActor.call(this)}function ta(c,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= @@ -3281,7 +3283,7 @@ c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.be 15;x.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);c.translate(k,q);c.begin();c.moveTo(.5*l,0);c.lineTo(l,v);c.lineTo(l,p-v);c.lineTo(.5*l,p);c.lineTo(0,p-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*l,2*v);c.lineTo(l,v);c.moveTo(.5*l,2*v);c.lineTo(.5*l,p);c.stroke()};mxCellRenderer.registerShape("isoCube2", x);mxUtils.extend(A,mxShape);A.prototype.size=15;A.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5* l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",A);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(k,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v, -0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(G,mxActor);G.prototype.redrawPath=function(c,k,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",G);mxUtils.extend(D, +0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(H,mxActor);H.prototype.redrawPath=function(c,k,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",H);mxUtils.extend(D, mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,k,q,l,p){c.translate(k,q);k=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style, "absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p));y=Math.min(y,.5*l,.5*(p-q));k=Math.max(k,y);k=Math.min(l-y,k);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,q)):(c.moveTo(l-k,q),c.lineTo(l-k,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),q));w?(c.moveTo(0,y+q),c.arcTo(y,y,0,0,1,y,q),c.lineTo(l-y,q),c.arcTo(y,y,0,0,1,l,y+q),c.lineTo(l,p-y),c.arcTo(y,y,0,0,1,l-y,p),c.lineTo(y, p),c.arcTo(y,y,0,0,1,0,p-y)):(c.moveTo(0,q),c.lineTo(l,q),c.lineTo(l,p),c.lineTo(0,p));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style, @@ -3320,7 +3322,7 @@ K);var vb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBound 0);k+=v;q+=v;l-=2*v;p-=2*v;0Math.abs(m-d.view.scale)&&r==d.container.scrollLeft&&x==d.container.scrollTop&&A==d.view.translate.x&&C==d.view.translate.y&&f.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?f.actions.get("smartFit").funct(): d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(A){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+A.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= null})}).isEnabled=h;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(f);f.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container, 320,240,!0,!0)}).isEnabled=h;this.addAction("print...",function(){f.showDialog((new PrintDialog(f)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=f.copyXml(), null!=m&&d.removeCells(m,!1)}catch(r){}try{null==m&&mxClipboard.cut(d)}catch(r){f.handleError(r)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){f.handleError(m)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate(); -try{f.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(A){if(null!=A){for(var C=!0,G=0;G/g,"\n"));var G=document.createElement("div"); -G.innerHTML=Graph.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(G.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==A&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"
")),d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}}); -this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(f,m,mxResources.get("apply"),function(x){null!=x&&0"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",m,[r[x]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(f,m,mxResources.get("apply"),function(x){null!=x&&0"];for(var S=0;S");for(var T=0;T
");N.push("")}N.push("");G=N.join("");P.call(F,G);G=F.cellEditor.textarea.getElementsByTagName("table");if(G.length==C.length+1)for(P=G.length-1;0<=P;P--)if(0==P||G[P]!=C[P-1]){F.selectNode(G[P].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,h=null,n=null;null==e&&(a.div.className+=" geToolbarMenu", +Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(C){n=d.getParentByName(mxEvent.getSource(C),"TD");var H=!1;if(null!=n){h=d.getParentByName(n,"TR");var D=mxEvent.isMouseEvent(C)?2:4,F=x,N=Math.min(20,h.sectionRowIndex+D);D=Math.min(20,n.cellIndex+D);for(var P=F.rows.length;P"];for(var S=0;S");for(var T=0;T
");N.push("")}N.push("");H=N.join("");P.call(F,H);H=F.cellEditor.textarea.getElementsByTagName("table");if(H.length==C.length+1)for(P=H.length-1;0<=P;P--)if(0==P||H[P]!=C[P-1]){F.selectNode(H[P].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,h=null,n=null;null==e&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href", -"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,n,t,m,r,x,A,C,G){m=null!=m?m:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div"); -n.style.position="absolute";n.style.left="0px";n.style.right="0px";var D=n.cloneNode(!1),F=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";D.style.top="20px";D.style.bottom="64px";F.style.bottom="0px";F.style.height="60px";F.style.textAlign="center";mxUtils.write(n,b);h.appendChild(n);h.appendChild(D);h.appendChild(F);null!=G&&n.appendChild(G);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete", +"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,n,t,m,r,x,A,C,H){m=null!=m?m:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div"); +n.style.position="absolute";n.style.left="0px";n.style.right="0px";var D=n.cloneNode(!1),F=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";D.style.top="20px";D.style.bottom="64px";F.style.bottom="0px";F.style.height="60px";F.style.textAlign="center";mxUtils.write(n,b);h.appendChild(n);h.appendChild(D);h.appendChild(F);null!=H&&n.appendChild(H);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete", "off");N.setAttribute("autocapitalize","off");mxUtils.write(N,e||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};D.appendChild(N);null!=A&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(A)}),b.className="geBtn",F.appendChild(b));if(null!=C)for(b=0;bMAX_AREA||0>=C.value?"red":"";G.style.backgroundColor=C.value*G.value>MAX_AREA||0>=G.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/ +var ExportDialog=function(a){function b(){var X=r.value,Y=X.lastIndexOf(".");r.value=0MAX_AREA||0>=C.value?"red":"";H.style.backgroundColor=C.value*H.value>MAX_AREA||0>=H.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var t=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m); t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m)); m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);a.printPdfExport||(m=document.createElement("option"),m.setAttribute("value","pdf"),mxUtils.write(m,mxResources.get("formatPdf")),x.appendChild(m));m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m, mxResources.get("formatXml")),x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var A=document.createElement("input");A.setAttribute("type","number");A.setAttribute("value","100");A.style.width="180px";m=document.createElement("td");m.appendChild(A);g.appendChild(m);t.appendChild(g);g=document.createElement("tr"); -m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var C=document.createElement("input");C.setAttribute("value",h);C.style.width="180px";m=document.createElement("td");m.appendChild(C);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var G=document.createElement("input");G.setAttribute("value",n);G.style.width= -"180px";m=document.createElement("td");m.appendChild(G);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var D=document.createElement("select");D.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");D.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");D.appendChild(m); +m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var C=document.createElement("input");C.setAttribute("value",h);C.style.width="180px";m=document.createElement("td");m.appendChild(C);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var H=document.createElement("input");H.setAttribute("value",n);H.style.width= +"180px";m=document.createElement("td");m.appendChild(H);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var D=document.createElement("select");D.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");D.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");D.appendChild(m); m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");D.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");D.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));D.appendChild(m);var F=document.createElement("input");F.style.width="180px";F.style.display="none";F.setAttribute("value","100");F.setAttribute("type","number");F.setAttribute("min", "50");F.setAttribute("step","50");var N=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display="",F.focus()):(F.value=this.value,N||(A.value=this.value))});mxEvent.addListener(F,"change",function(){var X=parseInt(F.value);isNaN(X)||0>=X?F.style.backgroundColor="red":(F.style.backgroundColor="",N||(A.value=X))});m=document.createElement("td");m.appendChild(D);m.appendChild(F);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td"); m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=null==f.background||f.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(P);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m); var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=!1;m=document.createElement("td");m.appendChild(S);g.appendChild(m);t.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var T=document.createElement("input");T.setAttribute("type","number");T.setAttribute("value",ExportDialog.lastBorderValue);T.style.width="180px";m=document.createElement("td");m.appendChild(T); -g.appendChild(m);t.appendChild(g);d.appendChild(t);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(A,"change",function(){N=!0;var X=Math.max(0,parseFloat(A.value)||100)/100;A.value=parseFloat((100*X).toFixed(2));0=parseInt(A.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var X=r.value,Y=x.value,ia=Math.max(0,parseFloat(A.value)||100)/ +g.appendChild(m);t.appendChild(g);d.appendChild(t);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(A,"change",function(){N=!0;var X=Math.max(0,parseFloat(A.value)||100)/100;A.value=parseFloat((100*X).toFixed(2));0=parseInt(A.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var X=r.value,Y=x.value,ia=Math.max(0,parseFloat(A.value)||100)/ 100,na=Math.max(0,parseInt(T.value)),ka=f.background,qa=Math.max(1,parseInt(F.value));if(("svg"==Y||"png"==Y||"pdf"==Y)&&P.checked)ka=null;else if(null==ka||ka==mxConstants.NONE)ka="#ffffff";ExportDialog.lastBorderValue=na;ExportDialog.exportFile(a,X,Y,ka,ia,na,qa,S.checked)}}));Z.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(Z)):(m.appendChild(Z),m.appendChild(U)); g.appendChild(m);t.appendChild(g);d.appendChild(t);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,e,f,g,d,h,n){n=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(f,g,d)),b,e);else{var t=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-t.x)/n.view.scale),Math.floor((d/g-t.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(t.width*g/n.view.scale+2*d);g=Math.ceil(t.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*gY.name?1:0});if(null!=G){r=document.createElement("div"); -r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,G);var P=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(X){X=new FilenameDialog(a,G,mxResources.get("apply"),mxUtils.bind(this,function(Y){if(null!=Y&&0Y.name?1:0});if(null!=H){r=document.createElement("div"); +r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,H);var P=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(X){X=new FilenameDialog(a,H,mxResources.get("apply"),mxUtils.bind(this,function(Y){if(null!=Y&&0X.indexOf(":"))try{var Y=mxUtils.indexOf(x,X);if(0<=Y&&null!=A[Y])A[Y].focus();else{d.cloneNode(!1).setAttribute(X,""); 0<=Y&&(x.splice(Y,1),A.splice(Y,1));x.push(X);var ia=m.addTextarea(X+":","",2);ia.style.width="100%";A.push(ia);D(ia,X);ia.focus()}T.setAttribute("disabled","disabled");S.value=""}catch(na){mxUtils.alert(na)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(S,"keypress",function(X){13==X.keyCode&&T.click()});this.init=function(){0")});mxEvent.addListener(R,"dragend",function(O){null!=A&&null!=C&&t.addCell(L,t.model.root,C);C=A=null;O.stopPropagation();O.preventDefault()});var V=document.createElement("img");V.setAttribute("draggable","false");V.setAttribute("align","top");V.setAttribute("border","0");V.style.width="16px";V.style.padding= -"0px 6px 0 4px";V.style.marginTop="2px";V.style.cursor="pointer";V.setAttribute("title",mxResources.get(t.model.isVisible(L)?"hide":"show"));t.model.isVisible(L)?(V.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(R,75)):(V.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(R,25));Editor.isDarkMode()&&(V.style.filter="invert(100%)");H.appendChild(V);mxEvent.addListener(V,"click",function(O){t.model.setVisible(L,!t.model.isVisible(L));mxEvent.consume(O)});V=document.createElement("img"); +"0px 6px 0 4px";V.style.marginTop="2px";V.style.cursor="pointer";V.setAttribute("title",mxResources.get(t.model.isVisible(L)?"hide":"show"));t.model.isVisible(L)?(V.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(R,75)):(V.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(R,25));Editor.isDarkMode()&&(V.style.filter="invert(100%)");G.appendChild(V);mxEvent.addListener(V,"click",function(O){t.model.setVisible(L,!t.model.isVisible(L));mxEvent.consume(O)});V=document.createElement("img"); V.setAttribute("draggable","false");V.setAttribute("align","top");V.setAttribute("border","0");V.style.width="16px";V.style.padding="0px 6px 0 0";V.style.marginTop="2px";V.setAttribute("title",mxResources.get("lockUnlock"));var ea=t.getCurrentCellStyle(L);"1"==mxUtils.getValue(ea,"locked","0")?(V.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(V,75)):(V.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(V,25));Editor.isDarkMode()&&(V.style.filter="invert(100%)");t.isEnabled()&& -(V.style.cursor="pointer");mxEvent.addListener(V,"click",function(O){if(t.isEnabled()){var fa=null;t.getModel().beginUpdate();try{fa="1"==mxUtils.getValue(ea,"locked","0")?null:"1",t.setCellStyles("locked",fa,[L])}finally{t.getModel().endUpdate()}"1"==fa&&t.removeSelectionCells(t.getModel().getDescendants(L));mxEvent.consume(O)}});H.appendChild(V);V=document.createElement("span");mxUtils.write(V,qa);V.style.display="block";V.style.whiteSpace="nowrap";V.style.overflow="hidden";V.style.textOverflow= -"ellipsis";V.style.position="absolute";V.style.left="52px";V.style.right="8px";V.style.top="8px";H.appendChild(V);R.appendChild(H);if(t.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)qa=document.createElement("div"),qa.style.display="block",qa.style.textAlign="right",qa.style.whiteSpace="nowrap",qa.style.position="absolute",qa.style.right="16px",qa.style.top="6px",0document.documentMode)qa=document.createElement("div"),qa.style.display="block",qa.style.textAlign="right",qa.style.whiteSpace="nowrap",qa.style.position="absolute",qa.style.right="16px",qa.style.top="6px",0f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,e,f,c,l,m,x,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var D=0;Dd){for(D=0;Dg.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(p){try{var q=null!=g?"Report":"Error",t=this.ui.getHashValueForPages(p.getShadowPages());EditorUi.logError("Checksum "+q+" in "+l+" "+G,null,this.getMode()+"."+this.getId(),"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=x?"-current_"+x:"")+(null!=u? -"-rev_"+this.ui.hashValue(u):"")+(null!=t?"-latest_"+t:"")+(null!=p?"-latestRev_"+this.ui.hashValue(p.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+G,action:l,label:"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+"-size_"+this.getSize()})}catch(v){}}),b)}}catch(p){}}; -DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),u=null!=x?this.ui.hashValue(x.id):"unknown",D=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),z=E.lastIndexOf(".");x="xml";0g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(p){try{var q=null!=g?"Report":"Error",t=this.ui.getHashValueForPages(p.getShadowPages());EditorUi.logError("Checksum "+q+" in "+l+" "+G,null,this.getMode()+"."+this.getId(),"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=v?"-current_"+v:"")+(null!=y? +"-rev_"+this.ui.hashValue(y):"")+(null!=t?"-latest_"+t:"")+(null!=p?"-latestRev_"+this.ui.hashValue(p.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+G,action:l,label:"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+"-size_"+this.getSize()})}catch(u){}}),b)}}catch(p){}}; +DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),v=this.getCurrentUser(),y=null!=v?this.ui.hashValue(v.id):"unknown",D=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),z=E.lastIndexOf(".");v="xml";0mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=M;this.changeListenerEnabled=D;f||(l.history=m,l.indexOfNextAdd=x,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)z!=u.mathEnabled? -(this.ui.editor.updateGraphComponents(),u.refresh()):(E!=u.foldingEnabled?u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; +DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,m=l.history.slice(),v=l.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var D=this.changeListenerEnabled;this.changeListenerEnabled=f;var E=y.foldingEnabled,z=y.mathEnabled,M=y.cellRenderer.redraw;y.cellRenderer.redraw=function(G){G.view.graph.isEditing(G.cell)&&(G.view.graph.scrollCellToVisible(G.cell),G.view.graph.cellEditor.resize());M.apply(this,arguments)};y.model.beginUpdate(); +try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=M;this.changeListenerEnabled=D;f||(l.history=m,l.indexOfNextAdd=v,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)z!=y.mathEnabled? +(this.ui.editor.updateGraphComponents(),y.refresh()):(E!=y.foldingEnabled?y.view.revalidate():y.view.validate(),y.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; DrawioFile.prototype.save=function(b,e,f,c,l,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")}); -else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=f)f(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; +else throw Error(mxResources.get("readOnly"));}catch(v){if(null!=f)f(v);else throw v;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,f){}; DrawioFile.prototype.saveFile=function(b,e,f,c){};DrawioFile.prototype.getFileUrl=function(){return null};DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified}; DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1}; @@ -10900,143 +10902,143 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u !1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))}; DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+ ")":"")+""))))}; -DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(x){this.handleFileError(x,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& +DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(v){this.handleFileError(v,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,f,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,c,l):this.invalidChecksum?this.showRefreshDialog(f,c,this.getErrorMessage(b)):e?this.showConflictDialog(l,m):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); this.synchronizeFile(f,c)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT?e=mxResources.get("timeout"):"0"==e&&(e=mxResources.get("noResponse"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck(); null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(f){b(e,f)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; DrawioFile.prototype.fileSaved=function(b,e,f,c,l){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,l)}catch(D){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=c&&c(D);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,D);else{var x=this.getCurrentUser(),u=null!=x?x.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),u,D)}}catch(E){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=c&&c(D)}}; +!0;this.descriptorChanged();null!=c&&c(D);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,D);else{var v=this.getCurrentUser(),y=null!=v?v.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),y,D)}}catch(E){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=c&&c(D)}}; DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosavethis.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var f=b.lastIndexOf(".");b=0"===l.substring(0,12)),x=(null==b||"L"==b)&&""===l.substring(0,11);(m||x)&&e.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return e}; +StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f"===l.substring(0,12)),v=(null==b||"L"==b)&&""===l.substring(0,11);(m||v)&&e.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return e}; StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var f=b.transaction(["files","filesInfo"],"readwrite");b=f.objectStore("files");f=f.objectStore("filesInfo");for(var c=0;cf&&(mxUtils.br(D),x=1);var v=document.createElement("a");v.style.overflow="hidden";v.style.display="inline-block";v.className="geBaseButton";v.style.boxSizing="border-box";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.marginTop="8px";v.style.marginBottom="0px";v.style.padding="8px 10px 8px 10px";v.style.width="88px";v.style.height="100px";v.style.whiteSpace="nowrap";v.setAttribute("title",G);var C=document.createElement("div");C.style.textOverflow= -"ellipsis";C.style.overflow="hidden";C.style.position="absolute";C.style.bottom="8px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,G);v.appendChild(C);if(null!=M){var H=document.createElement("img");H.setAttribute("src",M);H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="60px";H.style.height="60px";H.style.paddingBottom="6px";v.appendChild(H)}else C.style.paddingTop="5px",C.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top= -"6px"):mxClient.IS_FF&&(C.style.paddingTop="0px",C.style.marginTop="-2px");if(null!=p)for(M=0;Mf&&(mxUtils.br(D),v=1);var u=document.createElement("a");u.style.overflow="hidden";u.style.display="inline-block";u.className="geBaseButton";u.style.boxSizing="border-box";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.marginTop="8px";u.style.marginBottom="0px";u.style.padding="8px 10px 8px 10px";u.style.width="88px";u.style.height="100px";u.style.whiteSpace="nowrap";u.setAttribute("title",G);var B=document.createElement("div");B.style.textOverflow= +"ellipsis";B.style.overflow="hidden";B.style.position="absolute";B.style.bottom="8px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,G);u.appendChild(B);if(null!=M){var H=document.createElement("img");H.setAttribute("src",M);H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="60px";H.style.height="60px";H.style.paddingBottom="6px";u.appendChild(H)}else B.style.paddingTop="5px",B.style.whiteSpace="normal",mxClient.IS_IOS?(u.style.padding="0px 10px 20px 10px",u.style.top= +"6px"):mxClient.IS_FF&&(B.style.paddingTop="0px",B.style.marginTop="-2px");if(null!=p)for(M=0;M '+mxResources.get("googleDriveMissingClickHere")+"",l.appendChild(E))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width= "32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB? (c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var m=document.createElement("button"); -m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var x=document.createElement("table"),u=document.createElement("tbody"),D=document.createElement("tr"),E=document.createElement("td"),z=document.createElement("td");x.setAttribute("align", -"center");E.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);z.style.textAlign="left";z.appendChild(c);D.appendChild(E);D.appendChild(z);u.appendChild(D);x.appendChild(u);e.appendChild(x);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, +m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var v=document.createElement("table"),y=document.createElement("tbody"),D=document.createElement("tr"),E=document.createElement("td"),z=document.createElement("td");v.setAttribute("align", +"center");E.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);z.style.textAlign="left";z.appendChild(c);D.appendChild(E);D.appendChild(z);y.appendChild(D);v.appendChild(y);e.appendChild(v);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f, mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m, mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});l.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&& mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(d){m.style.marginBottom="24px";var g=document.createElement("a");g.style.display="inline-block";g.style.color="gray";g.style.cursor="pointer";g.style.marginTop="6px";mxUtils.write(g,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(g,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){d()})});l.appendChild(g)},b.mode==App.MODE_GOOGLE&& -null!=b.drive){var M=b.drive.getUsersList();if(0"),x.setAttribute("disabled","disabled"),G.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=M.length;G.appendChild(x);mxEvent.addListener(G,"change",function(){var d=G.value,g=M.length!=d;g&&b.drive.setUser(M[d]);b.drive.authorize(g,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(G)}else f(function(){b.drive.logout()})}else b.mode!= +null!=b.drive){var M=b.drive.getUsersList();if(0"),v.setAttribute("disabled","disabled"),G.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=M.length;G.appendChild(v);mxEvent.addListener(G,"change",function(){var d=G.value,g=M.length!=d;g&&b.drive.setUser(M[d]);b.drive.authorize(g,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(G)}else f(function(){b.drive.logout()})}else b.mode!= App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();var d=document.createElement("form");d.setAttribute("method","post");d.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");d.setAttribute("target","_blank");document.body.appendChild(d);d.submit();d.parentNode.removeChild(d)}):b.mode==App.MODE_TRELLO&& -null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,x,u,D){x=null!=x?x:"Check out the diagram I made using @drawio";c=document.createElement("div");var E=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5> +null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,v,y,D){v=null!=v?v:"Check out the diagram I made using @drawio";c=document.createElement("div");var E=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5> e.length?E?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(e.length));c.appendChild(m);var z=document.createElement("textarea");z.setAttribute("autocomplete","off");z.setAttribute("autocorrect","off");z.setAttribute("autocapitalize","off");z.setAttribute("spellcheck","false");z.style.fontFamily="monospace";z.style.wordBreak="break-all";z.style.marginTop= "10px";z.style.resize="none";z.style.height="150px";z.style.width="440px";z.style.border="1px solid gray";z.value=mxResources.get("updatingDocument");c.appendChild(z);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(z.value=e,z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)):(z.setAttribute("readonly","true"),z.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position= -"absolute";m.style.bottom="36px";m.style.right="32px";var M=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!E||navigator.standalone||!(E||mxClient.IS_SVG&&(null==document.documentMode||9e.length?"preview":"openInNewWindow"),function(){var d=5E5>e.length?z.value:e;if(null!=l)l(d);else if(E)try{var g=b.openLink(d);null!=g&&(null==f||0e.length?"preview":"openInNewWindow"),function(){var d=5E5>e.length?z.value:e;if(null!=l)l(d);else if(E)try{var g=b.openLink(d);null!=g&&(null==f||0"+encodeURIComponent(mxResources.get("preview"))+''+e+""),p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}), -M.className="geBtn",m.appendChild(M));if(!E||7500e.length){var G=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(z.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}); -u=document.createElement("img");u.setAttribute("src",Editor.facebookImage);u.setAttribute("width","18");u.setAttribute("height","18");u.setAttribute("border","0");G.appendChild(u);G.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");G.style.verticalAlign="bottom";G.style.paddingTop="4px";G.style.minWidth="46px";G.className="geBtn";m.appendChild(G)}7168>e.length&&(G=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+ -"&url="+encodeURIComponent(z.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",G.appendChild(u),G.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),G.style.verticalAlign="bottom",G.style.paddingTop="4px",G.style.minWidth="46px", -G.className="geBtn",m.appendChild(G))}!b.isOffline()&&5E5>e.length&&(G=mxUtils.button("",function(){try{var d="mailto:?subject="+encodeURIComponent(D||b.defaultFilename)+"&body="+encodeURIComponent(z.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.className="geAdaptiveAsset",u.setAttribute("src",Editor.mailImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom= -"5px",G.appendChild(u),G.style.verticalAlign="bottom",G.style.paddingTop="4px",G.style.minWidth="46px",G.className="geBtn",m.appendChild(G));u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(u);G=mxUtils.button(mxResources.get("copy"),function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF|| -null!=document.documentMode?u.className="geBtn gePrimaryBtn":(m.appendChild(G),G.className="geBtn gePrimaryBtn",u.className="geBtn"):null!=M&&(m.appendChild(M),u.className="geBtn",M.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(b,e){function f(){var y=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;if(H.checked&&""!=G.value){var F="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(G.value));null!=y&&(F+="&title="+encodeURIComponent(y));0e.length){var G=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(z.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}); +y=document.createElement("img");y.setAttribute("src",Editor.facebookImage);y.setAttribute("width","18");y.setAttribute("height","18");y.setAttribute("border","0");G.appendChild(y);G.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");G.style.verticalAlign="bottom";G.style.paddingTop="4px";G.style.minWidth="46px";G.className="geBtn";m.appendChild(G)}7168>e.length&&(G=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+ +"&url="+encodeURIComponent(z.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",G.appendChild(y),G.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),G.style.verticalAlign="bottom",G.style.paddingTop="4px",G.style.minWidth="46px", +G.className="geBtn",m.appendChild(G))}!b.isOffline()&&5E5>e.length&&(G=mxUtils.button("",function(){try{var d="mailto:?subject="+encodeURIComponent(D||b.defaultFilename)+"&body="+encodeURIComponent(z.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.className="geAdaptiveAsset",y.setAttribute("src",Editor.mailImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom= +"5px",G.appendChild(y),G.style.verticalAlign="bottom",G.style.paddingTop="4px",G.style.minWidth="46px",G.className="geBtn",m.appendChild(G));y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(y);G=mxUtils.button(mxResources.get("copy"),function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF|| +null!=document.documentMode?y.className="geBtn gePrimaryBtn":(m.appendChild(G),G.className="geBtn gePrimaryBtn",y.className="geBtn"):null!=M&&(m.appendChild(M),y.className="geBtn",M.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0; +var GoogleSitesDialog=function(b,e){function f(){var x=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;if(H.checked&&""!=G.value){var F="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(G.value));null!=x&&(F+="&title="+encodeURIComponent(x));0 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==d&&"svg"==C?window.setTimeout(function(){b.spinner.stop();t(d,C,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", -295,212)},200):b.generatePlantUmlImage(d,C,function(P,V,n){b.spinner.stop();t(d,C,P,V,n)},function(P){b.handleError(P)})}}else if("mermaid"==g||"mermaid2drawio"==g){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var H=0;0==q[H].trim().length;)H++;H=q[H].trim().toLowerCase();q=H.indexOf(" ");H=H.substring(0,0");2<=Q.length&&(J=N(Q[0]),I=N(Q[Q.length-1]),Q=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml": -"plantUmlSvg"==u.value||"plantUmlTxt"==u.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize= -"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName())u.style.display="none";var D=document.createElement("option");D.setAttribute("value","list");mxUtils.write(D,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(D);null!=f&&"fromText"!=f||D.setAttribute("selected","selected");D=document.createElement("option");D.setAttribute("value", -"table");mxUtils.write(D,mxResources.get("formatSql"));"formatSql"==f&&(u.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","mermaid2drawio");mxUtils.write(D,mxResources.get("diagram"));var E=document.createElement("option");E.setAttribute("value","mermaid");mxUtils.write(E,mxResources.get("image"));"mermaid"==f&&(u.appendChild(D),D.setAttribute("selected","selected"),u.appendChild(E));D=document.createElement("option");D.setAttribute("value", -"diagram");mxUtils.write(D,mxResources.get("diagram"));E=document.createElement("option");E.setAttribute("value","circle");mxUtils.write(E,mxResources.get("circle"));var z=document.createElement("option");z.setAttribute("value","horizontalFlow");mxUtils.write(z,mxResources.get("horizontalFlow"));var M=document.createElement("option");M.setAttribute("value","verticalFlow");mxUtils.write(M,mxResources.get("verticalFlow"));"plantUml"!=f&&"mermaid"!=f&&(u.appendChild(D),u.appendChild(E),u.appendChild(z), -u.appendChild(M));D=document.createElement("option");D.setAttribute("value","plantUmlSvg");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&D.setAttribute("selected","selected");E=document.createElement("option");E.setAttribute("value","plantUmlPng");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");z=document.createElement("option");z.setAttribute("value","plantUmlTxt");mxUtils.write(z,mxResources.get("plantUml")+" ("+ -mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(u.appendChild(D),u.appendChild(E),u.appendChild(z));var G=l();x.value=G;e.appendChild(x);this.init=function(){x.focus()};Graph.fileSupport&&(x.addEventListener("dragover",function(d){d.stopPropagation();d.preventDefault()},!1),x.addEventListener("drop",function(d){d.stopPropagation();d.preventDefault();if(0 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==d&&"svg"==B?window.setTimeout(function(){b.spinner.stop();t(d,B,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", +295,212)},200):b.generatePlantUmlImage(d,B,function(P,V,n){b.spinner.stop();t(d,B,P,V,n)},function(P){b.handleError(P)})}}else if("mermaid"==g||"mermaid2drawio"==g){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var H=0;0==q[H].trim().length;)H++;H=q[H].trim().toLowerCase();q=H.indexOf(" ");H=H.substring(0,0");2<=Q.length&&(J=N(Q[0]),I=N(Q[Q.length-1]),Q=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml": +"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var v=document.createElement("textarea");v.style.boxSizing="border-box";v.style.resize= +"none";v.style.width="100%";v.style.height="354px";v.style.marginBottom="16px";var y=document.createElement("select");y.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName())y.style.display="none";var D=document.createElement("option");D.setAttribute("value","list");mxUtils.write(D,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&y.appendChild(D);null!=f&&"fromText"!=f||D.setAttribute("selected","selected");D=document.createElement("option");D.setAttribute("value", +"table");mxUtils.write(D,mxResources.get("formatSql"));"formatSql"==f&&(y.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","mermaid2drawio");mxUtils.write(D,mxResources.get("diagram"));var E=document.createElement("option");E.setAttribute("value","mermaid");mxUtils.write(E,mxResources.get("image"));"mermaid"==f&&(y.appendChild(D),D.setAttribute("selected","selected"),y.appendChild(E));D=document.createElement("option");D.setAttribute("value", +"diagram");mxUtils.write(D,mxResources.get("diagram"));E=document.createElement("option");E.setAttribute("value","circle");mxUtils.write(E,mxResources.get("circle"));var z=document.createElement("option");z.setAttribute("value","horizontalFlow");mxUtils.write(z,mxResources.get("horizontalFlow"));var M=document.createElement("option");M.setAttribute("value","verticalFlow");mxUtils.write(M,mxResources.get("verticalFlow"));"plantUml"!=f&&"mermaid"!=f&&(y.appendChild(D),y.appendChild(E),y.appendChild(z), +y.appendChild(M));D=document.createElement("option");D.setAttribute("value","plantUmlSvg");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&D.setAttribute("selected","selected");E=document.createElement("option");E.setAttribute("value","plantUmlPng");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");z=document.createElement("option");z.setAttribute("value","plantUmlTxt");mxUtils.write(z,mxResources.get("plantUml")+" ("+ +mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(y.appendChild(D),y.appendChild(E),y.appendChild(z));var G=l();v.value=G;e.appendChild(v);this.init=function(){v.focus()};Graph.fileSupport&&(v.addEventListener("dragover",function(d){d.stopPropagation();d.preventDefault()},!1),v.addEventListener("drop",function(d){d.stopPropagation();d.preventDefault();if(0";if(Ha||"undefined"===typeof mxMermaidToDrawio)ba=ma=sa;sa=n.cloneNode(!0);na.appendChild(sa);Ia=function(Ja){T=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ma=function(Ja){T||C(Qa,mxEvent.getClientX(Ja),mxEvent.getClientY(Ja),Sa,Oa)};mxEvent.addGestureListeners(Sa, +"pointer";Sa.style.width="100%";Sa.style.height="100%";na.appendChild(Sa);sa=b.createMermaidXml("%% Input: "+Oa+"\n"+sa,EditorUi.defaultMermaidConfig,Ia,Ma,Xa);var Qa=""+Graph.compress(sa)+"";if(Ha||"undefined"===typeof mxMermaidToDrawio)ba=ma=sa;sa=n.cloneNode(!0);na.appendChild(sa);Ia=function(Ja){T=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ma=function(Ja){T||B(Qa,mxEvent.getClientX(Ja),mxEvent.getClientY(Ja),Sa,Oa)};mxEvent.addGestureListeners(Sa, Ia,null,Ma);mxEvent.addGestureListeners(sa,Ia,null,Ma)},function(sa){b.handleError(sa)})});Na.setAttribute("disabled","disabled");Na.className="geBtn gePrimaryBtn";pa=function(){window.setTimeout(function(){""!=la.value?Na.removeAttribute("disabled"):Na.setAttribute("disabled","disabled")},0)};ka=urlParams["smart-template"];null!=ka&&"1"!=ka&&(la.value=decodeURIComponent(ka),pa());mxEvent.addListener(la,"change",pa);mxEvent.addListener(la,"keydown",pa);mxEvent.addListener(la,"cut",pa);mxEvent.addListener(la, "paste",pa);mxEvent.addListener(la,"keydown",function(Ha){13==Ha.keyCode&&Na.click()});pa=document.createElement("div");pa.style.height="40px";pa.style.marginTop="4px";pa.style.marginBottom="4px";pa.style.whiteSpace="nowrap";pa.style.overflowX="auto";pa.style.overflowY="hidden";pa.appendChild(ha);pa.appendChild(Na);aa.appendChild(pa);aa.appendChild(na);return aa}function K(){if(za&&null!=d)f||b.hideDialog(),d(za,Ca,L.value);else if(c)f||b.hideDialog(),c(ma,L.value,Ba,ea);else{var aa=L.value;null!= -aa&&0=Ya.getStatus()&&(Ia=Ya.getText());Wa(Ia,Ma)}))):Wa(Ia,Ma)}function Oa(Ta,Wa){if(null==aa||A||b.sidebar.currentElt==sa)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=O){var Ya=""+Graph.compress('')+"";C(Ya,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),na,aa)}else b.sidebar.currentElt=sa,A=!0,Ka(aa,function($a){A&&b.sidebar.currentElt==sa&&C($a,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),sa,Wa);A=!1})}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height= +O.src+';imageAspect=1;" parent="1" vertex="1">')+"";B(Ya,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),na,aa)}else b.sidebar.currentElt=sa,A=!0,Ka(aa,function($a){A&&b.sidebar.currentElt==sa&&B($a,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),sa,Wa);A=!1})}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height= La+"px";sa.style.width=oa+"px";sa.style.border="1px solid transparent";var Ia=null,Ma=aa;null!=na?sa.setAttribute("title",mxResources.get(na,null,na)):null!=pa&&0=fa.scrollHeight&&(v(),mxEvent.consume(sa))}));if(0=fa.scrollHeight&&(u(),mxEvent.consume(sa))}));if(0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;x=null!=x?x:Editor.isDarkMode()?Editor.darkColor:"#ebf2f9";u=null!=u?u:Editor.isDarkMode()?"#fff":"#e6eff8";D=null!=D?D:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";z=null!=z?z:EditorUi.templateFile; +ha.setAttribute("title",wa),mxUtils.write(ha,wa);null!=E&&(ha.style.padding=E);ta.appendChild(ha);null==Fa&&0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;v=null!=v?v:Editor.isDarkMode()?Editor.darkColor:"#ebf2f9";y=null!=y?y:Editor.isDarkMode()?"#fff":"#e6eff8";D=null!=D?D:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";z=null!=z?z:EditorUi.templateFile; var J=document.createElement("div");J.style.userSelect="none";J.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="46px";f&&J.appendChild(N);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg": -b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||B||!f||N.appendChild(I);f&&mxUtils.write(N,(B?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+ +b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||C||!f||N.appendChild(I);f&&mxUtils.write(N,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+ ":");I=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var L=document.createElement("input");L.setAttribute("value",b.defaultFilename+I);L.style.marginLeft="10px"; -L.style.width=e||B?"144px":"244px";this.init=function(){f&&(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));null!=fa.parentNode&&null!=fa.parentNode.parentNode&&mxEvent.addGestureListeners(fa.parentNode.parentNode,mxUtils.bind(this,function(aa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(L),t?L.style.width=e||B?"350px":"450px":(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,L,b.editor.diagramFileTypes), -t.style.marginLeft="6px",t.style.width=e||B?"80px":"180px",N.appendChild(t)),null!=b.editor.fileExtensions&&(B=FilenameDialog.createTypeHint(b,L,b.editor.fileExtensions),B.style.marginTop="12px",N.appendChild(B))));N=!1;var Q=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),V=mxUtils.button(p||mxResources.get("create"),function(){V.setAttribute("disabled","disabled");K();V.removeAttribute("disabled")});V.className= +L.style.width=e||C?"144px":"244px";this.init=function(){f&&(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));null!=fa.parentNode&&null!=fa.parentNode.parentNode&&mxEvent.addGestureListeners(fa.parentNode.parentNode,mxUtils.bind(this,function(aa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(L),t?L.style.width=e||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,L,b.editor.diagramFileTypes), +t.style.marginLeft="6px",t.style.width=e||C?"80px":"180px",N.appendChild(t)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,L,b.editor.fileExtensions),C.style.marginTop="12px",N.appendChild(C))));N=!1;var Q=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),V=mxUtils.button(p||mxResources.get("create"),function(){V.setAttribute("disabled","disabled");K();V.removeAttribute("disabled")});V.className= "geBtn gePrimaryBtn";var n=document.createElement("img");n.setAttribute("src",Sidebar.prototype.searchImage);n.setAttribute("title",mxResources.get("preview"));n.className="geActiveButton";n.style.position="absolute";n.style.cursor="default";n.style.padding="8px";n.style.right="0px";n.style.top="0px";var A=!1,O=null,T=!1;if(M||G){var R=[],W=null,S=null,U=null,X=function(aa){V.setAttribute("disabled","disabled");for(var la=0;lae.lastIndexOf(".")&&0>R){O=null!=O?O:F.value;var W="";O==App.MODE_GOOGLE?W=b.drive.extension:O==App.MODE_GITHUB?W=b.gitHub.extension:O==App.MODE_GITLAB?W=b.gitLab.extension:O==App.MODE_TRELLO?W=b.trello.extension:O==App.MODE_DROPBOX?W=b.dropbox.extension:O==App.MODE_ONEDRIVE?W=b.oneDrive.extension:O==App.MODE_DEVICE&& -(W=".drawio");0<=R&&(T=T.substring(0,R));H.value=T+W}}v(N)})}var Q=document.createElement("a");Q.style.overflow="hidden";var P=document.createElement("img");P.src=B;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";Q.style.display="inline-block";Q.className="geBaseButton";Q.style.position="relative";Q.style.margin="4px";Q.style.padding="8px 8px 10px 8px";Q.style.whiteSpace="nowrap";Q.appendChild(P);Q.style.color= +var CreateDialog=function(b,e,f,c,l,m,v,y,D,E,z,M,G,d,g,p,q){function t(C,J,N,I){function L(){mxEvent.addListener(Q,"click",function(){var O=N;if(v){var T=H.value,R=T.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>R){O=null!=O?O:F.value;var W="";O==App.MODE_GOOGLE?W=b.drive.extension:O==App.MODE_GITHUB?W=b.gitHub.extension:O==App.MODE_GITLAB?W=b.gitLab.extension:O==App.MODE_TRELLO?W=b.trello.extension:O==App.MODE_DROPBOX?W=b.dropbox.extension:O==App.MODE_ONEDRIVE?W=b.oneDrive.extension:O==App.MODE_DEVICE&& +(W=".drawio");0<=R&&(T=T.substring(0,R));H.value=T+W}}u(N)})}var Q=document.createElement("a");Q.style.overflow="hidden";var P=document.createElement("img");P.src=C;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";Q.style.display="inline-block";Q.className="geBaseButton";Q.style.position="relative";Q.style.margin="4px";Q.style.padding="8px 8px 10px 8px";Q.style.whiteSpace="nowrap";Q.appendChild(P);Q.style.color= "gray";Q.style.fontSize="11px";var V=document.createElement("div");Q.appendChild(V);mxUtils.write(V,J);if(null!=I&&null==b[I]){P.style.visibility="hidden";mxUtils.setOpacity(V,10);var n=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});n.spin(Q);var A=window.setTimeout(function(){null==b[I]&&(n.stop(),Q.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(A), -mxUtils.setOpacity(V,100),P.style.visibility="",n.stop(),L())}))}else L();k.appendChild(Q);++y==M&&(mxUtils.br(k),y=0)}function v(B){var J=H.value;if(null==B||null!=J&&0'],{type:"text/html"})});navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),p.style.marginTop="6px",p.className="geBtn");D&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(B){mxEvent.isPopupTrigger(B)||v("_blank")}))}mxUtils.br(m);var k=document.createElement("div");k.style.textAlign="center";var y=0;k.style.marginTop="6px"; +"data:"+d+";base64,"+K);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||"image/png"!=d||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(C){C=b.base64ToBlob(K,"image/png");C=new ClipboardItem({"image/png":C,"text/html":new Blob([''],{type:"text/html"})});navigator.clipboard.write([C]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),p.style.marginTop="6px",p.className="geBtn");D&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(C){mxEvent.isPopupTrigger(C)||u("_blank")}))}mxUtils.br(m);var k=document.createElement("div");k.style.textAlign="center";var x=0;k.style.marginTop="6px"; m.appendChild(k);var F=document.createElement("select");F.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(G,mxResources.get("googleDrive")),F.appendChild(G),t(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_ONEDRIVE), mxUtils.write(G,mxResources.get("oneDrive")),F.appendChild(G),b.mode==App.MODE_ONEDRIVE&&G.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(G,mxResources.get("dropbox")),F.appendChild(G),b.mode==App.MODE_DROPBOX&&G.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"), App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_GITHUB),mxUtils.write(G,mxResources.get("github")),F.appendChild(G),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_GITLAB),mxUtils.write(G,mxResources.get("gitlab")),F.appendChild(G),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")), "function"===typeof window.TrelloClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_TRELLO),mxUtils.write(G,mxResources.get("trello")),F.appendChild(G),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)G=document.createElement("option"),G.setAttribute("value",App.MODE_DEVICE),mxUtils.write(G,mxResources.get("device")),F.appendChild(G), -b.mode!=App.MODE_DEVICE&&u||G.setAttribute("selected","selected"),z&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),F.appendChild(u),b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div"); -u.style.marginTop="26px";u.style.textAlign="center";null!=E&&(z=mxUtils.button(mxResources.get("help"),function(){b.openLink(E)}),z.className="geBtn",u.appendChild(z));z=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});z.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(z);null==c&&(G=mxUtils.button(mxResources.get("decideLater"),function(){v(null)}),G.className="geBtn", -u.appendChild(G));D&&Editor.popupsAllowed&&(D=mxUtils.button(mxResources.get("openInNewWindow"),function(){v("_blank")}),D.className="geBtn",u.appendChild(D));CreateDialog.showDownloadButton&&(D=mxUtils.button(mxResources.get("download"),function(){v("download")}),D.className="geBtn",u.appendChild(D),null!=p&&(D.style.marginTop="6px",u.style.marginTop="6px"));null!=p&&(mxUtils.br(u),u.appendChild(p));b.editor.cancelFirst&&null==c||u.appendChild(z);mxEvent.addListener(H,"keypress",function(B){13== -B.keyCode?v(App.MODE_DEVICE):27==B.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(u);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; -var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";m.appendChild(x);mxUtils.br(m);var u=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog(); -null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=x.style.width;m.appendChild(u);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,l,m,x,u){function D(){0FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+ -":\n"+M),function(G){b.spinner.stop();200<=G.getStatus()&&299>=G.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});u.className="geBtn gePrimaryBtn";if(!f){u.setAttribute("disabled","disabled");var D=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(x, -"change",function(){0FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+ +":\n"+M),function(G){b.spinner.stop();200<=G.getStatus()&&299>=G.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className="geBtn gePrimaryBtn";if(!f){y.setAttribute("disabled","disabled");var D=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(v, +"change",function(){0O?V:V.substr(0,O)+A+V.substr(O+n.length);var R=V;n=mxUtils.htmlEntities(n);T=[];var W=-1;for(V=V.replace(/
/ig,"\n");-1<(W=V.indexOf("<",W+1));)T.push(W);W=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");O=V.toLowerCase().indexOf(n,O);if(0>O)return R;R=O+n.length;A=mxUtils.htmlEntities(A); +label=mxUtils.extractTextWithWhitespace([F])):label=z.getLabel(U.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;n&&m&&null!=R&&U==G&&(label=label.substr(q),Z=q);var Y=""==K.value,ea=Y;if(null==R&&(ea&&0<=label.indexOf(T)||!ea&&label.substring(0,T.length)===T||Y&&v(R,U.cell,T,ea))||null!=R&&(R.test(label)||Y&&v(R,U.cell,T,ea)))if(m&&(null!=R?(Y=label.match(R),null!=Y&&0O?V:V.substr(0,O)+A+V.substr(O+n.length);var R=V;n=mxUtils.htmlEntities(n);T=[];var W=-1;for(V=V.replace(/
/ig,"\n");-1<(W=V.indexOf("<",W+1));)T.push(W);W=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");O=V.toLowerCase().indexOf(n,O);if(0>O)return R;R=O+n.length;A=mxUtils.htmlEntities(A); V=V.substr(0,O)+A+V.substr(R);for(var S=0,U=0;U")},L=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=p&&null!=G&&K.value){var V=G.cell,n=z.getLabel(V);z.isCellEditable(V)&&z.model.setValue(V,I(n,p,K.value,q-p.length,z.getCurrentCellStyle(V)));H.style.backgroundColor=D(!1,!0)?"":Editor.isDarkMode()? -"#ff0000":"#ffcfcf"}}catch(A){b.handleError(A)}});L.setAttribute("title",mxResources.get("replFind"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");C.appendChild(L);mxUtils.br(C);var Q=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=G&&K.value){var V=G.cell,n=z.getLabel(V);z.model.setValue(V,I(n,p, -K.value,q-p.length,z.getCurrentCellStyle(V)));L.setAttribute("disabled","disabled");Q.setAttribute("disabled","disabled")}}catch(A){b.handleError(A)}});Q.setAttribute("title",mxResources.get("replace"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");C.appendChild(Q);var P=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText= +"#ff0000":"#ffcfcf"}}catch(A){b.handleError(A)}});L.setAttribute("title",mxResources.get("replFind"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");B.appendChild(L);mxUtils.br(B);var Q=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=G&&K.value){var V=G.cell,n=z.getLabel(V);z.model.setValue(V,I(n,p, +K.value,q-p.length,z.getCurrentCellStyle(V)));L.setAttribute("disabled","disabled");Q.setAttribute("disabled","disabled")}}catch(A){b.handleError(A)}});Q.setAttribute("title",mxResources.get("replace"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");B.appendChild(Q);var P=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText= "";if(K.value){M=null;var V=b.currentPage,n=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;z.getModel().beginUpdate();try{for(var A=0,O={};D(!1,!0,!0)&&100>A;){var T=G.cell,R=z.getLabel(T),W=O[T.id];if(W&&W.replAllMrk==t&&W.replAllPos>=q)break;O[T.id]={replAllMrk:t,replAllPos:q};z.isCellEditable(T)&&(z.model.setValue(T,I(R,p,K.value,q-p.length,z.getCurrentCellStyle(T))),A++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(N,mxResources.get("matchesRepl", -[A]))}catch(S){b.handleError(S)}finally{z.getModel().endUpdate(),b.editor.graph.setSelectionCells(n),b.editor.graph.rendering=!0}t++}});P.setAttribute("title",mxResources.get("replaceAll"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");C.appendChild(P);mxUtils.br(C);C.appendChild(B);B=mxUtils.button(mxResources.get("close"), -mxUtils.bind(this,function(){this.window.setVisible(!1)}));B.setAttribute("title",mxResources.get("close"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn";C.appendChild(B);mxUtils.br(C);C.appendChild(N)}else B.style.width="90px",J.style.width="90px";mxEvent.addListener(H,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)E.funct(); -else if(M!=H.value.toLowerCase()||13==V.keyCode)try{H.style.backgroundColor=D()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(n){H.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(v,"keydown",function(V){70==V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(E.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),v,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); -this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1mxUtils.indexOf(D,g)&&G.push(g)}0mxUtils.indexOf(D,g)&&G.push(g)}0':null==N.desc&&(M.style.padding="20px",M.style.color="rgb(179, 179, 179)",mxUtils.write(M,mxResources.get("noPreview")));null!=G&&(G.style.backgroundColor="");G=I;G.style.backgroundColor=Editor.isDarkMode()? -"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(I,"click",Q);mxEvent.addListener(I,"dblclick",function(P){L.checked=!L.checked;mxEvent.consume(P)});d.push(function(){return L.checked?N.id:null});0==y&&0==J&&Q()})(F.entries[J])})(k[y])});D=document.createElement("div");D.className="geDialogTitle";mxUtils.write(D,mxResources.get("shapes"));D.style.position="absolute";D.style.top="0px";D.style.left="0px";D.style.lineHeight="40px";D.style.height="40px";D.style.right="0px";var z= +"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(I,"click",Q);mxEvent.addListener(I,"dblclick",function(P){L.checked=!L.checked;mxEvent.consume(P)});d.push(function(){return L.checked?N.id:null});0==x&&0==J&&Q()})(F.entries[J])})(k[x])});D=document.createElement("div");D.className="geDialogTitle";mxUtils.write(D,mxResources.get("shapes"));D.style.position="absolute";D.style.top="0px";D.style.left="0px";D.style.lineHeight="40px";D.style.height="40px";D.style.right="0px";var z= document.createElement("div"),M=document.createElement("div");z.style.position="absolute";z.style.top="40px";z.style.left="0px";z.style.width="202px";z.style.bottom="60px";z.style.overflow="auto";M.style.position="absolute";M.style.left="202px";M.style.right="0px";M.style.top="40px";M.style.bottom="60px";M.style.overflow="auto";M.style.borderLeftStyle="solid";M.style.borderLeftWidth="1px";M.style.textAlign="center";var G=null,d=[],g=document.createElement("div");g.style.position="relative";g.style.left= "0px";g.style.right="0px";m(f);c.style.padding="30px";c.appendChild(D);c.appendChild(z);c.appendChild(M);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles; p.defaultChecked=p.checked;f.appendChild(p);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(k){p.checked=!p.checked;mxEvent.consume(k)});var q=document.createElement("input");q.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),m.style.paddingRight="20px",m.appendChild(q),mxUtils.write(m," "+mxResources.get("rememberThisSetting")), -q.style.position="relative",q.style.top="1px",q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(m,"click",function(k){mxEvent.getSource(k)!=q&&(q.checked=!q.checked,mxEvent.consume(k))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var k=[],y=0;ymxUtils.indexOf(u,g)&&u.push(g);l()})}:function(){var g=document.createElement("div"),p=document.createElement("span");p.style.marginTop="6px";mxUtils.write(p,mxResources.get("builtinPlugins")+ -": ");g.appendChild(p);var q=document.createElement("select");q.style.width="150px";for(p=0;pmxUtils.indexOf(u,K)&&u.push(K)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(v.container,300,80,!0,!0);v.init()});p.className="geBtn";ALLOW_CUSTOM_PLUGINS||(p.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var v=App.pluginRegistry[q.value];0>mxUtils.indexOf(u,v)&&(u.push(v),l())}),null,null,null,p);b.showDialog(g.container,360,100,!0,!0)});E.className="geBtn";var z=mxUtils.button(mxResources.get("cancel"), -function(){b.hideDialog()});z.className="geBtn";var M=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){D?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});M.className="geBtn gePrimaryBtn";var G=document.createElement("div");G.style.marginTop="14px";G.style.textAlign="right";var d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});d.className= -"geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");G.appendChild(d);b.editor.cancelFirst?(c||G.appendChild(z),G.appendChild(E),G.appendChild(M)):(G.appendChild(E),G.appendChild(M),c||G.appendChild(z));m.appendChild(G);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var k=q.checked,y=t.checked,F=d.geometry,B=D.width,J=D.height,N=(300-B)/2,I=(300-J)/2;F.xN+B&&(F.width=N+B-F.x,F.x=Math.min(F.x,N+B));F.yI+J&&(F.height=I+J-F.y,F.y=Math.min(F.y,I+J));var L=(F.x-N)/B*100;B=100-(F.x+F.width-N)/B*100;N=(F.y-I)/J*100;F=100-(F.y+F.height-I)/J*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(B)+"% "+mxUtils.format(F)+"% "+mxUtils.format(L)+"%"+(k?" round "+G+"%":y?" round 50%":"")+")"}function m(k){null!=z&&(!0!==k&&(z.model.setGeometry(d,M.clone()),G=5,C.value=G),z.model.setStyle(d,g+l()),z.selectAll(),v.style.visibility=q.checked?"visible":"hidden")}var x=document.createElement("div"), -u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var D=document.createElement("img");D.onload=function(){function k(){z.model.setStyle(d,g+l())}z=new Graph(E);z.autoExtend=!1;z.autoScroll=!1;z.setGridEnabled(!1);z.setEnabled(!0);z.setPanning(!1);z.setConnectable(!1);z.getRubberband().setEnabled(!1);z.graphHandler.allowLivePreview=!1;var y=z.createVertexHandler; -z.createVertexHandler=function(){var R=y.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var F=d.geometry,B=D.width,J=D.height,N=(300-B)/2,I=(300-J)/2,L=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(L[0]),P=parseFloat(L[1]),V=parseFloat(L[2]),n=parseFloat(L[3]);isFinite(Q)&&isFinite(P)&&isFinite(V)&&isFinite(n)?(F.x=n/100*B+N,F.y=Q/100*J+I,F.width=(100-P)/100*B+N-F.x,F.height=(100-V)/100*J+I-F.y,"round"==L[4]?"50%"==L[5]?t.setAttribute("checked", -"checked"):(G=parseInt(L[5]),C.value=G,q.setAttribute("checked","checked"),v.style.visibility="visible"):p.setAttribute("checked","checked")):f=null}else f=null}catch(R){}d.style=g+(f?f:l());d.vertex=!0;z.addCell(d,null,null,null,null);z.selectAll();z.addListener(mxEvent.CELLS_MOVED,k);z.addListener(mxEvent.CELLS_RESIZED,k);var A=z.graphHandler.mouseUp,O=z.graphHandler.mouseDown;z.graphHandler.mouseUp=function(){A.apply(this,arguments);E.style.backgroundColor="#fff9"};z.graphHandler.mouseDown=function(){O.apply(this, -arguments);E.style.backgroundColor=""};z.dblClick=function(){};var T=z.getSelectionModel().changeSelection;z.getSelectionModel().changeSelection=function(){T.call(this,[d],[d])}};D.onerror=function(){D.onload=null;D.src=Editor.errorImage};D.setAttribute("src",e);D.style.maxWidth="300px";D.style.maxHeight="300px";u.appendChild(D);x.appendChild(u);var E=document.createElement("div");E.style.width="300px";E.style.height="300px";E.style.overflow="hidden";E.style.backgroundColor="#fff9";x.appendChild(E); -var z=null,M=new mxGeometry(100,100,100,100),G=5,d=new mxCell("",M.clone(),""),g="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle")); -x.appendChild(e);var q=document.createElement("input");q.setAttribute("type","radio");q.setAttribute("id","croppingRounded");q.setAttribute("name","croppingShape");q.style.margin="5px";x.appendChild(q);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));x.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px"; -x.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));x.appendChild(e);mxEvent.addListener(p,"change",m);mxEvent.addListener(q,"change",m);mxEvent.addListener(t,"change",m);var v=document.createElement("div");v.style.textAlign="center";v.style.visibility="hidden";var C=document.createElement("input");C.setAttribute("type","range");C.setAttribute("min","1");C.setAttribute("max","49");C.setAttribute("value",G);C.setAttribute("title", -mxResources.get("arcSize"));v.appendChild(C);x.appendChild(v);mxEvent.addListener(C,"change",function(){G=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){c(l(),d.geometry.width,d.geometry.height);b.hideDialog()});u.className="geBtn gePrimaryBtn";var H=mxUtils.button(mxResources.get("reset"),function(){c(null,D.width,D.height);b.hideDialog()});H.className="geBtn";var K=document.createElement("div"); -K.style.marginTop="10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(e),K.appendChild(H),K.appendChild(u)):(K.appendChild(H),K.appendChild(u),K.appendChild(e));x.appendChild(K);this.container=x},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),m=document.createElement("table"),x=document.createElement("tbody"),u=document.createElement("tr"),D=document.createElement("td"),E=document.createElement("td"); -m.style.paddingLeft="6px";mxUtils.write(D,mxResources.get("relative")+":");var z=document.createElement("input");z.setAttribute("type","checkbox");null!=c&&c.relative&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);this.init=function(){z.focus()};E.appendChild(z);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("left")+":");var M=document.createElement("input"); -M.setAttribute("type","text");M.style.width="100px";M.value=null!=c?c.x:"";E.appendChild(M);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("top")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.width="100px";G.value=null!=c?c.y:"";E.appendChild(G);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td"); -E=document.createElement("td");mxUtils.write(D,mxResources.get("dx")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c&&null!=c.offset?c.offset.x:"";E.appendChild(d);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("dy")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px"; -g.value=null!=c&&null!=c.offset?c.offset.y:"";E.appendChild(g);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.width:"";E.appendChild(p);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td");E= -document.createElement("td");mxUtils.write(D,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.height:"";E.appendChild(q);u.appendChild(D);u.appendChild(E);x.appendChild(u);u=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value= -1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";E.appendChild(t);u.appendChild(D);u.appendChild(E);x.appendChild(u);m.appendChild(x);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var C=0;CmxUtils.indexOf(y,g)&&y.push(g);l()})}:function(){var g=document.createElement("div"),p=document.createElement("span");p.style.marginTop="6px";mxUtils.write(p,mxResources.get("builtinPlugins")+ +": ");g.appendChild(p);var q=document.createElement("select");q.style.width="150px";for(p=0;pmxUtils.indexOf(y,K)&&y.push(K)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(u.container,300,80,!0,!0);u.init()});p.className="geBtn";ALLOW_CUSTOM_PLUGINS||(p.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var u=App.pluginRegistry[q.value];0>mxUtils.indexOf(y,u)&&(y.push(u),l())}),null,null,null,p);b.showDialog(g.container,360,100,!0,!0)});E.className="geBtn";var z=mxUtils.button(mxResources.get("cancel"), +function(){b.hideDialog()});z.className="geBtn";var M=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){D?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});M.className="geBtn gePrimaryBtn";var G=document.createElement("div");G.style.marginTop="14px";G.style.textAlign="right";var d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});d.className= +"geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");G.appendChild(d);b.editor.cancelFirst?(c||G.appendChild(z),G.appendChild(E),G.appendChild(M)):(G.appendChild(E),G.appendChild(M),c||G.appendChild(z));m.appendChild(G);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var k=q.checked,x=t.checked,F=d.geometry,C=D.width,J=D.height,N=(300-C)/2,I=(300-J)/2;F.xN+C&&(F.width=N+C-F.x,F.x=Math.min(F.x,N+C));F.yI+J&&(F.height=I+J-F.y,F.y=Math.min(F.y,I+J));var L=(F.x-N)/C*100;C=100-(F.x+F.width-N)/C*100;N=(F.y-I)/J*100;F=100-(F.y+F.height-I)/J*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(C)+"% "+mxUtils.format(F)+"% "+mxUtils.format(L)+"%"+(k?" round "+G+"%":x?" round 50%":"")+")"}function m(k){null!=z&&(!0!==k&&(z.model.setGeometry(d,M.clone()),G=5,B.value=G),z.model.setStyle(d,g+l()),z.selectAll(),u.style.visibility=q.checked?"visible":"hidden")}var v=document.createElement("div"), +y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var D=document.createElement("img");D.onload=function(){function k(){z.model.setStyle(d,g+l())}z=new Graph(E);z.autoExtend=!1;z.autoScroll=!1;z.setGridEnabled(!1);z.setEnabled(!0);z.setPanning(!1);z.setConnectable(!1);z.getRubberband().setEnabled(!1);z.graphHandler.allowLivePreview=!1;var x=z.createVertexHandler; +z.createVertexHandler=function(){var R=x.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var F=d.geometry,C=D.width,J=D.height,N=(300-C)/2,I=(300-J)/2,L=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(L[0]),P=parseFloat(L[1]),V=parseFloat(L[2]),n=parseFloat(L[3]);isFinite(Q)&&isFinite(P)&&isFinite(V)&&isFinite(n)?(F.x=n/100*C+N,F.y=Q/100*J+I,F.width=(100-P)/100*C+N-F.x,F.height=(100-V)/100*J+I-F.y,"round"==L[4]?"50%"==L[5]?t.setAttribute("checked", +"checked"):(G=parseInt(L[5]),B.value=G,q.setAttribute("checked","checked"),u.style.visibility="visible"):p.setAttribute("checked","checked")):f=null}else f=null}catch(R){}d.style=g+(f?f:l());d.vertex=!0;z.addCell(d,null,null,null,null);z.selectAll();z.addListener(mxEvent.CELLS_MOVED,k);z.addListener(mxEvent.CELLS_RESIZED,k);var A=z.graphHandler.mouseUp,O=z.graphHandler.mouseDown;z.graphHandler.mouseUp=function(){A.apply(this,arguments);E.style.backgroundColor="#fff9"};z.graphHandler.mouseDown=function(){O.apply(this, +arguments);E.style.backgroundColor=""};z.dblClick=function(){};var T=z.getSelectionModel().changeSelection;z.getSelectionModel().changeSelection=function(){T.call(this,[d],[d])}};D.onerror=function(){D.onload=null;D.src=Editor.errorImage};D.setAttribute("src",e);D.style.maxWidth="300px";D.style.maxHeight="300px";y.appendChild(D);v.appendChild(y);var E=document.createElement("div");E.style.width="300px";E.style.height="300px";E.style.overflow="hidden";E.style.backgroundColor="#fff9";v.appendChild(E); +var z=null,M=new mxGeometry(100,100,100,100),G=5,d=new mxCell("",M.clone(),""),g="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";v.appendChild(p);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle")); +v.appendChild(e);var q=document.createElement("input");q.setAttribute("type","radio");q.setAttribute("id","croppingRounded");q.setAttribute("name","croppingShape");q.style.margin="5px";v.appendChild(q);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px"; +v.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(p,"change",m);mxEvent.addListener(q,"change",m);mxEvent.addListener(t,"change",m);var u=document.createElement("div");u.style.textAlign="center";u.style.visibility="hidden";var B=document.createElement("input");B.setAttribute("type","range");B.setAttribute("min","1");B.setAttribute("max","49");B.setAttribute("value",G);B.setAttribute("title", +mxResources.get("arcSize"));u.appendChild(B);v.appendChild(u);mxEvent.addListener(B,"change",function(){G=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(l(),d.geometry.width,d.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var H=mxUtils.button(mxResources.get("reset"),function(){c(null,D.width,D.height);b.hideDialog()});H.className="geBtn";var K=document.createElement("div"); +K.style.marginTop="10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(e),K.appendChild(H),K.appendChild(y)):(K.appendChild(H),K.appendChild(y),K.appendChild(e));v.appendChild(K);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),m=document.createElement("table"),v=document.createElement("tbody"),y=document.createElement("tr"),D=document.createElement("td"),E=document.createElement("td"); +m.style.paddingLeft="6px";mxUtils.write(D,mxResources.get("relative")+":");var z=document.createElement("input");z.setAttribute("type","checkbox");null!=c&&c.relative&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);this.init=function(){z.focus()};E.appendChild(z);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("left")+":");var M=document.createElement("input"); +M.setAttribute("type","text");M.style.width="100px";M.value=null!=c?c.x:"";E.appendChild(M);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("top")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.width="100px";G.value=null!=c?c.y:"";E.appendChild(G);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td"); +E=document.createElement("td");mxUtils.write(D,mxResources.get("dx")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c&&null!=c.offset?c.offset.x:"";E.appendChild(d);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("dy")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px"; +g.value=null!=c&&null!=c.offset?c.offset.y:"";E.appendChild(g);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.width:"";E.appendChild(p);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td");E= +document.createElement("td");mxUtils.write(D,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.height:"";E.appendChild(q);y.appendChild(D);y.appendChild(E);v.appendChild(y);y=document.createElement("tr");D=document.createElement("td");E=document.createElement("td");mxUtils.write(D,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value= +1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";E.appendChild(t);y.appendChild(D);y.appendChild(E);v.appendChild(y);m.appendChild(v);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var u=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var B=0;Bb.maxImageSize||I>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/Math.max(1,N)),b.maxImageSize/Math.max(1,I));N*=O;I*=O}n>A?(A=Math.round(100*A/n),n=100):(n=Math.round(100*n/A),A=100);var T=document.createElement("div");T.setAttribute("draggable","true");T.style.display="inline-block";T.style.position="relative";T.style.padding="0 12px";T.style.cursor="move";mxUtils.setPrefixedStyle(T.style,"transition", -"transform .1s ease-in-out");if(null!=y){var R=document.createElement("img");R.setAttribute("src",C.convert(y));R.style.width=n+"px";R.style.height=A+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-A)/2)+"px";R.style.paddingLeft=Math.floor((100-n)/2)+"px";T.appendChild(R)}else if(null!=L){var W=b.stringToCells("<"==L.xml.charAt(0)?L.xml:Graph.decompress(L.xml));0q?t-1:t,0,z.splice(q,1)[0]),d.insertBefore(d.children[q],d.children[t])):(z.push(z.splice(q,1)[0]),d.appendChild(d.children[q]));else if(0q?t-1:t,0,z.splice(q,1)[0]),d.insertBefore(d.children[q],d.children[t])):(z.push(z.splice(q,1)[0]),d.appendChild(d.children[q]));else if(0=n.status&&(u(n.responseText,B,J,N,I,L,Q,"fixed",mxEvent.isAltDown(y)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),d.scrollTop=d.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(u(F,B,J,N,I,L,Q,"fixed",mxEvent.isAltDown(y)?null:Q.substring(0, +"260px";g.style.textAlign="center";g.style.fontSize="22px";g.style.color="#a0c3ff";mxUtils.write(g,mxResources.get("dragImagesHere"));f.appendChild(g);var p={},q=null,t=null,u=null;M=function(x){"true"!=mxEvent.getSource(x).getAttribute("contentEditable")&&null!=u&&(u(),u=null,mxEvent.consume(x))};mxEvent.addListener(d,"mousedown",M);mxEvent.addListener(d,"pointerdown",M);mxEvent.addListener(d,"touchstart",M);var B=new mxUrlConverter,H=!1;if(null!=c)for(M=0;M=n.status&&(y(n.responseText,C,J,N,I,L,Q,"fixed",mxEvent.isAltDown(x)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),d.scrollTop=d.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(y(F,C,J,N,I,L,Q,"fixed",mxEvent.isAltDown(x)?null:Q.substring(0, Q.lastIndexOf(".")).replace(/_/g," ")),d.scrollTop=d.scrollHeight)}};mxEvent.addListener(d,"dragover",D);mxEvent.addListener(d,"drop",E);mxEvent.addListener(g,"dragover",D);mxEvent.addListener(g,"drop",E);f.appendChild(d);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";M=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});M.setAttribute("id","btnCancel");M.className="geBtn";b.editor.cancelFirst&&c.appendChild(M);"draw.io"!=b.getServiceName()|| -null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(y){b.spinner.stop();if(null!=y){var F=b.getSearch("create title mode url drive splash state clibs ui".split(" "));F+=(0==F.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(y);y=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+F,null,null,null,null,"Check out the library I made using @drawio"); -b.showDialog(y.container,450,240,!0);y.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var y=b.createLibraryDataFromImages(z), -F=G.value;/(\.xml)$/i.test(F)||(F+=".xml");b.isLocalFileSave()?b.saveLocalFile(y,F,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(F)+"&format=xml&xml="+encodeURIComponent(y))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var k=document.createElement("input");k.setAttribute("multiple","multiple");k.setAttribute("type","file");mxEvent.addListener(k, -"change",function(y){H=!1;b.importFiles(k.files,0,0,b.maxImageSize,function(F,B,J,N,I,L,Q,P,V){null!=k.files&&(K(y)(F,B,J,N,I,L,Q,P,V),k.type="",k.type="file",k.value="")});d.scrollTop=d.scrollHeight});k.style.display="none";document.body.appendChild(k);b.libDlgFileInputElt=k}e=mxUtils.button(mxResources.get("import"),function(){null!=v&&(v(),v=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"), -function(){null!=v&&(v(),v=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(y,F,B){H=!1;if(null!=y){if("data:image/"==y.substring(0,11)){var J=y.indexOf(",");0=Ha.getStatus()&&(ka=Ha.getText());Na(ka)}))):Na(ka)}function ha(wa,Na,Ha){if(null!=wa&& +null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(x){b.spinner.stop();if(null!=x){var F=b.getSearch("create title mode url drive splash state clibs ui".split(" "));F+=(0==F.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(x);x=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+F,null,null,null,null,"Check out the library I made using @drawio"); +b.showDialog(x.container,450,240,!0);x.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var x=b.createLibraryDataFromImages(z), +F=G.value;/(\.xml)$/i.test(F)||(F+=".xml");b.isLocalFileSave()?b.saveLocalFile(x,F,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(F)+"&format=xml&xml="+encodeURIComponent(x))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var k=document.createElement("input");k.setAttribute("multiple","multiple");k.setAttribute("type","file");mxEvent.addListener(k, +"change",function(x){H=!1;b.importFiles(k.files,0,0,b.maxImageSize,function(F,C,J,N,I,L,Q,P,V){null!=k.files&&(K(x)(F,C,J,N,I,L,Q,P,V),k.type="",k.type="file",k.value="")});d.scrollTop=d.scrollHeight});k.style.display="none";document.body.appendChild(k);b.libDlgFileInputElt=k}e=mxUtils.button(mxResources.get("import"),function(){null!=u&&(u(),u=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"), +function(){null!=u&&(u(),u=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(x,F,C){H=!1;if(null!=x){if("data:image/"==x.substring(0,11)){var J=x.indexOf(",");0=Ha.getStatus()&&(ka=Ha.getText());Na(ka)}))):Na(ka)}function ha(wa,Na,Ha){if(null!=wa&& mxUtils.isAncestorNode(document.body,aa)&&(wa=mxUtils.parseXml(wa),wa=Editor.extractGraphModel(wa.documentElement,!0),null!=wa)){"mxfile"==wa.nodeName&&(wa=Editor.parseDiagramNode(wa.getElementsByTagName("diagram")[0]));var Aa=new mxCodec(wa.ownerDocument),Ka=new mxGraphModel;Aa.decode(wa,Ka);wa=Ka.root.getChildAt(0).children||[];b.sidebar.createTooltip(aa,wa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight|| document.body.clientHeight)-80,800),null!=ja.title?mxResources.get(ja.title,null,ja.title):null,!0,new mxPoint(Na,Ha),!0,null,!0);var Oa=document.createElement("div");Oa.className="geTempDlgDialogMask";P.appendChild(Oa);var sa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Oa&&(P.removeChild(Oa),Oa=null,sa.apply(this,arguments),b.sidebar.hideTooltip=sa)};mxEvent.addListener(Oa,"click",function(){b.sidebar.hideTooltip()})}}var ka=null;if(oa||b.sidebar.currentElt==aa)b.sidebar.hideTooltip(); -else{var va=function(wa){oa&&b.sidebar.currentElt==aa&&ha(wa,mxEvent.getClientX(na),mxEvent.getClientY(na));oa=!1;la.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=aa;oa=!0;la.src="/images/aui-wait.gif";ja.isExt?D(ja,va,function(){p(mxResources.get("cantLoadPrev"));oa=!1;la.src="/images/icon-search.svg"}):pa(ja.url,va)}}function C(ja,aa,la){if(null!=T){for(var na=T.className.split(" "),pa=0;pa=wa.getStatus()?na(wa.getText(),va):pa()})):na(b.emptyDiagramXml,va)},na=function(va,wa){g||b.hideDialog(!0);e(va,wa,ka,aa)},pa=function(){p(mxResources.get("cannotLoad")); ha()},ha=function(){R=ka;ia.className="geTempDlgCreateBtn";aa&&(ya.className="geTempDlgOpenBtn")},ka=R;R=null;"boolean"!==typeof aa&&(aa=ka.isExternal&&M);1==ja?E(ka.url,ka):aa?(ya.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",la()):(ia.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ja=new FilenameDialog(b,b.defaultFilename+".drawio", -mxResources.get("ok"),la,ja,function(va){var wa=null!=va&&0wa&&(va=va.substring(0,wa)+"…");if(la){var Oa=document.createElement("tr"); Ha=document.createElement("td");var sa=document.createElement("img");sa.src="/images/icon-search.svg";sa.className="geTempDlgDiagramListPreviewBtn";sa.setAttribute("title",mxResources.get("preview"));pa||Ha.appendChild(sa);Na=document.createElement("span");Na.className="geTempDlgDiagramTitle";Na.innerHTML=va;Ha.appendChild(Na);Oa.appendChild(Ha);Ha=document.createElement("td");Ha.innerText=Aa;Oa.appendChild(Ha);Ha=document.createElement("td");Ha.innerText=Ka;Oa.appendChild(Ha);ha.appendChild(Oa); -null==T&&(K(aa),C(Oa,"geTempDlgDiagramsListGridActive",ja[ka]));(function(Sa,Qa,Ja){mxEvent.addListener(Oa,"click",function(){T!=Qa&&(K(aa),C(Qa,"geTempDlgDiagramsListGridActive",Sa))});mxEvent.addListener(Oa,"dblclick",H);mxEvent.addListener(sa,"click",function(Ta){v(Sa,Qa,Ja,Ta)})})(ja[ka],Oa,sa)}else{var Ia=document.createElement("div");Ia.className="geTempDlgDiagramTile";Ia.setAttribute("title",Na);null==T&&(K(aa),C(Ia,"geTempDlgDiagramTileActive",ja[ka]));Aa=document.createElement("div");Aa.className= +null==T&&(K(aa),B(Oa,"geTempDlgDiagramsListGridActive",ja[ka]));(function(Sa,Qa,Ja){mxEvent.addListener(Oa,"click",function(){T!=Qa&&(K(aa),B(Qa,"geTempDlgDiagramsListGridActive",Sa))});mxEvent.addListener(Oa,"dblclick",H);mxEvent.addListener(sa,"click",function(Ta){u(Sa,Qa,Ja,Ta)})})(ja[ka],Oa,sa)}else{var Ia=document.createElement("div");Ia.className="geTempDlgDiagramTile";Ia.setAttribute("title",Na);null==T&&(K(aa),B(Ia,"geTempDlgDiagramTileActive",ja[ka]));Aa=document.createElement("div");Aa.className= "geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ma=document.createElement("img");Ma.style.display="none";(function(Sa,Qa,Ja){Ma.onload=function(){Qa.className="geTempDlgDiagramTileImg";Sa.style.display=""};Ma.onerror=function(){this.src!=Ja?this.src=Ja:Qa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ma,Aa,Ha?Ha.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ma.src=Ha;Aa.appendChild(Ma);Ia.appendChild(Aa);Aa=document.createElement("div"); -Aa.className="geTempDlgDiagramTileLbl";Aa.innerHTML=null!=va?va:"";Ia.appendChild(Aa);sa=document.createElement("img");sa.src="/images/icon-search.svg";sa.className="geTempDlgDiagramPreviewBtn";sa.setAttribute("title",mxResources.get("preview"));pa||Ia.appendChild(sa);(function(Sa,Qa,Ja){mxEvent.addListener(Ia,"click",function(){T!=Qa&&(K(aa),C(Qa,"geTempDlgDiagramTileActive",Sa))});mxEvent.addListener(Ia,"dblclick",H);mxEvent.addListener(sa,"click",function(Ta){v(Sa,Qa,Ja,Ta)})})(ja[ka],Ia,sa);da.appendChild(Ia)}}for(var Xa in na)ja= -na[Xa],0la?la:ja.length;for(var na=0;nala?la:ja.length;for(var na=0;na
'+ +0;ka
'+ mxResources.get("newDiagram")+'
'+mxResources.get("showMore")+'
'+ mxResources.get("myDiagrams")+'
'+mxResources.get("allDiagrams")+'

'+ (G?''+mxResources.get("linkToDiagramHint")+'":"")+(M?'
'+mxResources.get("open")+"
":"")+'
'+mxResources.get("create")+'
'+mxResources.get("cancel")+"
",P=document.createElement("div");P.innerHTML=Q;P.className= "geTemplateDlg";this.container=P;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,n=!1,A=null,O=null,T=null,R=null,W=!1,S=!0,U=!1,X=[],Z=null,Y,ea,ca=!1,ma=P.querySelector(".geTempDlgShowAllBtn"),da=P.querySelector(".geTempDlgDiagramsTiles"),za=P.querySelector(".geTempDlgDiagramsListTitle"),Ba=P.querySelector(".geTempDlgDiagramsListBtns"),Ca=P.querySelector(".geTempDlgContent"),ba=P.querySelector(".geTempDlgDiagramsList"),fa=P.querySelector(".geTempDlgNewDiagramCat"), qa=P.querySelector(".geTempDlgNewDiagramCatList"),ia=P.querySelector(".geTempDlgCreateBtn"),ya=P.querySelector(".geTempDlgOpenBtn"),xa=P.querySelector(".geTempDlgSearchBox"),ta=P.querySelector(".geTempDlgErrMsg"),La=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(P.querySelector(".geTempDlgBack"),"click",function(){q();ca=!1;P.querySelector(".geTemplatesList").style.display="none";Ca.style.width= -"100%";fa.style.display="";ba.style.minHeight="calc(100% - 280px)";xa.style.display=u?"":"none";xa.value="";Y=null;J(S)});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){t(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(S=!0,null==Y?J(S):I(Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){t(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", +"100%";fa.style.display="";ba.style.minHeight="calc(100% - 280px)";xa.style.display=y?"":"none";xa.value="";Y=null;J(S)});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){t(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(S=!0,null==Y?J(S):I(Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){t(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", "allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(S=!1,null==Y?J(S):I(Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){t(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(U=!0,k(X,!1,U,Z))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){t(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(U=!1,k(X,!1,U,Z))});var oa=!1;mxEvent.addListener(ma, -"click",function(){W?(fa.style.height="280px",qa.style.height="190px",ma.innerText=mxResources.get("showMore"),y(Fa)):(fa.style.height="440px",qa.style.height="355px",ma.innerText=mxResources.get("showLess"),y(Fa,!0));W=!W});var ra=!1,ua=!1,Ea={},Da={},Pa={},Fa=[],Ra=1,Ga=0;null!=z?z(function(ja,aa){Pa=ja;Ga=aa;B()},B):B();mxUtils.get(l,function(ja){if(!ua){ua=!0;for(ja=ja.getXml().documentElement.firstChild;null!=ja;)"undefined"!==typeof ja.getAttribute&&null!=ja.getAttribute("title")&&Fa.push({img:ja.getAttribute("img"), -libs:ja.getAttribute("libs"),clibs:ja.getAttribute("clibs"),title:ja.getAttribute("title")}),ja=ja.nextSibling;y(Fa)}});var Va=function(ja,aa,la){Ba.style.display="";La.stop();V=!1;if(n)n=!1;else if(aa)da.innerText=aa;else{la=la||{};aa=0;for(var na in la)aa+=la[na].length;0==ja.length&&0==aa?da.innerText=mxResources.get("noDiagrams"):k(ja,!1,U,0==aa?null:la)}};J(S);var Ua=null;mxEvent.addListener(xa,"keyup",L);mxEvent.addListener(xa,"search",L);mxEvent.addListener(xa,"input",L);mxEvent.addListener(ia, +"click",function(){W?(fa.style.height="280px",qa.style.height="190px",ma.innerText=mxResources.get("showMore"),x(Fa)):(fa.style.height="440px",qa.style.height="355px",ma.innerText=mxResources.get("showLess"),x(Fa,!0));W=!W});var ra=!1,ua=!1,Ea={},Da={},Pa={},Fa=[],Ra=1,Ga=0;null!=z?z(function(ja,aa){Pa=ja;Ga=aa;C()},C):C();mxUtils.get(l,function(ja){if(!ua){ua=!0;for(ja=ja.getXml().documentElement.firstChild;null!=ja;)"undefined"!==typeof ja.getAttribute&&null!=ja.getAttribute("title")&&Fa.push({img:ja.getAttribute("img"), +libs:ja.getAttribute("libs"),clibs:ja.getAttribute("clibs"),title:ja.getAttribute("title")}),ja=ja.nextSibling;x(Fa)}});var Va=function(ja,aa,la){Ba.style.display="";La.stop();V=!1;if(n)n=!1;else if(aa)da.innerText=aa;else{la=la||{};aa=0;for(var na in la)aa+=la[na].length;0==ja.length&&0==aa?da.innerText=mxResources.get("noDiagrams"):k(ja,!1,U,0==aa?null:la)}};J(S);var Ua=null;mxEvent.addListener(xa,"keyup",L);mxEvent.addListener(xa,"search",L);mxEvent.addListener(xa,"input",L);mxEvent.addListener(ia, "click",function(ja){H(!1,!1)});M&&mxEvent.addListener(ya,"click",function(ja){H(!1,!0)});G&&mxEvent.addListener(P.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ja){H(!0)});mxEvent.addListener(P.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();g||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; -var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var x="Unknown",u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox? -(x=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(x=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),u.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(x=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}")); -f=mxUtils.button(f,c);f.insertBefore(u,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(C){this.style.border="";13==C.keyCode&&v.click()}var x=document.createElement("table"),u=document.createElement("tbody");x.style.marginTop="8px";var D=document.createElement("tr");var E=document.createElement("td");E.colSpan=2;E.style.whiteSpace= +var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var v="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox? +(v=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}")); +f=mxUtils.button(f,c);f.insertBefore(y,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(B){this.style.border="";13==B.keyCode&&u.click()}var v=document.createElement("table"),y=document.createElement("tbody");v.style.marginTop="8px";var D=document.createElement("tr");var E=document.createElement("td");E.colSpan=2;E.style.whiteSpace= "nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value","sysfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-sysfonts");E.appendChild(z);var M=document.createElement("label");M.setAttribute("for","fontdialog-sysfonts");mxUtils.write(M,mxResources.get("sysFonts",null,"System Fonts"));E.appendChild(M);D.appendChild(E); -u.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";E.style.paddingLeft="15px";mxUtils.write(E,mxResources.get("fontname",null,"Font Name")+":");D.appendChild(E);var G=document.createElement("input");"s"==c&&G.setAttribute("value",e);G.style.marginLeft="4px";G.style.width="250px";G.className="dlg_fontName_s";E=document.createElement("td");E.appendChild(G);D.appendChild(E);u.appendChild(D);D=document.createElement("tr"); +y.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";E.style.paddingLeft="15px";mxUtils.write(E,mxResources.get("fontname",null,"Font Name")+":");D.appendChild(E);var G=document.createElement("input");"s"==c&&G.setAttribute("value",e);G.style.marginLeft="4px";G.style.width="250px";G.className="dlg_fontName_s";E=document.createElement("td");E.appendChild(G);D.appendChild(E);y.appendChild(D);D=document.createElement("tr"); E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","googlefonts");d.setAttribute("type","radio");d.setAttribute("name","current-fontdialog");d.setAttribute("id","fontdialog-googlefonts");E.appendChild(d);M=document.createElement("label");M.setAttribute("for","fontdialog-googlefonts");mxUtils.write(M,mxResources.get("googleFonts", -null,"Google Fonts"));E.appendChild(M);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(M=b.menus.createHelpLink("https://fonts.google.com/"),M.getElementsByTagName("img")[0].setAttribute("valign","middle"),E.appendChild(M));D.appendChild(E);u.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";E.style.paddingLeft="15px";mxUtils.write(E,mxResources.get("fontname",null,"Font Name")+":"); -D.appendChild(E);var g=document.createElement("input");"g"==c&&g.setAttribute("value",e);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_g";E=document.createElement("td");E.appendChild(g);D.appendChild(E);u.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value", -"webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-webfonts");E.appendChild(p);M=document.createElement("label");M.setAttribute("for","fontdialog-webfonts");mxUtils.write(M,mxResources.get("webfonts",null,"Web Fonts"));E.appendChild(M);D.appendChild(E);Editor.enableWebFonts&&u.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";E.style.paddingLeft= -"15px";mxUtils.write(E,mxResources.get("fontname",null,"Font Name")+":");D.appendChild(E);var q=document.createElement("input");"w"==c&&(Editor.enableWebFonts?q.setAttribute("value",e):G.setAttribute("value",e));q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_w";E=document.createElement("td");E.appendChild(q);D.appendChild(E);Editor.enableWebFonts&&u.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt"; -E.style.width="120px";E.style.paddingLeft="15px";mxUtils.write(E,mxResources.get("fontUrl",null,"Font URL")+":");D.appendChild(E);var t=document.createElement("input");t.setAttribute("value",f||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";E=document.createElement("td");E.appendChild(t);D.appendChild(E);Editor.enableWebFonts&&u.appendChild(D);this.init=function(){var C=G;"g"==c?C=g:"w"==c&&Editor.enableWebFonts&&(C=q);C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? -C.select():document.execCommand("selectAll",!1,null)};D=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.paddingTop="20px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",E.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&E.appendChild(e); -var v=mxUtils.button(mxResources.get("apply"),function(){if(z.checked){var C=G.value;var H="s"}else if(d.checked){C=g.value;var K=Editor.GOOGLE_FONTS+encodeURIComponent(C).replace(/%20/g,"+");H="g"}else p.checked&&(C=q.value,K=t.value,H="w");var k=K;var y=H,F=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==C||0==C.length?(x.querySelector(".dlg_fontName_"+y).style.border="1px solid red",k=!1):"w"!=y||F.test(k)?k=!0:(x.querySelector(".dlg_fontUrl").style.border= -"1px solid red",k=!1);k&&(l(C,K,H),b.hideDialog())});v.className="geBtn gePrimaryBtn";mxEvent.addListener(G,"keypress",m);mxEvent.addListener(g,"keypress",m);mxEvent.addListener(q,"keypress",m);mxEvent.addListener(t,"keypress",m);mxEvent.addListener(G,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});mxEvent.addListener(g,"focus",function(){d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked= -!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});E.appendChild(v);b.editor.cancelFirst||E.appendChild(e);D.appendChild(E);u.appendChild(D);x.appendChild(u);this.container=x}; +null,"Google Fonts"));E.appendChild(M);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(M=b.menus.createHelpLink("https://fonts.google.com/"),M.getElementsByTagName("img")[0].setAttribute("valign","middle"),E.appendChild(M));D.appendChild(E);y.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";E.style.paddingLeft="15px";mxUtils.write(E,mxResources.get("fontname",null,"Font Name")+":"); +D.appendChild(E);var g=document.createElement("input");"g"==c&&g.setAttribute("value",e);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_g";E=document.createElement("td");E.appendChild(g);D.appendChild(E);y.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value", +"webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-webfonts");E.appendChild(p);M=document.createElement("label");M.setAttribute("for","fontdialog-webfonts");mxUtils.write(M,mxResources.get("webfonts",null,"Web Fonts"));E.appendChild(M);D.appendChild(E);Editor.enableWebFonts&&y.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";E.style.paddingLeft= +"15px";mxUtils.write(E,mxResources.get("fontname",null,"Font Name")+":");D.appendChild(E);var q=document.createElement("input");"w"==c&&(Editor.enableWebFonts?q.setAttribute("value",e):G.setAttribute("value",e));q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_w";E=document.createElement("td");E.appendChild(q);D.appendChild(E);Editor.enableWebFonts&&y.appendChild(D);D=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt"; +E.style.width="120px";E.style.paddingLeft="15px";mxUtils.write(E,mxResources.get("fontUrl",null,"Font URL")+":");D.appendChild(E);var t=document.createElement("input");t.setAttribute("value",f||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";E=document.createElement("td");E.appendChild(t);D.appendChild(E);Editor.enableWebFonts&&y.appendChild(D);this.init=function(){var B=G;"g"==c?B=g:"w"==c&&Editor.enableWebFonts&&(B=q);B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? +B.select():document.execCommand("selectAll",!1,null)};D=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.paddingTop="20px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",E.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&E.appendChild(e); +var u=mxUtils.button(mxResources.get("apply"),function(){if(z.checked){var B=G.value;var H="s"}else if(d.checked){B=g.value;var K=Editor.GOOGLE_FONTS+encodeURIComponent(B).replace(/%20/g,"+");H="g"}else p.checked&&(B=q.value,K=t.value,H="w");var k=K;var x=H,F=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==B||0==B.length?(v.querySelector(".dlg_fontName_"+x).style.border="1px solid red",k=!1):"w"!=x||F.test(k)?k=!0:(v.querySelector(".dlg_fontUrl").style.border= +"1px solid red",k=!1);k&&(l(B,K,H),b.hideDialog())});u.className="geBtn gePrimaryBtn";mxEvent.addListener(G,"keypress",m);mxEvent.addListener(g,"keypress",m);mxEvent.addListener(q,"keypress",m);mxEvent.addListener(t,"keypress",m);mxEvent.addListener(G,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});mxEvent.addListener(g,"focus",function(){d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked= +!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});E.appendChild(u);b.editor.cancelFirst||E.appendChild(e);D.appendChild(E);y.appendChild(D);v.appendChild(y);this.container=v}; function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));e.appendChild(m);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));e.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList"; -e.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(x);x.className="geBtn gePrimaryBtn"; -b.editor.cancelFirst||f.appendChild(m);x.setAttribute("disabled","disabled");this.okBtn=x;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b
'+mxUtils.htmlEntities(e)+"
";this.pagesContainer.appendChild(c);var l=this.createViewer(c.childNodes[0],f);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c; -this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var x=0;x
'+mxUtils.htmlEntities(e)+"
";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")? (l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()}; -var FilePropertiesDialog=function(b){var e=document.createElement("table"),f=document.createElement("tbody");e.style.width="100%";e.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var x=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(x=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var u=document.createElement("td"); -u.style.whiteSpace="nowrap";u.style.fontSize="10pt";u.style.width="120px";mxUtils.write(u,mxResources.get("zoom")+":");l.appendChild(u);var D=document.createElement("input");D.setAttribute("value",100*m+"%");D.style.marginLeft="4px";D.style.width="180px";u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(D);l.appendChild(u);f.appendChild(l);l=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.fontSize="10pt";u.style.width="120px"; -mxUtils.write(u,mxResources.get("borderWidth")+":");l.appendChild(u);var E=document.createElement("input");E.setAttribute("value",x);E.style.marginLeft="4px";E.style.width="180px";u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(E);l.appendChild(u);f.appendChild(l);this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0, -parseInt(D.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(E.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var z=null!=c?c.isCompressed():Editor.defaultCompressed;l=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.fontSize="10pt";u.style.width="120px";mxUtils.write(u,mxResources.get("compressed")+":");l.appendChild(u);var M=document.createElement("input");M.setAttribute("type", -"checkbox");z&&(M.setAttribute("checked","checked"),M.defaultChecked=!0);u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(M);l.appendChild(u);f.appendChild(l);this.init=function(){M.focus()};m=function(){null!=b.fileNode&&z!=M.checked&&(b.fileNode.setAttribute("compressed",M.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.fontSize= -"10pt";u.style.width="120px";mxUtils.write(u,mxResources.get("realtimeCollaboration")+":");l.appendChild(u);var G=document.createElement("input");G.setAttribute("type","checkbox");var d=c.isRealtimeEnabled();if(d="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))G.setAttribute("checked","checked"),G.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();G.checked!=d&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(G.checked,mxUtils.bind(this, -function(g){b.spinner.stop()}),mxUtils.bind(this,function(g){b.spinner.stop();b.showError(mxResources.get("error"),null!=g&&null!=g.error?g.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){G.focus()};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(G);u.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(u);f.appendChild(l)}this.init=null!=this.init?this.init: -function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop="20px";u.style.whiteSpace="nowrap";u.setAttribute("align","center");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&u.appendChild(x);u.appendChild(m);b.editor.cancelFirst||u.appendChild(x);l.appendChild(u);f.appendChild(l);e.appendChild(f);this.container= -e},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(N,I,L){N=new mxCell("",new mxGeometry(N,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");N.vertex=!0;N.cp=!0;N.constObj=L;return M.addCell(N)}function x(N){N=M.getSelectionCells();M.deleteCells(N)}function u(){var N=parseInt(y.value)||0;N=0> -N?0:100I?0:100P?(I=P*Q.width,P=0):1N?(L=N*Q.height,N=0):1N?1:100N?0:100I?0:100P?(I=P*Q.width,P=0):1N?(L=N*Q.height,N=0):1N?1:100 1 expected for zoomFactor"));null!=n.gridSteps&& (A=parseInt(n.gridSteps),!isNaN(A)&&0 0 expected for gridSteps"));null!=n.pageFormat&&(A=parseInt(n.pageFormat.width),O=parseInt(n.pageFormat.height),!isNaN(A)&&0l;l++)for(var m=l,x=0;8>x;x++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(n,A,O,T){for(var R=0;Rl;l++)for(var m=l,v=0;8>v;v++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(n,A,O,T){for(var R=0;R>>8;return n};Editor.crc32=function(n){for(var A=-1,O=0;O>>8^Editor.crcTable[(A^n.charCodeAt(O))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(n,A,O,T,R){function W(Y,ea){var ca=X;X+=ea;return Y.substring(ca,X)}function S(Y){Y=W(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+(Y.charCodeAt(0)<<24)}function U(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}n=n.substring(n.indexOf(",")+1);n=window.atob? atob(n):Base64.decode(n,!0);var X=0;if(W(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(W(n,4),"IHDR"!=W(n,4))null!=R&&R();else{W(n,17);R=n.substring(0,X);do{var Z=S(n);if("IDAT"==W(n,4)){R=n.substring(0,X-8);"pHYs"==A&&"dpi"==O?(O=Math.round(T/.0254),O=U(O)+U(O)+String.fromCharCode(1)):O=O+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,O,0,O.length);R+=U(O.length)+A+O+U(T^4294967295); -R+=n.substring(X-8,n.length);break}R+=n.substring(X-8,X-4+Z);W(n,Z);W(n,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,A){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var D=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors= +R+=n.substring(X-8,n.length);break}R+=n.substring(X-8,X-4+Z);W(n,Z);W(n,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,A){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var D=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors= function(){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(n,A){var O=null;null!=n.editor.graph.getModel().getParent(A)?O=A.getId():null!=n.currentPage&&(O=n.currentPage.getId());return O});if(null!=window.StyleFormatPanel){var E=Format.prototype.init;Format.prototype.init=function(){E.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)}; var z=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?z.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(n){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var M=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=M.apply(this,arguments);var A=this.editorUi,O=A.editor.graph; if(O.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&n.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(S){A.editor.setAutosave(S);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&O.isEnabled()&&"undefined"!== @@ -11557,17 +11560,17 @@ Ba.appendChild(Ca);Z.appendChild(Ba)}}var S=this,U=S.hiddenTags.slice(),X=docume S.isEnabled()?"48px":"10px";X.appendChild(Z);var Y=mxUtils.button(mxResources.get("reset"),function(da){S.setHiddenTags([]);mxEvent.isShiftDown(da)||(U=S.hiddenTags.slice());T();S.refresh()});Y.setAttribute("title",mxResources.get("reset"));Y.className="geBtn";Y.style.margin="0 4px 0 0";var ea=mxUtils.button(mxResources.get("add"),function(){null!=O&&O(U,function(da){U=da;ca()})});ea.setAttribute("title",mxResources.get("add"));ea.className="geBtn";ea.style.margin="0";S.addListener(mxEvent.ROOT,function(){U= S.hiddenTags.slice()});var ca=mxUtils.bind(this,function(da,za){if(n()){da=S.getAllTags();for(za=0;zamxUtils.indexOf(U,da[za])&&U.push(da[za]);U.sort();S.isSelectionEmpty()?W(U):W(U,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ca);S.model.addListener(mxEvent.CHANGE,ca);S.addListener(mxEvent.REFRESH,ca);var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.whiteSpace="nowrap";ma.style.position="absolute";ma.style.overflow= "hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";S.isEnabled()&&(ma.appendChild(Y),ma.appendChild(ea),X.appendChild(ma));return{div:X,refresh:ca}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var A in Graph.customFontElements){var O=Graph.customFontElements[A];n.push({name:O.name,url:O.url})}return n};Graph.prototype.setFont=function(n,A){Graph.addFont(n,A);document.execCommand("fontname",!1,n);if(null!=A){var O= -this.cellEditor.textarea.getElementsByTagName("font");A=Graph.getFontUrl(n,A);for(var T=0;T'+mxUtils.htmlEntities(n)+""};mxGraphView.prototype.redrawEnumerationState=function(n){var A="1"==mxUtils.getValue(n.style, +za,this.stylesheet=da,this.refresh());return Ca};var K=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(n){K.apply(this,arguments);null!=n.secondLabel&&(n.secondLabel.destroy(),n.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(n){return[n.shape,n.text,n.secondLabel,n.control]};var k=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){k.apply(this,arguments);this.enumerationState=0};var x=mxGraphView.prototype.stateValidated; +mxGraphView.prototype.stateValidated=function(n){null!=n.shape&&this.redrawEnumerationState(n);return x.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'
'+mxUtils.htmlEntities(n)+"
"};mxGraphView.prototype.redrawEnumerationState=function(n){var A="1"==mxUtils.getValue(n.style, "enumerate",0);A&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):A||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);A=n.secondLabel;if(null!=A){var O=n.view.scale,T=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4* O,n.y+4*O,0,0):mxRectangle.fromPoint(n.view.getPoint(n));A.bounds.equals(n)&&A.value==T&&A.scale==O||(A.bounds=n,A.value=T,A.scale=O,A.redraw())}};var F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName? null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode, -n.ownerSVGElement))}};var B=Graph.prototype.refresh;Graph.prototype.refresh=function(){B.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink= +n.ownerSVGElement))}};var C=Graph.prototype.refresh;Graph.prototype.refresh=function(){C.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink= function(n){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!=n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,A){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var O=!1, T=0,R=0,W=mxUtils.bind(this,function(){O||(O=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,function(){O&&(O=!1,this.model.endUpdate())}),U=mxUtils.bind(this,function(){0
')))}catch(n){}Editor.prototype.useCanvasForExport= !1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.1.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL; +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.1.4";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL; EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport= !mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig= {theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError= -function(d,g,p,q,t,v,C){if(null!=d){t=null!=t?t:Error(d);t.stack=null!=t.stack?t.stack:"";v=null!=v?v:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf(":")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: -"")+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(p)+(null!=q?":colno:"+encodeURIComponent(q):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(H){}try{C||null==window.console||console.error(v,d,g,p,q,t)}catch(H){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL? +function(d,g,p,q,t,u,B){if(null!=d){t=null!=t?t:Error(d);t.stack=null!=t.stack?t.stack:"";u=null!=u?u:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf(":")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: +"")+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(p)+(null!=q?":colno:"+encodeURIComponent(q):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(H){}try{B||null==window.console||console.error(u,d,g,p,q,t)}catch(H){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL? window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(p){}};EditorUi.sendReport=function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(p){}}; EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode= null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize= 520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground= -null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),p=new Image;p.onload=function(){try{g.getContext("2d").drawImage(p,0,0);var t=g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6
')))}catch(t){}try{g=document.createElement("canvas");g.width=g.height=1;var q=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(t){}})();EditorUi.prototype.createButtonContainer= function(){var d=document.createElement("div");d.className="geButtonContainer";d.style.overflow="1"==urlParams.embed?"hidden":"";return d};EditorUi.prototype.openLink=function(d,g,p){return this.editor.graph.openLink(d,g,p)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,p){localStorage.setItem(d,g);null!=p&&p()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d); g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled= d;this.editor.updateGraphComponents();this.editor.graph.refresh();this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()|| -!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,p){var q=null==d||null==g;p=null!=p?p:24;var t=new Spinner({lines:12,length:p,width:Math.round(p/3),radius:Math.round(p/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=t.spin;t.spin=function(H,K){var k= -!1;this.active||(v.call(this,H),this.active=!0,null!=K&&(q&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0, -d)+"px",k.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=K.substring(K.length-3,K.length)&&"!"!=K.charAt(K.length-1)&&(K+="..."),k.innerHTML=K,H.appendChild(k),t.status=k),this.pause=mxUtils.bind(this,function(){var y=function(){};this.active&&(y=mxUtils.bind(this,function(){this.spin(H,K)}));this.stop(); -return y}),k=!0);return k};var C=t.stop;t.stop=function(){C.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),p=this.editor.extractGraphModel(g.documentElement,!0);return null!=p&&0==p.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(d){return 8< +!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,p){var q=null==d||null==g;p=null!=p?p:24;var t=new Spinner({lines:12,length:p,width:Math.round(p/3),radius:Math.round(p/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=t.spin;t.spin=function(H,K){var k= +!1;this.active||(u.call(this,H),this.active=!0,null!=K&&(q&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0, +d)+"px",k.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=K.substring(K.length-3,K.length)&&"!"!=K.charAt(K.length-1)&&(K+="..."),k.innerHTML=K,H.appendChild(k),t.status=k),this.pause=mxUtils.bind(this,function(){var x=function(){};this.active&&(x=mxUtils.bind(this,function(){this.spin(H,K)}));this.stop(); +return x}),k=!0);return k};var B=t.stop;t.stop=function(){B.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),p=this.editor.extractGraphModel(g.documentElement,!0);return null!=p&&0==p.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(d){return 8< d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8=v.keyCode)||q.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?p.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml= -function(d){var g=e.apply(this,arguments);if(null==g)try{var p=d.indexOf("<mxfile ");if(0<=p){var q=d.lastIndexOf("</mxfile>");q>p&&(g=d.substring(p,q+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(d),v=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=v?mxUtils.getXml(v):""}}catch(C){}return g};EditorUi.prototype.validateFileData=function(d){if(null!= +161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var p=g.getFunction,q=this.editor.graph,t=this;g.getFunction=function(u){if(q.isSelectionEmpty()&&null!=t.pages&&0=u.keyCode)||q.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?p.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml= +function(d){var g=e.apply(this,arguments);if(null==g)try{var p=d.indexOf("<mxfile ");if(0<=p){var q=d.lastIndexOf("</mxfile>");q>p&&(g=d.substring(p,q+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(d),u=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=u?mxUtils.getXml(u):""}}catch(B){}return g};EditorUi.prototype.validateFileData=function(d){if(null!= d&&0');0<=g&&(d=d.slice(0,g)+''+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0\n':">")+"\n\n"+(null==t?null!=p?""+mxUtils.htmlEntities(p)+ -"\n":"":"diagrams.net\n")+(null!=t?'\n":"")+"\n':">")+'\n
\n
'+q+"
\n
\n"+(null==t?'